#include <DataVariantAnyData.h>

Public Member Functions | |
| DataVariantAnyData () | |
| template<typename T> | |
| DataVariantAnyData (const T &value) | |
| ~DataVariantAnyData () | |
| AnyData * | copy () const |
| bool | serialize (SessionItemSerializer &serializer) const |
| bool | deserialize (SessionItemDeserializer &deserializer) |
| void | setAttribute (const DataVariant &data) |
| DataVariant & | getAttribute () |
| const DataVariant & | getAttribute () const |
This subclass of AnyData is provided as a convenience for data that can be stored in a DataVariant.
Definition at line 27 of file DataVariantAnyData.h.
| DataVariantAnyData::DataVariantAnyData | ( | ) |
Creates the custom data object.
This constructor creates an empty data object with an empty DataVariant. It can be called directly by plug-ins to create the custom data object to set into an Any element provided that the plug-in module will remain loaded for the lifetime of the element. Plug-ins should create this object from the ObjectFactory if the plug-in module will be unloaded before the Any element is destroyed.
Definition at line 40 of file DataVariantAnyData.h.
| DataVariantAnyData::DataVariantAnyData | ( | const T & | value | ) |
Creates and initializes the custom data object.
This constructor creates a data object and initializes the internal DataVariant with the given value. It can be called directly by plug-ins to create the custom data object to set into an Any element provided that the plug-in module will remain loaded for the lifetime of the element. Plug-ins must create an empty object from the ObjectFactory if the plug-in module will be unloaded before the Any element is destroyed.
| value | The data value with which the internal DataVariant is initialized. |
Definition at line 61 of file DataVariantAnyData.h.
| DataVariantAnyData::~DataVariantAnyData | ( | ) |
Destroys the custom data object.
The destructor is called by the Any element when the element is destroyed. The internal DataVariant is deleted, thereby deleting the data it contains.
Definition at line 75 of file DataVariantAnyData.h.
| AnyData* DataVariantAnyData::copy | ( | ) | const [virtual] |
Creates a copy of the custom data.
This method is called when the Any::copy() method is called to copy the data element. The default implementation of this method creates a new DataVariantAnyData and sets the new internal DataVariant equal to this DataVariant.
Reimplemented from AnyData.
Definition at line 92 of file DataVariantAnyData.h.
| bool DataVariantAnyData::serialize | ( | SessionItemSerializer & | serializer | ) | const [virtual] |
Saves the DataVariant as part of a full session save.
| serializer | The object to use to save the DataVariant as part of the current session. |
true if the DataVariant was successfully saved and false otherwise. Reimplemented from AnyData.
Definition at line 110 of file DataVariantAnyData.h.
| bool DataVariantAnyData::deserialize | ( | SessionItemDeserializer & | deserializer | ) | [virtual] |
Restores the DataVariant from a saved session.
| deserializer | The object to use to restore the DataVariant from a saved session. |
true if the DataVariant was successfully restored and false otherwise. Reimplemented from AnyData.
Definition at line 131 of file DataVariantAnyData.h.
| void DataVariantAnyData::setAttribute | ( | const DataVariant & | data | ) |
Sets the custom data to set into an Any element.
| data | The custom data. |
Definition at line 150 of file DataVariantAnyData.h.
| DataVariant& DataVariantAnyData::getAttribute | ( | ) |
Returns the custom data to set into an Any element.
Definition at line 161 of file DataVariantAnyData.h.
| const DataVariant& DataVariantAnyData::getAttribute | ( | ) | const |
Returns read-only access to the custom data to set into an Any element.
Definition at line 174 of file DataVariantAnyData.h.