![]() |
ATLAS Offline Software
|
DataBucket holding the object as an untyped (void*) pointer. More...
#include <TypelessDataBucket.h>
Public Member Functions | |
| TypelessDataBucket (void *object, const SG::BaseInfoBase &bib) | |
| Constructor. | |
| ~TypelessDataBucket () | |
| Destructor. | |
| virtual const CLID & | clID () const override |
| Return the CLID. | |
| virtual void * | object () override |
| Return the pointer as a void*. | |
| virtual const std::type_info & | tinfo () const override |
Return the type_info for the stored object. | |
| virtual void * | cast (CLID clid, SG::IRegisterTransient *irt=0, bool isConst=true) override |
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) override |
Return the contents of the DataBucket, converted to type given by std::type_info. | |
| virtual void | relinquish () override |
Give up ownership of the DataBucket contents. | |
| virtual void | lock () override |
If the held object derives from ILockable, call lock() on it. | |
| template<class T> | |
| T * | cast (SG::IRegisterTransient *irt=0, bool isConst=true) |
| Make visible the template version from the base class. | |
| virtual void * | cast (CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true) |
| Make visible the template version from the base class. | |
Private Attributes | |
| void * | m_object |
| The held object. | |
| const SG::BaseInfoBase & | m_bib |
| Type information for the held object. | |
| CLID | m_clid |
| CLID of the held object. | |
DataBucket holding the object as an untyped (void*) pointer.
Type information is provided via a BaseInfoBase object.
Definition at line 25 of file TypelessDataBucket.h.
| TypelessDataBucket::TypelessDataBucket | ( | void * | object, |
| const SG::BaseInfoBase & | bib ) |
Constructor.
| object | The object to be held. The DataBucket takes ownership. |
Definition at line 19 of file TypelessDataBucket.cxx.
| TypelessDataBucket::~TypelessDataBucket | ( | ) |
|
virtual |
Make visible the template version from the base class.
Reimplemented from DataBucketBase.
|
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.
Definition at line 72 of file TypelessDataBucket.cxx.
|
overridevirtual |
Return the contents of the DataBucket, converted to type given by std::type_info.
Note that only derived->base conversions are allowed here.
| 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. |
Implements DataBucketBase.
Definition at line 93 of file TypelessDataBucket.cxx.
| T * DataBucketBase::cast | ( | SG::IRegisterTransient * | irt = 0, |
| bool | isConst = true ) |
Make visible the template version from the base class.
|
overridevirtual |
If the held object derives from ILockable, call lock() on it.
Not implemented for this type.
Implements DataBucketBase.
Definition at line 117 of file TypelessDataBucket.cxx.
|
overridevirtual |
Return the pointer as a void*.
Implements DataBucketBase.
Definition at line 49 of file TypelessDataBucket.cxx.
|
overridevirtual |
Give up ownership of the DataBucket contents.
This leaks the contents and it is useful mainly for error handling.
Implements DataBucketBase.
Definition at line 106 of file TypelessDataBucket.cxx.
|
overridevirtual |
Return the type_info for the stored object.
Implements DataBucketBase.
Definition at line 58 of file TypelessDataBucket.cxx.
|
private |
Type information for the held object.
Definition at line 110 of file TypelessDataBucket.h.
|
private |
CLID of the held object.
Definition at line 113 of file TypelessDataBucket.h.
|
private |
The held object.
Definition at line 107 of file TypelessDataBucket.h.