Template for embedding a data structure into a reference counted object.
More...
#include <object.h>
Public Member Functions |
| object_value () |
| Construct composite value object.
|
| object_value (T &existing) |
| Construct composite value object and assign from existing data value.
|
| operator T () |
| Retrieve data value by casting reference.
|
void | operator() (T &data) |
| Set data value by expression reference.
|
T & | operator() () |
| Retrieve data value by expression reference.
|
T & | operator* () |
| Pointer reference to embedded data value.
|
void | operator= (const T &data) |
| Assign embedded data value.
|
Data Fields |
T | value |
| Embedded data value.
|
Protected Member Functions |
void | set (const T &object) |
| Assign our value from a typed data object.
|
Detailed Description
template<class T, class O = CountedObject>
class ucc::object_value< T, O >
Template for embedding a data structure into a reference counted 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.
- Author:
- David Sugar <dyfet@gnutelephony.org>
Definition at line 408 of file object.h.
Constructor & Destructor Documentation
template<class T , class O = CountedObject>
Construct composite value object and assign from existing data value.
- Parameters:
-
| existing | typed value to assign. |
Definition at line 430 of file object.h.
Member Function Documentation
template<class T , class O = CountedObject>
Retrieve data value by casting reference.
- Returns:
- embedded value.
Definition at line 451 of file object.h.
template<class T , class O = CountedObject>
Retrieve data value by expression reference.
- Returns:
- embedded value.
Definition at line 458 of file object.h.
template<class T , class O = CountedObject>
Set data value by expression reference.
- Parameters:
-
Definition at line 465 of file object.h.
template<class T , class O = CountedObject>
Pointer reference to embedded data value.
- Returns:
- embedded value.
Definition at line 437 of file object.h.
template<class T , class O = CountedObject>
template<class T , class O = CountedObject>
Assign our value from a typed data object.
This is a helper method.
- Parameters:
-
| object | to assign our value from. |
Definition at line 415 of file object.h.
The documentation for this class was generated from the following file: