OpenMS
Loading...
Searching...
No Matches
DocumentIdentifier.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11// OpenMS
14
15namespace OpenMS
16{
29 class OPENMS_DLLAPI DocumentIdentifier
30 {
31public:
35
38
41
44
47
50
53
55 bool operator==(const DocumentIdentifier & rhs) const;
56
58
62
64 void setIdentifier(const std::string & id);
65
67 const std::string & getIdentifier() const;
68
71
72
74 void setLoadedFilePath(const std::string & file_name);
75
77 const std::string & getLoadedFilePath() const;
78
80 void setLoadedFileType(const std::string & file_name);
81
84
86
87protected:
89 std::string id_;
91 std::string file_path_;
94 };
95} // namespace OpenMS
96
Manage source document information.
Definition DocumentIdentifier.h:30
std::string file_path_
the path to the loaded file
Definition DocumentIdentifier.h:91
DocumentIdentifier(const DocumentIdentifier &)=default
Copy constructor.
const FileTypes::Type & getLoadedFileType() const
get the file_type (e.g. featureXML, consensusXML, mzData, mzXML, mzML, ...) of the file loaded from
virtual ~DocumentIdentifier()
Destructor.
void setIdentifier(const std::string &id)
set document identifier (e.g. an LSID)
DocumentIdentifier & operator=(DocumentIdentifier &&) &=default
Move assignment operator.
DocumentIdentifier(DocumentIdentifier &&)=default
Move constructor.
void setLoadedFileType(const std::string &file_name)
set the file_type according to the type of the file loaded from (see FileHandler::Type) preferably do...
DocumentIdentifier()
Default constructor.
const std::string & getIdentifier() const
retrieve document identifier (e.g. an LSID)
bool operator==(const DocumentIdentifier &rhs) const
Equality operator.
void setLoadedFilePath(const std::string &file_name)
set the file_name_ according to absolute path of the file loaded from preferably done whilst loading
DocumentIdentifier & operator=(const DocumentIdentifier &)=default
Assignment operator.
std::string id_
the ID (e.g. LSID)
Definition DocumentIdentifier.h:89
FileTypes::Type file_type_
the type of the loaded file
Definition DocumentIdentifier.h:93
const std::string & getLoadedFilePath() const
get the file_name_ which is the absolute path to the file loaded from
void swap(DocumentIdentifier &from)
exchange content with from
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Type
Actual file types enum.
Definition FileTypes.h:31