A DataBucket specialized for DataVector/
More...DataList.
#include <DVLDataBucket.h>
Public Member Functions | |
| DVLDataBucket () | |
| Default constructor. | |
| DVLDataBucket (T *data) | |
| Constructor from a payload object. | |
| DVLDataBucket (const DVLDataBucket &other) | |
| Copy constructor. | |
| ~DVLDataBucket () | |
| Destructor. | |
| virtual void * | cast (CLID clid, IRegisterTransient *irt=0, bool isConst=true) const |
Return the contents of the DataBucket, converted to type given by clid. Note that only derived->base conversions are allowed here. | |
| virtual void * | cast (const std::type_info &tinfo, IRegisterTransient *irt=0, bool isConst=true) const |
Return the contents of the DataBucket, converted to type given by std::type_info. Note that only derived->base conversions are allowed here. | |
| virtual DVLDataBucket * | clone () const |
Return a new DataBucket whose payload has been cloned from the original one. | |
A DataBucket specialized for DataVector/ DataList.
DataVector and DataList have some special conversion requirements.
In particular, we may have a situation where we're asked to convert from DataVector<D> to DataVector<B>, where these two classes are not related by inheritance, but D derived from . (In practice, this arises when one has multiple inheritance, and can't mirror both arms with DataVector/)DataList.
This DataBucket allows such conversions to happen by making a copy of the container (as a view container) and converting the contained pointers. The new instance remains owned by the DataBucket.
| SG::DVLDataBucket< T >::DVLDataBucket | ( | T * | data | ) | [inline] |
Constructor from a payload object.
| data | Object to hold in the bucket. |
| SG::DVLDataBucket< T >::DVLDataBucket | ( | const DVLDataBucket< T > & | other | ) | [inline] |
Copy constructor.
| other | Bucket to copy. |
| void * SG::DVLDataBucket< T >::cast | ( | const std::type_info & | tinfo, | |
| IRegisterTransient * | irt = 0, |
|||
| bool | isConst = true | |||
| ) | const [inline, virtual] |
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. |
| void * SG::DVLDataBucket< T >::cast | ( | CLID | clid, | |
| IRegisterTransient * | irt = 0, |
|||
| bool | isConst = true | |||
| ) | const [inline, virtual] |
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. |
1.6.1