The annotation holds arbitrary information represented with (key,value) pairs of strings.
More...
#include <IAnnotationROOT.h>
|
virtual | ~IAnnotationROOT () |
| Destructor.
|
|
virtual bool | addItem (const std::string &key, const std::string &value, bool sticky=false) |
| The list of the commonly accepted keys : "Title" for the title. More...
|
|
virtual bool | removeItem (const std::string &key) |
| Remove the item indicated by a given key. More...
|
|
virtual std::string | value (const std::string &key) const |
| Retrieve the value for a given key. More...
|
|
virtual void | setValue (const std::string &key, const std::string &value) |
| Set the value for a given key. More...
|
|
virtual void | setSticky (const std::string &key, bool sticky) |
| Set the sticky flag for a given key. More...
|
|
virtual int | size () const |
| Get the size of the IAnnotation, i.e. More...
|
|
virtual std::string | key (int index) const |
| Get the key at a given position within the IAnnotation. More...
|
|
virtual std::string | value (int index) const |
| Get the value at a given position within the IAnnotation. More...
|
|
virtual void | reset () |
| Remove all the non-sticky items.
|
|
virtual | ~IAnnotation () |
| Destructor.
|
|
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
- T. Kraemer, DESY
- Version
- Id:
- IAnnotationROOT.h,v 1.1 2006-12-08 10:58:59 tkraemer Exp
bool IAnnotationROOT::addItem |
( |
const std::string & |
key, |
|
|
const std::string & |
value, |
|
|
bool |
sticky = false |
|
) |
| |
|
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.
Implements AIDA::IAnnotation.
std::string IAnnotationROOT::key |
( |
int |
index | ) |
const |
|
virtual |
bool IAnnotationROOT::removeItem |
( |
const std::string & |
key | ) |
|
|
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.
Implements AIDA::IAnnotation.
void IAnnotationROOT::setSticky |
( |
const std::string & |
key, |
|
|
bool |
sticky |
|
) |
| |
|
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. |
Implements AIDA::IAnnotation.
void IAnnotationROOT::setValue |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
virtual |
Set the value for a given key.
- Parameters
-
key | The key whose vale is to be changed. |
value | The new value. |
Implements AIDA::IAnnotation.
int IAnnotationROOT::size |
( |
| ) |
const |
|
virtual |
std::string IAnnotationROOT::value |
( |
const std::string & |
key | ) |
const |
|
virtual |
Retrieve the value for a given key.
- Parameters
-
- Returns
- The corresponding value.
Implements AIDA::IAnnotation.
std::string IAnnotationROOT::value |
( |
int |
index | ) |
const |
|
virtual |
The documentation for this class was generated from the following files: