Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

MetaInfoInterface Class Reference
[Metadata]

#include <OpenMS/METADATA/MetaInfoInterface.h>

Inheritance diagram for MetaInfoInterface:

Acquisition ContactPerson DPeak DSpectrum DSpectrum< OpenMS::DPeakArray< PeakT, AllocT > > ExperimentalSettings Instrument InstrumentSettings IonDetector IonSource MassAnalyzer MetaInfoDescription Peak1D Peak2D PeptideHit PeptideIdentification Precursor ProcessingMethod ProteinHit ProteinIdentification ProteinIdentification::SearchParameters Sample SampleTreatment

List of all members.


Detailed Description

Interface for classes that can store arbitrary meta information (Type-Name-Value tupels).

MetaInfoInterface is a base class for all classes that use one MetaInfo object as member. If you want to add meta information to a class, let it publically inherit the MetaInfoInterface. Meta information is an array of Type-Name-Value tupels.

Public Member Functions

 MetaInfoInterface ()
 constructor
 MetaInfoInterface (const MetaInfoInterface &rhs)
 copy constructor
 ~MetaInfoInterface ()
 destructor
MetaInfoInterfaceoperator= (const MetaInfoInterface &rhs)
 assignment operator
bool operator== (const MetaInfoInterface &rhs) const
 Equality operator.
bool operator!= (const MetaInfoInterface &rhs) const
 Equality operator.
const DataValuegetMetaValue (const String &name) const
 returns the value corresponding to a string
const DataValuegetMetaValue (UInt index) const
 returns the value corresponding to an index
bool metaValueExists (const String &name) const
 returns if this MetaInfo is set
bool metaValueExists (UInt index) const
 returns if this MetaInfo is set
void setMetaValue (const String &name, const String &value)
 sets the value (string) corresponding to a name
void setMetaValue (UInt index, const String &value)
 sets the value (string) corresponding to an index
void setMetaValue (const String &name, Int value)
 sets the value (integer) corresponding to a name
void setMetaValue (UInt index, Int value)
 sets the value (integer) corresponding to an index
void setMetaValue (const String &name, UInt value)
 sets the value (unsigned integer) corresponding to a name
void setMetaValue (UInt index, UInt value)
 sets the value (unsigned integer) corresponding to an index
void setMetaValue (const String &name, Real value)
 sets the value (float) corresponding to a name
void setMetaValue (UInt index, Real value)
 sets the value (float) corresponding to an index
void setMetaValue (const String &name, DoubleReal value)
 sets the value (double) corresponding to a name
void setMetaValue (UInt index, DoubleReal value)
 sets the value (double) corresponding to an index
void setMetaValue (const String &name, const DataValue &value)
 sets the DataValue corresponding to a name
void setMetaValue (UInt index, const DataValue &value)
 sets the DataValue corresponding to an index
void removeMetaValue (const String &name)
 Removes the DataValue corresponding to name if it exists.
void removeMetaValue (UInt index)
 Removes the DataValue corresponding to index if it exists.
MetaInfoRegistrymetaRegistry () const
 retuns a reference to the MetaInfoRegistry
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 isMetaEmpty () const
 returns if the MetaInfo is empty
void clearMetaInfo ()
 removes all meta values

Protected Member Functions

void createIfNotExists_ ()
 creates the MetaInfo object if it does not exist

Protected Attributes

MetaInfometa_
 pointer to the MetaInfo object. 0 by default


Constructor & Destructor Documentation

MetaInfoInterface (  ) 

constructor

MetaInfoInterface ( const MetaInfoInterface rhs  ) 

copy constructor

~MetaInfoInterface (  ) 

destructor


Member Function Documentation

MetaInfoInterface& operator= ( const MetaInfoInterface rhs  ) 

assignment operator

bool operator== ( const MetaInfoInterface rhs  )  const

Equality operator.

bool operator!= ( const MetaInfoInterface rhs  )  const

Equality operator.

const DataValue& getMetaValue ( const String name  )  const

returns the value corresponding to a string

const DataValue& getMetaValue ( UInt  index  )  const

returns the value corresponding to an index

bool metaValueExists ( const String name  )  const

returns if this MetaInfo is set

bool metaValueExists ( UInt  index  )  const

returns if this MetaInfo is set

void setMetaValue ( const String name,
const String value 
)

sets the value (string) corresponding to a name

void setMetaValue ( UInt  index,
const String value 
)

sets the value (string) corresponding to an index

void setMetaValue ( const String name,
Int  value 
)

sets the value (integer) corresponding to a name

void setMetaValue ( UInt  index,
Int  value 
)

sets the value (integer) corresponding to an index

void setMetaValue ( const String name,
UInt  value 
)

sets the value (unsigned integer) corresponding to a name

void setMetaValue ( UInt  index,
UInt  value 
)

sets the value (unsigned integer) corresponding to an index

void setMetaValue ( const String name,
Real  value 
)

sets the value (float) corresponding to a name

void setMetaValue ( UInt  index,
Real  value 
)

sets the value (float) corresponding to an index

void setMetaValue ( const String name,
DoubleReal  value 
)

sets the value (double) corresponding to a name

void setMetaValue ( UInt  index,
DoubleReal  value 
)

sets the value (double) corresponding to an index

void setMetaValue ( const String name,
const DataValue value 
)

sets the DataValue corresponding to a name

void setMetaValue ( UInt  index,
const DataValue value 
)

sets the DataValue corresponding to an index

void removeMetaValue ( const String name  ) 

Removes the DataValue corresponding to name if it exists.

void removeMetaValue ( UInt  index  ) 

Removes the DataValue corresponding to index if it exists.

MetaInfoRegistry& metaRegistry (  )  const

retuns a reference to the MetaInfoRegistry

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 isMetaEmpty (  )  const

returns if the MetaInfo is empty

void clearMetaInfo (  ) 

removes all meta values

void createIfNotExists_ (  )  [inline, protected]

creates the MetaInfo object if it does not exist


Member Data Documentation

MetaInfo* meta_ [protected]

pointer to the MetaInfo object. 0 by default


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:46 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1