5 #ifndef ATHENAPOOLUTILITIES_ATHENAATTRIBUTELISTSPECIFICATION_H
6 #define ATHENAPOOLUTILITIES_ATHENAATTRIBUTELISTSPECIFICATION_H
16 #include "CoralBase/AttributeSpecification.h"
17 #include "CoralBase/AttributeListException.h"
18 #include "CoralBase/AttributeListSpecification.h"
23 #include "GaudiKernel/System.h"
57 template<
typename T>
void extend(
const std::string&
name,
const std::string& unitName =
"UNKNOWN",
const std::string&
groupName =
"UNKNOWN" );
61 const std::string& unitName=
"UNKNOWN",
64 const std::type_info&
type,
65 const std::string& unitName=
"UNKNOWN",
81 int index(
const std::string&
name )
const;
90 void coralSpec(coral::AttributeListSpecification&)
const;
103 const_iterator( std::vector< AthenaAttributeSpecification* >::const_iterator theIterator );
113 std::vector< AthenaAttributeSpecification* >::const_iterator
m_iterator;
148 template<
typename T>
void
177 m_iterator( rhs.m_iterator )
189 m_iterator( theIterator )
232 return ( ! ( *
this == rhs ) );
245 m_attributeSpecifications(),
246 m_mapOfNameToIndex( rhs.m_mapOfNameToIndex )
248 for ( std::vector< AthenaAttributeSpecification* >::const_iterator iSpecification = rhs.
m_attributeSpecifications.begin();
257 m_attributeSpecifications(),
261 for ( coral::AttributeListSpecification::const_iterator iSpecification = rhs.begin();
262 iSpecification != rhs.end(); ++iSpecification )
264 this->
extend(iSpecification->name(),iSpecification->typeName());
296 const std::string& unitName,
300 throw coral::AttributeListException(
"An attribute with the name \"" +
name +
"\" exists already" );
308 const std::type_info& typeInfo,
309 const std::string& unitName,
312 std::string
typeName = System::typeinfoName(typeInfo);
314 throw coral::AttributeListException(
"An attribute with the name \"" +
name +
"\" exists already" );
325 throw coral::AttributeListException(
"An attribute with the name \"" +
name +
"\" exists already" );
335 throw coral::AttributeListException(
"An attribute with the name \"" + aas.
name() +
"\" exists already" );
346 else return iSpecificationForAttribute->second;
354 throw coral::AttributeListException(
"Invalid index for the attribute already" );
368 s.extend(
i->name(),
i->attributeType().typeName() );
376 if ( this->
size() != rhs.
size() )
return false;
377 size_t theSize = this->
size();
379 for (
size_t i = 0;
i < theSize; ++
i )
381 if ( lhs[
i] != rhs[
i] )