OpenMS
CVTermListInterface.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: Hannes Roest $
6 // $Authors: Hannes Roest $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 #include <OpenMS/METADATA/CVTerm.h>
13 #include <map>
14 
15 namespace OpenMS
16 {
17 
18  class CVTermList;
19 
31  class OPENMS_DLLAPI CVTermListInterface :
32  public MetaInfoInterface
33  {
34 
35  public:
36 
40  // Constructor
46  // Destructor (non virtual)
48 
50  CVTermListInterface & operator=(const CVTermListInterface & rhs);
52  CVTermListInterface& operator=(CVTermListInterface&&) noexcept;
54 
56  bool operator==(const CVTermListInterface& rhs) const;
57 
59  bool operator!=(const CVTermListInterface& rhs) const;
60 
61  void replaceCVTerms(std::map<String, std::vector<CVTerm> > & cv_terms);
62 
64  void setCVTerms(const std::vector<CVTerm>& terms);
65 
67  void replaceCVTerm(const CVTerm& cv_term);
68 
70  void replaceCVTerms(const std::vector<CVTerm>& cv_terms, const String& accession);
71 
73  void replaceCVTerms(const std::map<String, std::vector<CVTerm> >& cv_term_map);
74 
76  void consumeCVTerms(const std::map<String, std::vector<CVTerm> >& cv_term_map);
77 
79  const std::map<String, std::vector<CVTerm> >& getCVTerms() const;
80 
82  void addCVTerm(const CVTerm& term);
83 
85  bool hasCVTerm(const String& accession) const;
86 
87  bool empty() const;
88 
89  private:
90 
91  void createIfNotExists_();
92 
93  CVTermList* cvt_ptr_;
94  };
95 
96 } // namespace OpenMS
97 
Interface to the controlled vocabulary term list.
Definition: CVTermListInterface.h:33
CVTermListInterface(const CVTermListInterface &rhs)
Copy constructor.
CVTermListInterface(CVTermListInterface &&) noexcept
Move constructor.
Representation of controlled vocabulary term list.
Definition: CVTermList.h:28
Representation of controlled vocabulary term.
Definition: CVTerm.h:27
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:35
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19