ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | List of all members
pool::ITechnologySpecificAttributes Class Referenceabstract

#include <PersistencySvc/ITechnologySpecificAttributes.h>

Inheritance diagram for pool::ITechnologySpecificAttributes:
Collaboration diagram for pool::ITechnologySpecificAttributes:

Classes

class  Exception
 Exception thrown by the ITechnologySpecificAttributes class. More...
 

Public Member Functions

template<class T >
attribute (const std::string &attributeName, const std::string &option="")
 Templated method to retrieve an attribute. More...
 
template<class T >
bool setAttribute (const std::string &attributeName, const T &atttibuteValue, const std::string &option="")
 Templated method to set an attribute. More...
 

Protected Member Functions

virtual ~ITechnologySpecificAttributes ()
 Default destructor. More...
 
virtual bool attributeOfType (const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option)=0
 The actual method returning the attribute data given a name. More...
 
virtual bool setAttributeOfType (const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option)=0
 The actual method setting the attribute data given a name. More...
 

Detailed Description

ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes

Definition at line 22 of file ITechnologySpecificAttributes.h.

Constructor & Destructor Documentation

◆ ~ITechnologySpecificAttributes()

virtual pool::ITechnologySpecificAttributes::~ITechnologySpecificAttributes ( )
inlineprotectedvirtual

Default destructor.

Definition at line 64 of file ITechnologySpecificAttributes.h.

64 {}

Member Function Documentation

◆ attribute()

template<class T >
T pool::ITechnologySpecificAttributes::attribute ( const std::string &  attributeName,
const std::string &  option = "" 
)
inline

Templated method to retrieve an attribute.

Definition at line 37 of file ITechnologySpecificAttributes.h.

38  {
39  T data;
40  const std::type_info& typeInfo = typeid(T);
41  if ( ! this->attributeOfType( attributeName,
42  static_cast< void* >( &data ),
43  typeInfo,
44  option ) ) {
45  std::ostringstream error;
46  error << "Failed to retrieve attribute " << attributeName << " of type " << typeInfo.name();
47  throw Exception( error.str() );
48  }
49  return data;
50  }

◆ attributeOfType()

virtual bool pool::ITechnologySpecificAttributes::attributeOfType ( const std::string &  attributeName,
void *  data,
const std::type_info &  typeInfo,
const std::string &  option 
)
protectedpure virtual

The actual method returning the attribute data given a name.

Implemented in pool::PersistencySvc::UserDatabase, pool::PersistencySvc::MicroSessionManager, and pool::PersistencySvc::Container.

◆ setAttribute()

template<class T >
bool pool::ITechnologySpecificAttributes::setAttribute ( const std::string &  attributeName,
const T &  atttibuteValue,
const std::string &  option = "" 
)
inline

Templated method to set an attribute.

Definition at line 53 of file ITechnologySpecificAttributes.h.

55  {
56  return this->setAttributeOfType( attributeName,
57  static_cast< const void* >( &atttibuteValue ),
58  typeid(T),
59  option );
60  }

◆ setAttributeOfType()

virtual bool pool::ITechnologySpecificAttributes::setAttributeOfType ( const std::string &  attributeName,
const void *  data,
const std::type_info &  typeInfo,
const std::string &  option 
)
protectedpure virtual

The actual method setting the attribute data given a name.

Implemented in pool::PersistencySvc::UserDatabase, pool::PersistencySvc::MicroSessionManager, and pool::PersistencySvc::Container.


The documentation for this class was generated from the following file:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
pool::ITechnologySpecificAttributes::setAttributeOfType
virtual bool setAttributeOfType(const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option)=0
The actual method setting the attribute data given a name.
pool::ITechnologySpecificAttributes::attributeOfType
virtual bool attributeOfType(const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option)=0
The actual method returning the attribute data given a name.
get_generator_info.error
error
Definition: get_generator_info.py:40
error
Definition: IImpactPoint3dEstimator.h:70
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35