00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OPENMS_METADATA_METAINFOINTERFACE_H
00028 #define OPENMS_METADATA_METAINFOINTERFACE_H
00029
00030 #include <map>
00031 #include <string>
00032
00033 #include <iostream>
00034
00035 #include <OpenMS/METADATA/MetaInfo.h>
00036
00037 namespace OpenMS
00038 {
00039 class String;
00040
00051 class MetaInfoInterface
00052 {
00053 public:
00054
00056 MetaInfoInterface();
00058 MetaInfoInterface(const MetaInfoInterface& rhs);
00060 ~MetaInfoInterface();
00061
00063 MetaInfoInterface& operator = (const MetaInfoInterface& rhs);
00064
00066 bool operator== (const MetaInfoInterface& rhs) const;
00068 bool operator!= (const MetaInfoInterface& rhs) const;
00069
00071 const DataValue& getMetaValue(const String& name) const;
00073 const DataValue& getMetaValue(UInt index) const;
00074
00076 bool metaValueExists(const String& name) const;
00078 bool metaValueExists(UInt index) const;
00079
00081 void setMetaValue(const String& name, const String& value);
00083 void setMetaValue(UInt index, const String& value);
00085 void setMetaValue(const String& name, Int value);
00087 void setMetaValue(UInt index, Int value);
00089 void setMetaValue(const String& name, UInt value);
00091 void setMetaValue(UInt index, UInt value);
00093 void setMetaValue(const String& name, Real value);
00095 void setMetaValue(UInt index, Real value);
00097 void setMetaValue(const String& name, DoubleReal value);
00099 void setMetaValue(UInt index, DoubleReal value);
00101 void setMetaValue(const String& name, const DataValue& value);
00103 void setMetaValue(UInt index, const DataValue& value);
00104
00106 void removeMetaValue(const String& name);
00108 void removeMetaValue(UInt index);
00109
00111 MetaInfoRegistry& metaRegistry() const;
00112
00114 void getKeys(std::vector<String>& keys) const;
00115
00117 void getKeys(std::vector<UInt>& keys) const;
00118
00120 bool isMetaEmpty() const;
00121
00123 void clearMetaInfo();
00124
00125 protected:
00127 inline void createIfNotExists_();
00129 MetaInfo* meta_;
00130 };
00131
00132 }
00133
00134 #endif // OPENMS_METADATA_METAINFOINTERFACE_H