RAIDA  1.9.0
IAnnotation.h
1 // -*- C++ -*-
2 // AID-GENERATED
3 // =========================================================================
4 // This class was generated by AID - Abstract Interface Definition
5 // DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
6 // =========================================================================
7 #ifndef AIDA_IANNOTATION_H
8 #define AIDA_IANNOTATION_H 1
9 
10 // This file is part of the AIDA library
11 // Copyright (C) 2002 by the AIDA team. All rights reserved.
12 // This library is free software and under the terms of the
13 // GNU Library General Public License described in the LGPL.txt
14 
15 #include <string>
16 
17 namespace AIDA {
18 
28 class IAnnotation {
29 
30 public:
32  virtual ~IAnnotation() { /* nop */; }
33 
51  virtual bool addItem(const std::string & key, const std::string & value, bool sticky = false) = 0;
52 
60  virtual bool removeItem(const std::string & key) = 0;
61 
68  virtual std::string value(const std::string & key) const = 0;
69 
76  virtual void setValue(const std::string & key, const std::string & value) = 0;
77 
84  virtual void setSticky(const std::string & key, bool sticky) = 0;
85 
91  virtual int size() const = 0;
92 
99  virtual std::string key(int index) const = 0;
100 
107  virtual std::string value(int index) const = 0;
108 
113  virtual void reset() = 0;
114 }; // class
115 } // namespace AIDA
116 #endif /* ifndef AIDA_IANNOTATION_H */
virtual void reset()=0
Remove all the non-sticky items.
virtual void setSticky(const std::string &key, bool sticky)=0
Set the sticky flag for a given key.
virtual bool addItem(const std::string &key, const std::string &value, bool sticky=false)=0
The list of the commonly accepted keys : &quot;Title&quot; for the title.
virtual std::string key(int index) const =0
Get the key at a given position within the IAnnotation.
virtual ~IAnnotation()
Destructor.
Definition: IAnnotation.h:32
virtual std::string value(const std::string &key) const =0
Retrieve the value for a given key.
virtual int size() const =0
Get the size of the IAnnotation, i.e.
virtual bool removeItem(const std::string &key)=0
Remove the item indicated by a given key.
virtual void setValue(const std::string &key, const std::string &value)=0
Set the value for a given key.
The annotation holds arbitrary information represented with (key,value) pairs of strings.
Definition: IAnnotation.h:28