2 #ifndef GAUDISVC_ANNOTATION_H
3 #define GAUDISVC_ANNOTATION_H 1
12 #include "AIDA/IAnnotation.h"
95 if ( iKey == m_identifiers.
end() )
return false;
97 unsigned int indexToBeRemoved = iKey->second;
100 if ( m_annotationItems[indexToBeRemoved].m_sticky )
return false;
104 m_identifiers.
clear();
106 if ( m_annotationItems.size() > 1 ) m_annotationItemsNew.
reserve( m_annotationItems.size() - 1 );
107 for (
unsigned int iItem = 0; iItem < m_annotationItems.size(); ++iItem ) {
108 if ( iItem == indexToBeRemoved )
continue;
113 m_annotationItems = m_annotationItemsNew;
120 if ( iKey == m_identifiers.
end() )
return emptyString;
121 return ( m_annotationItems[ iKey->second ] ).m_value;
127 if ( iKey == m_identifiers.
end() )
131 ( m_annotationItems[ iKey->second ] ).m_value = value;
137 if ( iKey == m_identifiers.
end() )
return;
138 ( m_annotationItems[ iKey->second ] ).m_sticky = sticky;
142 return m_annotationItems.size();
147 if ( index < 0 || index >= static_cast<int>(m_annotationItems.size()) )
return emptyString;
148 return ( m_annotationItems[ index ] ).m_key;
153 if ( index < 0 || index >= static_cast<int>(m_annotationItems.size()) )
return emptyString;
154 return ( m_annotationItems[ index ] ).m_value;
161 itemsToRemove.
reserve( size() );
163 if ( ! ( m_annotationItems[
item ] ).m_sticky ) {
164 itemsToRemove.
push_back( ( m_annotationItems[ item ] ).m_key );
168 for (
unsigned int i = 0;
i < itemsToRemove.
size(); ++
i ) removeItem( itemsToRemove[
i] );