stromx  0.8.0
Public Member Functions | List of all members
stromx::runtime::ConstDataRef Class Reference

Reference to a constant data object. More...

#include <ConstDataRef.h>

Inheritance diagram for stromx::runtime::ConstDataRef:
stromx::runtime::DataInterface

Public Member Functions

 ConstDataRef ()
 
 ConstDataRef (const Data *data)
 
 ConstDataRef (const DataRef &dataRef)
 
 operator const Data & ()
 
bool isNull () const
 
virtual const Versionversion () const
 
virtual const std::string & type () const
 
virtual const std::string & package () const
 
virtual const VariantHandlevariant () const
 
bool isVariant (const VariantInterface &v) const
 
virtual Dataclone () 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
 

Detailed Description

Reference to a constant data object.

Data references hold a smart pointer to a constant 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.

Constructor & Destructor Documentation

§ ConstDataRef() [1/3]

stromx::runtime::ConstDataRef::ConstDataRef ( )
inline

Constructs an null data reference. For a null reference the behavior of all member functions with exceptoin of isNull() is undefined.

§ ConstDataRef() [2/3]

stromx::runtime::ConstDataRef::ConstDataRef ( const Data data)
explicit

Constructs a data reference from a pointer to a data object. The reference takes ownership of data.

§ ConstDataRef() [3/3]

stromx::runtime::ConstDataRef::ConstDataRef ( const DataRef dataRef)
explicit

Constructs a constant data reference from the input (non-constant) data reference. They data held by the reference is not copied.

Member Function Documentation

§ clone()

Data * stromx::runtime::ConstDataRef::clone ( ) const
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.

§ deserialize()

void stromx::runtime::ConstDataRef::deserialize ( InputProvider in,
const Version version 
)
virtual

Deserializes a data object.

Parameters
outThe input which the data obtained from.
versionThe version of the data class which serialized the input.

Implements stromx::runtime::DataInterface.

§ isNull()

bool stromx::runtime::ConstDataRef::isNull ( ) const
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

§ operator const Data &()

stromx::runtime::ConstDataRef::operator const Data & ( )
inline

Casts a data reference to const Data &.

§ package()

const std::string & stromx::runtime::ConstDataRef::package ( ) const
virtual

Returns the package of the class of this data object.

Implements stromx::runtime::DataInterface.

§ serialize()

void stromx::runtime::ConstDataRef::serialize ( OutputProvider out) const
virtual

Serializes this data object.

Parameters
outThe output which the data is sent to.

Implements stromx::runtime::DataInterface.

§ type()

const std::string & stromx::runtime::ConstDataRef::type ( ) const
virtual

Returns the name of the class of this data object.

Implements stromx::runtime::DataInterface.

§ variant()

const VariantHandle & stromx::runtime::ConstDataRef::variant ( ) const
virtual

Returns the data variant of this data object.

Implements stromx::runtime::DataInterface.

§ version()

const Version & stromx::runtime::ConstDataRef::version ( ) const
virtual

Returns the version of the class of this data object.

Implements stromx::runtime::DataInterface.


The documentation for this class was generated from the following files: