A Type-Name-Value tuple class. More...
#include <OpenMS/METADATA/MetaInfo.h>
| Public Member Functions | |
| MetaInfo () | |
| constructor  More... | |
| MetaInfo (const MetaInfo &rhs) | |
| copy constructor  More... | |
| ~MetaInfo () | |
| destructor  More... | |
| MetaInfo & | operator= (const MetaInfo &rhs) | 
| assignment operator  More... | |
| bool | operator== (const MetaInfo &rhs) const | 
| Equality operator.  More... | |
| bool | operator!= (const MetaInfo &rhs) const | 
| Equality operator.  More... | |
| const DataValue & | getValue (const String &name) const | 
| returns the value corresponding to a string  More... | |
| const DataValue & | getValue (UInt index) const | 
| returns the value corresponding to an index  More... | |
| bool | exists (const String &name) const | 
| returns if this MetaInfo is set  More... | |
| bool | exists (UInt index) const | 
| returns if this MetaInfo is set  More... | |
| void | setValue (const String &name, const DataValue &value) | 
| sets the DataValue corresponding to a name  More... | |
| void | setValue (UInt index, const DataValue &value) | 
| sets the DataValue corresponding to an index  More... | |
| void | removeValue (const String &name) | 
| Removes the DataValue corresponding to nameif it exists.  More... | |
| void | removeValue (UInt index) | 
| Removes the DataValue corresponding to indexif it exists.  More... | |
| void | getKeys (std::vector< String > &keys) const | 
| fills the given vector with a list of all keys for which a value is set  More... | |
| void | getKeys (std::vector< UInt > &keys) const | 
| fills the given vector with a list of all keys for which a value is set  More... | |
| bool | empty () const | 
| returns if the MetaInfo is empty  More... | |
| void | clear () | 
| removes all meta values  More... | |
| Static Public Member Functions | |
| static MetaInfoRegistry & | registry () | 
| returns a reference to the MetaInfoRegistry  More... | |
| Private Attributes | |
| std::map< UInt, DataValue > | index_to_value_ | 
| the actual mapping of index to the DataValue  More... | |
| Static Private Attributes | |
| static MetaInfoRegistry | registry_ | 
| static MetaInfoRegistry  More... | |
A Type-Name-Value tuple class.
MetaInfo maps an index ( an integer corresponding to a string ) to DataValue objects. The mapping of strings to the index is perfomed by the MetaInfoRegistry, which can be accessed by the method registry().
There are two versions of nearly all members. One which operates with a string name and another one which operates on an index. The index version is always faster, as it does not need to look up the index corresponding to the the string in the MetaInfoRegistry.
If you wish to add one MetaInfo member to a class, consider deriving that class from MetaInfoInterface, instead of simply adding MetaInfo as member. MetaInfoInterface implements a full interface to a MetaInfo member.
| MetaInfo | ( | ) | 
constructor
| ~MetaInfo | ( | ) | 
destructor
| void clear | ( | ) | 
removes all meta values
| bool empty | ( | ) | const | 
returns if the MetaInfo is empty
| void getKeys | ( | std::vector< String > & | keys | ) | const | 
fills the given vector with a list of all keys for which a value is set
| void getKeys | ( | std::vector< UInt > & | keys | ) | const | 
fills the given vector with a list of all keys for which a value is set
| bool operator!= | ( | const MetaInfo & | rhs | ) | const | 
Equality operator.
| bool operator== | ( | const MetaInfo & | rhs | ) | const | 
Equality operator.
| 
 | static | 
returns a reference to the MetaInfoRegistry
sets the DataValue corresponding to a name
| 
 | staticprivate | 
static MetaInfoRegistry
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:33 using doxygen 1.8.5 |