2 #ifndef GAUDISVC_ANNOTATION_H 3 #define GAUDISVC_ANNOTATION_H 1 10 #include "AIDA/IAnnotation.h" 37 int size()
const override;
44 void reset()
override;
82 unsigned int indexToBeRemoved = iKey->second;
93 if ( iItem == indexToBeRemoved )
continue;
95 annotationItemsNew.
emplace_back( item.m_key, item.m_value, item.m_sticky );
144 if ( !item.m_sticky ) itemsToRemove.
push_back( item.m_key );
146 for (
const auto& i : itemsToRemove )
removeItem( i );
void setSticky(const std::string &key, bool sticky) override
Set sticky for a given key.
std::string key(int index) const override
Individual access to the Annotation-items.
void setValue(const std::string &key, const std::string &value) override
Set value for a given key.
Internal private annotation item class.
bool addItem(const std::string &key, const std::string &value, bool sticky=false) override
Add a key/value pair with a given sticky.
int size() const override
Get the number of items in the Annotation.
std::vector< AnnotationItem > m_annotationItems
The vector of the annotation items.
AnnotationItem(std::string k="", std::string v="", bool vis=true)
Implementation of the AIDA IAnnotation interface class.
std::map< std::string, unsigned int > m_identifiers
The map of strings to identifiers.
std::string value(const std::string &key) const override
Retrieve the value for a given key.
void reset() override
Remove all the non-sticky items.
~AnnotationItem()=default
bool removeItem(const std::string &key) override
Remove the item indicated by a given key.