![]() |
stromx
0.8.0
|
Reference to a data object. More...
#include <DataRef.h>
Public Member Functions | |
| DataRef () | |
| DataRef (Data *data) | |
| DataRef (const Data &data) | |
| operator Data & () | |
| bool | isNull () const |
| const std::tr1::shared_ptr< Data > & | ptr () const |
| virtual const Version & | version () const |
| virtual const std::string & | type () const |
| virtual const std::string & | package () const |
| virtual const VariantHandle & | variant () const |
| bool | isVariant (const VariantInterface &v) const |
| virtual Data * | clone () const |
| virtual void | serialize (OutputProvider &out) const |
| virtual void | deserialize (InputProvider &in, const Version &version) |
Public Member Functions inherited from stromx::runtime::DataInterface | |
| bool | isVariant (const VariantInterface &v) const |
Reference to a data object.
Data references hold a smart pointer to a data object. They can be copied and passed by value without copying the data object. Instances of this class are automatically casted to Data & references. If all copies of a data reference are out of scope the encapsulated data object is automatically deleted.
|
inline |
Constructs an null data reference. For a null reference the behavior of all member functions with exceptoin of isNull() is undefined.
|
explicit |
Constructs a data reference from a pointer to a data object. The reference takes ownership of data.
| stromx::runtime::DataRef::DataRef | ( | const Data & | data | ) |
Clones the object data and constructs a reference to the clone.
|
virtual |
Returns a copy of the data object, i.e. a object of the same type is allocated and the data of the original object is copied to the new object. A pointer to the new object is returned.
Implements stromx::runtime::DataInterface.
|
virtual |
Deserializes a data object.
| out | The input which the data obtained from. |
| version | The version of the data class which serialized the input. |
Implements stromx::runtime::DataInterface.
|
inline |
Returns true if the data reference is a null reference, i.e. it was not initialized by a pointer to an object. Null references can not
|
virtual |
Returns the package of the class of this data object.
Implements stromx::runtime::DataInterface.
|
inline |
Returns the shared pointer which holds the data object internally.
|
virtual |
Serializes this data object.
| out | The output which the data is sent to. |
Implements stromx::runtime::DataInterface.
|
virtual |
Returns the name of the class of this data object.
Implements stromx::runtime::DataInterface.
|
virtual |
Returns the data variant of this data object.
Implements stromx::runtime::DataInterface.
|
virtual |
Returns the version of the class of this data object.
Implements stromx::runtime::DataInterface.
1.8.12