#include <object.h>
Inheritance diagram for ucommon::object_value< T, O >:
Public Member Functions | |
object_value (T &existing) | |
Construct composite value object and assign from existing data value. | |
object_value () | |
Construct composite value object. | |
T & | operator * () |
Pointer reference to embedded data value. | |
operator T & () | |
Retrieve data value by casting reference. | |
void | operator() (T &data) |
Set data value by expression reference. | |
T & | operator() () |
void | operator= (T &data) |
Assign embedded data value. | |
Data Fields | |
T | value |
Embedded data value. | |
Protected Member Functions | |
void | set (T &object) |
Assign our value from a typed data object. |
This is a convenient means to create reference counted heap managed data structure. This template can be used for embedding data into other kinds of managed object classes in addition to reference counting. For example, it can be used to embed a data structure into a linked list, as shown in the linked_value template.
Definition at line 315 of file object.h.
ucommon::object_value< T, O >::object_value | ( | T & | existing | ) | [inline] |
T& ucommon::object_value< T, O >::operator * | ( | ) | [inline] |
ucommon::object_value< T, O >::operator T & | ( | ) | [inline] |
void ucommon::object_value< T, O >::operator() | ( | T & | data | ) | [inline] |
void ucommon::object_value< T, O >::operator= | ( | T & | data | ) | [inline] |
Assign embedded data value.
data | value to assign. |
Reimplemented in ucommon::named_value< T, O >, and ucommon::linked_value< T, O >.
void ucommon::object_value< T, O >::set | ( | T & | object | ) | [inline, protected] |