RAIDA  1.9.0
Public Member Functions | List of all members
AIDA::IAnnotationROOT Class Reference

The annotation holds arbitrary information represented with (key,value) pairs of strings. More...

#include <IAnnotationROOT.h>

Inheritance diagram for AIDA::IAnnotationROOT:
AIDA::IAnnotation

Public Member Functions

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.
 
- Public Member Functions inherited from AIDA::IAnnotation
virtual ~IAnnotation ()
 Destructor.
 

Detailed Description

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

Member Function Documentation

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
keyThe key to be added.
valueThe key's value.
stickyThe 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

Get the key at a given position within the IAnnotation.

Parameters
indexThe key's position within the IAnnotation.
Returns
The corresponding key.

Implements AIDA::IAnnotation.

bool IAnnotationROOT::removeItem ( const std::string &  key)
virtual

Remove the item indicated by a given key.

Parameters
keyThe 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
keyThe key whose stick flag is to be set.
stickyThe 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
keyThe key whose vale is to be changed.
valueThe new value.

Implements AIDA::IAnnotation.

int IAnnotationROOT::size ( ) const
virtual

Get the size of the IAnnotation, i.e.

the number of keys contained in it.

Returns
The size of the IAnnotation.

Implements AIDA::IAnnotation.

std::string IAnnotationROOT::value ( const std::string &  key) const
virtual

Retrieve the value for a given key.

Parameters
keyThe key.
Returns
The corresponding value.

Implements AIDA::IAnnotation.

std::string IAnnotationROOT::value ( int  index) const
virtual

Get the value at a given position within the IAnnotation.

Parameters
indexThe value's position within the IAnnotation.
Returns
The corresponding value.

Implements AIDA::IAnnotation.


The documentation for this class was generated from the following files: