OpenMS
DocumentIdentifier.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- 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 
15 namespace OpenMS
16 {
29  class OPENMS_DLLAPI DocumentIdentifier
30  {
31 public:
35 
38 
41 
44 
47 
50 
53 
55  bool operator==(const DocumentIdentifier & rhs) const;
56 
58 
62 
64  void setIdentifier(const String & id);
65 
67  const String & getIdentifier() const;
68 
70  void swap(DocumentIdentifier & from);
71 
72 
74  void setLoadedFilePath(const String & file_name);
75 
77  const String & getLoadedFilePath() const;
78 
80  void setLoadedFileType(const String & file_name);
81 
84 
86 
87 protected:
94  };
95 } // namespace OpenMS
96 
Manage source document information.
Definition: DocumentIdentifier.h:30
void setIdentifier(const String &id)
set document identifier (e.g. an LSID)
const String & getIdentifier() const
retrieve document identifier (e.g. an LSID)
const String & getLoadedFilePath() const
get the file_name_ which is the absolute path to the file loaded from
DocumentIdentifier & operator=(const DocumentIdentifier &)=default
Assignment operator.
DocumentIdentifier(const DocumentIdentifier &)=default
Copy constructor.
virtual ~DocumentIdentifier()
Destructor.
void setLoadedFilePath(const String &file_name)
set the file_name_ according to absolute path of the file loaded from preferably done whilst loading
DocumentIdentifier(DocumentIdentifier &&)=default
Move constructor.
DocumentIdentifier & operator=(DocumentIdentifier &&) &=default
Move assignment operator.
DocumentIdentifier()
Default constructor.
const FileTypes::Type & getLoadedFileType() const
get the file_type (e.g. featureXML, consensusXML, mzData, mzXML, mzML, ...) of the file loaded from
bool operator==(const DocumentIdentifier &rhs) const
Equality operator.
String file_path_
the path to the loaded file
Definition: DocumentIdentifier.h:91
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
void setLoadedFileType(const String &file_name)
set the file_type according to the type of the file loaded from (see FileHandler::Type) preferably do...
void swap(DocumentIdentifier &from)
exchange content with from
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Type
Actual file types enum.
Definition: FileTypes.h:31