The annotation holds arbitrary information represented with (key,value) pairs of strings.
More...
#include <IAnnotation.h>
|
virtual | ~IAnnotation () |
| Destructor.
|
|
virtual bool | addItem (const std::string &key, const std::string &value, bool sticky=false)=0 |
| The list of the commonly accepted keys : "Title" for the title. More...
|
|
virtual bool | removeItem (const std::string &key)=0 |
| Remove the item indicated by a given key. More...
|
|
virtual std::string | value (const std::string &key) const =0 |
| Retrieve the value for a given key. More...
|
|
virtual void | setValue (const std::string &key, const std::string &value)=0 |
| Set the value for a given key. More...
|
|
virtual void | setSticky (const std::string &key, bool sticky)=0 |
| Set the sticky flag for a given key. More...
|
|
virtual int | size () const =0 |
| Get the size of the IAnnotation, i.e. More...
|
|
virtual std::string | key (int index) const =0 |
| Get the key at a given position within the IAnnotation. More...
|
|
virtual std::string | value (int index) const =0 |
| Get the value at a given position within the IAnnotation. More...
|
|
virtual void | reset ()=0 |
| Remove all the non-sticky items.
|
|
The annotation holds arbitrary information represented with (key,value) pairs of strings.
A sticky bit is associated to every item to protect it (or not) from a reset operation.
- Author
- The AIDA team (http://aida.freehep.org/)
virtual bool AIDA::IAnnotation::addItem |
( |
const std::string & |
key, |
|
|
const std::string & |
value, |
|
|
bool |
sticky = false |
|
) |
| |
|
pure virtual |
The list of the commonly accepted keys : "Title" for the title.
Add a key/value pair with a given sticky flag. If key alredy exists, override its value ?
- Parameters
-
key | The key to be added. |
value | The key's value. |
sticky | The key's sticky flag. If true the item will not be removed when the method reset or removeItem are invoked. The default value for the sticky flag is false . |
- Returns
- false If the key already exists.
Implemented in AIDA::IAnnotationROOT.
virtual std::string AIDA::IAnnotation::key |
( |
int |
index | ) |
const |
|
pure virtual |
virtual bool AIDA::IAnnotation::removeItem |
( |
const std::string & |
key | ) |
|
|
pure virtual |
Remove the item indicated by a given key.
- Parameters
-
key | The key to be removed. If the key is flagged as "sticky" it will not be removed. |
- Returns
- false If the key is sticky.
Implemented in AIDA::IAnnotationROOT.
virtual void AIDA::IAnnotation::setSticky |
( |
const std::string & |
key, |
|
|
bool |
sticky |
|
) |
| |
|
pure virtual |
Set the sticky flag for a given key.
- Parameters
-
key | The key whose stick flag is to be set. |
sticky | The new sticky flag. |
Implemented in AIDA::IAnnotationROOT.
virtual void AIDA::IAnnotation::setValue |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
pure virtual |
Set the value for a given key.
- Parameters
-
key | The key whose vale is to be changed. |
value | The new value. |
Implemented in AIDA::IAnnotationROOT.
virtual int AIDA::IAnnotation::size |
( |
| ) |
const |
|
pure virtual |
virtual std::string AIDA::IAnnotation::value |
( |
const std::string & |
key | ) |
const |
|
pure virtual |
Retrieve the value for a given key.
- Parameters
-
- Returns
- The corresponding value.
Implemented in AIDA::IAnnotationROOT.
virtual std::string AIDA::IAnnotation::value |
( |
int |
index | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: