ATLAS Offline Software
|
#include <DataBucket.h>
Public Member Functions | |
DataBucket () | |
DataBucket (T *data) | |
template<class U > | |
DataBucket (std::unique_ptr< U > data) | |
virtual | ~DataBucket () |
virtual const CLID & | clID () const override |
virtual void * | object () override |
virtual const std::type_info & | tinfo () const override |
Return the type_info for the stored object. More... | |
operator T* () | |
operator const T * () const | |
virtual void * | cast (CLID clid, IRegisterTransient *irt=0, bool isConst=true) override |
Return the contents of the DataBucket , converted to type given by clid. More... | |
virtual void * | cast (const std::type_info &tinfo, IRegisterTransient *irt=0, bool isConst=true) override |
Return the contents of the DataBucket , converted to type given by std::type_info. More... | |
virtual void * | cast (CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true) override |
Return the contents of the DataBucket , converted to type given by clid. More... | |
virtual void | relinquish () override |
Give up ownership of the DataBucket contents. More... | |
virtual void | lock () override |
If the held object derives from ILockable , call lock() on it. More... | |
template<class T > | |
T * | cast (SG::IRegisterTransient *irt=0, bool isConst=true) |
Return the contents of the DataBucket , converted to type T. More... | |
Static Public Member Functions | |
static const CLID & | classID () |
Protected Member Functions | |
T * | ptr () |
const T * | cptr () const |
void * | tryStaticConversion (CLID clid) |
Try a conversion using static SG_BASES information. More... | |
void * | tryStaticConversion (const std::type_info &tinfo) |
Try a conversion using static SG_BASES information. More... | |
Private Types | |
typedef std::pair< const CopyConversionBase *, void * > | ent_t |
Objects made by copy conversion. More... | |
typedef std::vector< ent_t > | vec_t |
Private Member Functions | |
DataBucket (const DataBucket &) | |
DataBucket & | operator= (const DataBucket &) |
Private Attributes | |
T * | m_ptr |
vec_t | m_cnvcopies |
Definition at line 29 of file DataBucket.h.
|
private |
Objects made by copy conversion.
Definition at line 158 of file DataBucket.h.
|
private |
Definition at line 159 of file DataBucket.h.
|
inline |
Definition at line 35 of file DataBucket.h.
SG::DataBucket< T >::DataBucket | ( | T * | data | ) |
|
virtual |
|
private |
|
overridevirtual |
Return the contents of the DataBucket
, converted to type given by clid.
Note that only derived->base conversions are allowed here.
clid | The class ID to which to convert. |
tinfo | The std::type_info of the type to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
This allows the callee to choose whether to use clid or tinfo. Here we use clid.
Reimplemented from DataBucketBase.
Reimplemented in SG::DVLDataBucket< T >, SG::DVLDataBucket< DV >, and SG::MetaContDataBucket< T >.
|
overridevirtual |
Return the contents of the DataBucket
, converted to type given by clid.
Note that only derived->base conversions are allowed here.
clid | The class ID to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
Implements DataBucketBase.
Reimplemented in SG::DVLDataBucket< T >, SG::DVLDataBucket< DV >, and SG::MetaContDataBucket< T >.
|
overridevirtual |
Return the contents of the DataBucket
, converted to type given by std::type_info.
Note that only derived->base conversions are allowed here.
clid | The std::type_info of the type to which to convert. |
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
Implements DataBucketBase.
Reimplemented in SG::DVLDataBucket< T >, SG::DVLDataBucket< DV >, and SG::MetaContDataBucket< T >.
|
inherited |
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.
irt | To be called if we make a new instance. |
isConst | True if the object being converted is regarded as const. |
|
static |
|
overridevirtual |
Reimplemented in SG::DVLDataBucket< T >, and SG::DVLDataBucket< DV >.
|
inlineprotected |
Definition at line 131 of file DataBucket.h.
|
overridevirtual |
If the held object derives from ILockable
, call lock()
on it.
Implements DataBucketBase.
|
inlineoverridevirtual |
Implements DataBucketBase.
Definition at line 49 of file DataBucket.h.
|
inline |
Definition at line 72 of file DataBucket.h.
|
inline |
Definition at line 71 of file DataBucket.h.
|
private |
|
inlineprotected |
Definition at line 130 of file DataBucket.h.
|
inlineoverridevirtual |
Give up ownership of the DataBucket
contents.
This leaks the contents and it is useful mainly for error handling.
Implements DataBucketBase.
Definition at line 121 of file DataBucket.h.
|
inlineoverridevirtual |
Return the type_info
for the stored object.
Implements DataBucketBase.
Reimplemented in SG::DVLDataBucket< T >, and SG::DVLDataBucket< DV >.
Definition at line 58 of file DataBucket.h.
|
protected |
Try a conversion using static SG_BASES information.
clid | The class ID to which to convert. |
This can all be unfolded at compile time, so is fast, but doesn't take into account SG_ADD_BASES.
|
protected |
Try a conversion using static SG_BASES information.
tinfo | The std::type_info of the type to which to convert. |
This can all be unfolded at compile time, so is fast, but doesn't take into account SG_ADD_BASES.
|
private |
Definition at line 160 of file DataBucket.h.
|
private |
Definition at line 155 of file DataBucket.h.