ATLAS Offline Software
Loading...
Searching...
No Matches
pool::PersistencySvc::Container Class Reference

Container is an implementation of the IContainer interface. More...

#include <Container.h>

Inheritance diagram for pool::PersistencySvc::Container:
Collaboration diagram for pool::PersistencySvc::Container:

Public Member Functions

 Container (FileDescriptor &fileDescriptor, long technology, const std::string &name)
 ~Container ()
 destructor
virtual const std::string & parentDatabaseName () const override
 Returns the name (fid) of the parent database.
virtual long technology () const override
 Returns the technology identifier for this container.
virtual ITokenIteratortokens () override
 Starts an iteration over the tokens in the container.
virtual const ITechnologySpecificAttributestechnologySpecificAttributes () const override
 Returns the object holding the technology specific attributes for a given technology domain.
virtual ITechnologySpecificAttributestechnologySpecificAttributes () override
const std::string & name () const
 Returns the name of this container.
template<class T>
attribute (const std::string &attributeName, const std::string &option="")
 Templated method to retrieve an attribute.
template<class T>
bool setAttribute (const std::string &attributeName, const T &atttibuteValue, const std::string &option="")
 Templated method to set an attribute.

Protected Member Functions

virtual bool attributeOfType (const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) override
 The actual method returning the attribute data given a name.
virtual bool setAttributeOfType (const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option) override
 The actual method setting the attribute data given a name.

Private Attributes

FileDescriptorm_fileDescriptor
 Reference to file descriptor of the parent database.
long m_technology
 The technology identifier.
std::string m_name
 The name of the container.

Detailed Description

Container is an implementation of the IContainer interface.

Definition at line 25 of file Container.h.

Constructor & Destructor Documentation

◆ Container()

pool::PersistencySvc::Container::Container ( FileDescriptor & fileDescriptor,
long technology,
const std::string & name )

◆ ~Container()

pool::PersistencySvc::Container::~Container ( )

destructor

Member Function Documentation

◆ attribute()

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

Templated method to retrieve an attribute.

Definition at line 25 of file ITechnologySpecificAttributes.h.

26 {
27 T data;
28 const std::type_info& typeInfo = typeid(T);
29 if ( ! this->attributeOfType( attributeName,
30 static_cast< void* >( &data ),
31 typeInfo,
32 option ) ) {
33 std::ostringstream error;
34 error << "Failed to retrieve attribute " << attributeName << " of type " << typeInfo.name();
35 throw std::runtime_error( error.str() + " (APR: \" ITechnologySpecificAttributes \" from \" PersistencySvc \")");
36 }
37 return data;
38 }
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
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.
unsigned long long T

◆ attributeOfType()

virtual bool pool::PersistencySvc::Container::attributeOfType ( const std::string & attributeName,
void * data,
const std::type_info & typeInfo,
const std::string & option )
overrideprotectedvirtual

The actual method returning the attribute data given a name.

Implements pool::ITechnologySpecificAttributes.

◆ name()

const std::string & pool::IContainer::name ( ) const
inherited

Returns the name of this container.

◆ parentDatabaseName()

virtual const std::string & pool::PersistencySvc::Container::parentDatabaseName ( ) const
overridevirtual

Returns the name (fid) of the parent database.

Implements pool::IContainer.

◆ setAttribute()

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

Templated method to set an attribute.

Definition at line 41 of file ITechnologySpecificAttributes.h.

43 {
44 return this->setAttributeOfType( attributeName,
45 static_cast< const void* >( &atttibuteValue ),
46 typeid(T),
47 option );
48 }
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.

◆ setAttributeOfType()

virtual bool pool::PersistencySvc::Container::setAttributeOfType ( const std::string & attributeName,
const void * data,
const std::type_info & typeInfo,
const std::string & option )
overrideprotectedvirtual

The actual method setting the attribute data given a name.

Implements pool::ITechnologySpecificAttributes.

◆ technology()

virtual long pool::PersistencySvc::Container::technology ( ) const
overridevirtual

Returns the technology identifier for this container.

Implements pool::IContainer.

◆ technologySpecificAttributes() [1/2]

virtual const ITechnologySpecificAttributes & pool::PersistencySvc::Container::technologySpecificAttributes ( ) const
overridevirtual

Returns the object holding the technology specific attributes for a given technology domain.

Implements pool::IContainer.

◆ technologySpecificAttributes() [2/2]

virtual ITechnologySpecificAttributes & pool::PersistencySvc::Container::technologySpecificAttributes ( )
overridevirtual

Implements pool::IContainer.

◆ tokens()

virtual ITokenIterator * pool::PersistencySvc::Container::tokens ( )
overridevirtual

Starts an iteration over the tokens in the container.

Returns a token iterator whose ownership is passed to the user.

Implements pool::IContainer.

Member Data Documentation

◆ m_fileDescriptor

FileDescriptor& pool::PersistencySvc::Container::m_fileDescriptor
private

Reference to file descriptor of the parent database.

Definition at line 67 of file Container.h.

◆ m_name

std::string pool::IContainer::m_name
privateinherited

The name of the container.

Definition at line 52 of file IContainer.h.

◆ m_technology

long pool::PersistencySvc::Container::m_technology
private

The technology identifier.

Definition at line 70 of file Container.h.


The documentation for this class was generated from the following file: