ATLAS Offline Software
Loading...
Searching...
No Matches
DataBucketBase Class Referenceabstract

A non-templated base class for DataBucket, allows to access the transient object address as a void*. More...

#include <DataBucketBase.h>

Inheritance diagram for DataBucketBase:
Collaboration diagram for DataBucketBase:

Public Member Functions

 DataBucketBase ()
virtual ~DataBucketBase ()
virtual void * object ()=0
virtual const std::type_info & tinfo () const =0
 Return the type_info for the stored object.
template<class T>
T * cast (SG::IRegisterTransient *irt=0, bool isConst=true)
 Return the contents of the DataBucket, converted to type T.
virtual void * cast (CLID clid, SG::IRegisterTransient *irt=0, bool isConst=true)=0
 Return the contents of the DataBucket, converted to type given by clid.
virtual void * cast (const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true)=0
 Return the contents of the DataBucket, converted to type given by std::type_info.
virtual void * cast (CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true)
 Return the contents of the DataBucket, converted to type given by clid.
virtual void relinquish ()=0
 Give up ownership of the DataBucket contents.
virtual void lock ()=0
 If the held object derives from ILockable, call lock() on it.

Detailed Description

A non-templated base class for DataBucket, allows to access the transient object address as a void*.

Author
ATLAS Collaboration
Id
DataBucketBase.h,v 1.7 2008-05-30 22:58:46 calaf Exp

Definition at line 23 of file DataBucketBase.h.

Constructor & Destructor Documentation

◆ DataBucketBase()

DataBucketBase::DataBucketBase ( )
inline

Definition at line 28 of file DataBucketBase.h.

28{ };

◆ ~DataBucketBase()

virtual DataBucketBase::~DataBucketBase ( )
inlinevirtual

Definition at line 29 of file DataBucketBase.h.

29{ };

Member Function Documentation

◆ cast() [1/4]

virtual void * DataBucketBase::cast ( CLID clid,
const std::type_info & tinfo,
SG::IRegisterTransient * irt = 0,
bool isConst = true )
virtual

Return the contents of the DataBucket, converted to type given by clid.

Note that only derived->base conversions are allowed here.

Parameters
clidThe class ID to which to convert.
tinfoThe std::type_info of the type to which to convert.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

This allows the callee to choose whether to use clid or tinfo. By default, this uses type_info.

Reimplemented in Athena::DataBucketBranch, BareDataBucket, SG::DataBucket< T >, SG::DVLDataBucket< T >, SG::DVLDataBucket< U >, SG::MetaContDataBucket< T >, SG::MetaContDataBucket< U >, SG::PyDataBucket, SG::SymlinkDataObject, and xAODPrivate::HolderBucket.

◆ cast() [2/4]

virtual void * DataBucketBase::cast ( CLID clid,
SG::IRegisterTransient * irt = 0,
bool isConst = true )
pure virtual

Return the contents of the DataBucket, converted to type given by clid.

Note that only derived->base conversions are allowed here.

Parameters
clidThe class ID to which to convert.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

Implemented in Athena::DataBucketBranch, BareDataBucket, SG::DataBucket< T >, SG::DataBucket< DV >, SG::DVLDataBucket< T >, SG::DVLDataBucket< DV >, SG::DVLDataBucket< U >, SG::MetaContDataBucket< T >, SG::MetaContDataBucket< U >, SG::PyDataBucket, SG::SymlinkDataObject, and xAODPrivate::HolderBucket.

◆ cast() [3/4]

virtual void * DataBucketBase::cast ( const std::type_info & tinfo,
SG::IRegisterTransient * irt = 0,
bool isConst = true )
pure virtual

Return the contents of the DataBucket, converted to type given by std::type_info.

Note that only derived->base conversions are allowed here.

Parameters
tinfoThe std::type_info of the type to which to convert.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

Implemented in Athena::DataBucketBranch, BareDataBucket, SG::DataBucket< T >, SG::DVLDataBucket< T >, SG::DVLDataBucket< U >, SG::MetaContDataBucket< T >, SG::MetaContDataBucket< U >, SG::PyDataBucket, SG::SymlinkDataObject, and xAODPrivate::HolderBucket.

◆ cast() [4/4]

template<class T>
T * DataBucketBase::cast ( SG::IRegisterTransient * irt = 0,
bool isConst = true )

Return the contents of the DataBucket, converted to type T.

Note that only derived->base conversions are allowed here. T must have a valid Class ID for this to work.

Parameters
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

◆ lock()

virtual void DataBucketBase::lock ( )
pure virtual

◆ object()

◆ relinquish()

virtual void DataBucketBase::relinquish ( )
pure virtual

Give up ownership of the DataBucket contents.

This leaks the contents and it is useful mainly for error handling.

Implemented in Athena::DataBucketBranch, BareDataBucket, SG::DataBucket< T >, SG::DataBucket< DV >, SG::PyDataBucket, SG::SymlinkDataObject, and xAODPrivate::HolderBucket.

◆ tinfo()

virtual const std::type_info & DataBucketBase::tinfo ( ) const
pure virtual

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