RAIDA  1.9.0
IAnnotationROOT.h
1 // -*- C++ -*-
2 #ifndef AIDA_IANNOTATIONROOT_H
3 #define AIDA_IANNOTATIONROOT_H 1
4 
5 #include <string>
6 #include <AIDA/IAnnotation.h>
7 
8 namespace AIDA {
9 
19 class IAnnotationROOT : public IAnnotation {
20 
21 public:
23  virtual ~IAnnotationROOT() { /* nop */; }
24 
25  IAnnotationROOT() { /* nop */; }
26 
44  virtual bool addItem(const std::string & key,
45  const std::string & value,
46  bool sticky = false) ;
47 
55  virtual bool removeItem(const std::string & key) ;
56 
63  virtual std::string value(const std::string & key) const ;
64 
71  virtual void setValue(const std::string & key,
72  const std::string & value) ;
73 
80  virtual void setSticky(const std::string & key, bool sticky) ;
81 
87  virtual int size() const ;
88 
95  virtual std::string key(int index) const ;
96 
103  virtual std::string value(int index) const ;
104 
109  virtual void reset() ;
110 }; // class
111 } // namespace AIDA
112 #endif /* ifndef AIDA_IANNOTATIONROOT_H */
virtual void setSticky(const std::string &key, bool sticky)
Set the sticky flag for a given key.
Definition: IAnnotationROOT.cc:33
virtual bool addItem(const std::string &key, const std::string &value, bool sticky=false)
The list of the commonly accepted keys : &quot;Title&quot; for the title.
Definition: IAnnotationROOT.cc:7
The annotation holds arbitrary information represented with (key,value) pairs of strings.
Definition: IAnnotationROOT.h:19
virtual ~IAnnotationROOT()
Destructor.
Definition: IAnnotationROOT.h:23
virtual std::string key(int index) const
Get the key at a given position within the IAnnotation.
Definition: IAnnotationROOT.cc:44
virtual bool removeItem(const std::string &key)
Remove the item indicated by a given key.
Definition: IAnnotationROOT.cc:15
virtual void setValue(const std::string &key, const std::string &value)
Set the value for a given key.
Definition: IAnnotationROOT.cc:27
virtual int size() const
Get the size of the IAnnotation, i.e.
Definition: IAnnotationROOT.cc:38
virtual void reset()
Remove all the non-sticky items.
Definition: IAnnotationROOT.cc:56
virtual std::string value(const std::string &key) const
Retrieve the value for a given key.
Definition: IAnnotationROOT.cc:21
The annotation holds arbitrary information represented with (key,value) pairs of strings.
Definition: IAnnotation.h:28