Implementation of the AIDA IAnnotation interface class.
More...
#include <src/HistogramSvc/Annotation.h>
Implementation of the AIDA IAnnotation interface class.
Definition at line 18 of file Annotation.h.
AIDA::Annotation::Annotation |
( |
| ) |
|
|
default |
AIDA::Annotation::~Annotation |
( |
| ) |
|
|
overridedefault |
bool AIDA::Annotation::addItem |
( |
const std::string & |
key, |
|
|
const std::string & |
value, |
|
|
bool |
sticky = false |
|
) |
| |
|
inline |
Add a key/value pair with a given sticky.
Definition at line 80 of file Annotation.h.
std::map< std::string, unsigned int > m_identifiers
The map of strings to identifiers.
std::string value(const std::string &key) const
Retrieve the value for a given key.
std::string key(int index) const
Individual access to the Annotation-items.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
std::string AIDA::Annotation::key |
( |
int |
index | ) |
const |
|
inline |
Individual access to the Annotation-items.
Definition at line 141 of file Annotation.h.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
bool AIDA::Annotation::removeItem |
( |
const std::string & |
key | ) |
|
|
inline |
Remove the item indicated by a given key.
Definition at line 90 of file Annotation.h.
94 unsigned int indexToBeRemoved = iKey->second;
102 std::vector< AnnotationItem > annotationItemsNew;
105 if ( iItem == indexToBeRemoved )
continue;
107 annotationItemsNew.emplace_back(
item.m_key,
item.m_value,
item.m_sticky );
std::map< std::string, unsigned int > m_identifiers
The map of strings to identifiers.
std::string key(int index) const
Individual access to the Annotation-items.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
void AIDA::Annotation::reset |
( |
| ) |
|
|
inline |
Remove all the non-sticky items.
Definition at line 153 of file Annotation.h.
156 std::vector< std::string > itemsToRemove;
157 itemsToRemove.reserve(
size() );
159 if ( !
item.m_sticky ) itemsToRemove.push_back(
item.m_key );
bool removeItem(const std::string &key)
Remove the item indicated by a given key.
int size() const
Get the number of items in the Annotation.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
void AIDA::Annotation::setSticky |
( |
const std::string & |
key, |
|
|
bool |
sticky |
|
) |
| |
|
inline |
Set sticky for a given key.
Definition at line 131 of file Annotation.h.
std::map< std::string, unsigned int > m_identifiers
The map of strings to identifiers.
std::string key(int index) const
Individual access to the Annotation-items.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
void AIDA::Annotation::setValue |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
inline |
Set value for a given key.
Definition at line 121 of file Annotation.h.
std::map< std::string, unsigned int > m_identifiers
The map of strings to identifiers.
std::string value(const std::string &key) const
Retrieve the value for a given key.
bool addItem(const std::string &key, const std::string &value, bool sticky=false)
Add a key/value pair with a given sticky.
std::string key(int index) const
Individual access to the Annotation-items.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
int AIDA::Annotation::size |
( |
| ) |
const |
|
inline |
Get the number of items in the Annotation.
Definition at line 137 of file Annotation.h.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
std::string AIDA::Annotation::value |
( |
const std::string & |
key | ) |
const |
|
inline |
Retrieve the value for a given key.
Definition at line 114 of file Annotation.h.
std::map< std::string, unsigned int > m_identifiers
The map of strings to identifiers.
std::string key(int index) const
Individual access to the Annotation-items.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
std::string AIDA::Annotation::value |
( |
int |
index | ) |
const |
|
inline |
Definition at line 147 of file Annotation.h.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
std::string AIDA::Annotation::emptyString |
|
private |
The vector of the annotation items.
Definition at line 71 of file Annotation.h.
std::map< std::string, unsigned int > AIDA::Annotation::m_identifiers |
|
private |
The map of strings to identifiers.
Definition at line 74 of file Annotation.h.
The documentation for this class was generated from the following file: