Allows to insert void* returned from serialisation into the store.
More...
#include <BareDataBucket.h>
|
| | BareDataBucket ()=delete |
| | BareDataBucket (void *data, CLID clid, RootType type) |
| virtual | ~BareDataBucket () override |
| | BareDataBucket (const BareDataBucket &)=delete |
| | BareDataBucket (BareDataBucket &&)=delete |
| BareDataBucket & | operator= (const BareDataBucket &)=delete |
| BareDataBucket & | operator= (BareDataBucket &&)=delete |
| 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.
|
| virtual void * | cast (CLID clid, SG::IRegisterTransient *, 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 *, 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) |
| | Return the contents of the DataBucket, converted to type T.
|
| 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.
|
Allows to insert void* returned from serialisation into the store.
Definition at line 14 of file BareDataBucket.h.
◆ BareDataBucket() [1/4]
| BareDataBucket::BareDataBucket |
( |
| ) |
|
|
delete |
◆ BareDataBucket() [2/4]
| BareDataBucket::BareDataBucket |
( |
void * | data, |
|
|
CLID | clid, |
|
|
RootType | type ) |
|
inline |
◆ ~BareDataBucket()
| virtual BareDataBucket::~BareDataBucket |
( |
| ) |
|
|
inlineoverridevirtual |
◆ BareDataBucket() [3/4]
◆ BareDataBucket() [4/4]
◆ 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
-
| 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. By default, this uses type_info.
Reimplemented from DataBucketBase.
◆ cast() [2/4]
Return the contents of the DataBucket, converted to type given by clid.
Note that only derived->base conversions are allowed here.
- Parameters
-
| 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 47 of file BareDataBucket.h.
49 {
50 return (
m_clid == clid and isConst ) ?
m_data :
nullptr;
51 }
◆ cast() [3/4]
| virtual void * BareDataBucket::cast |
( |
const std::type_info & | tinfo, |
|
|
SG::IRegisterTransient * | irt, |
|
|
bool | isConst = true ) |
|
inlineoverridevirtual |
Return the contents of the DataBucket, converted to type given by std::type_info.
Note that only derived->base conversions are allowed here.
- Parameters
-
| 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 53 of file BareDataBucket.h.
55 {
57 }
virtual const std::type_info & tinfo() const override
Return the type_info for the stored object.
◆ cast() [4/4]
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
-
| irt | To be called if we make a new instance. |
| isConst | True if the object being converted is regarded as const. |
◆ clID()
| virtual const CLID & BareDataBucket::clID |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ lock()
| virtual void BareDataBucket::lock |
( |
| ) |
|
|
inlineoverridevirtual |
◆ object()
| virtual void * BareDataBucket::object |
( |
| ) |
|
|
inlineoverridevirtual |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ relinquish()
| virtual void BareDataBucket::relinquish |
( |
| ) |
|
|
inlineoverridevirtual |
◆ tinfo()
| virtual const std::type_info & BareDataBucket::tinfo |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ m_clid
| CLID BareDataBucket::m_clid = 0 |
|
private |
◆ m_data
| void* BareDataBucket::m_data = nullptr |
|
private |
◆ m_type
The documentation for this class was generated from the following file: