UCommon
Public Member Functions | Static Public Member Functions
ucommon::named_value< T, O > Class Template Reference

Template value class to embed data structure into a named list. More...

#include <linked.h>

Inheritance diagram for ucommon::named_value< T, O >:
Inheritance graph
[legend]
Collaboration diagram for ucommon::named_value< T, O >:
Collaboration graph
[legend]

Public Member Functions

 named_value (LinkedObject **root, char *name)
 Construct embedded named object on a linked list. More...
 
void operator= (const T &typed_value)
 Assign embedded value from related type. More...
 
- Public Member Functions inherited from ucommon::object_value< T, O >
 object_value ()
 Construct composite value object.
 
 object_value (T &existing)
 Construct composite value object and assign from existing data value. More...
 
 operator T & ()
 Retrieve data value by casting reference. More...
 
T & operator() ()
 
void operator() (T &data)
 Set data value by expression reference. More...
 
T & operator* ()
 Pointer reference to embedded data value. More...
 
void operator= (const T &data)
 Assign embedded data value. More...
 

Static Public Member Functions

static named_value find (named_value *first, const char *name)
 Find embedded object in chain by name. More...
 

Additional Inherited Members

- Data Fields inherited from ucommon::object_value< T, O >
value
 Embedded data value.
 
- Protected Member Functions inherited from ucommon::object_value< T, O >
void set (const T &object)
 Assign our value from a typed data object. More...
 

Detailed Description

template<typename T, class O = NamedObject>
class ucommon::named_value< T, O >

Template value class to embed data structure into a named list.

This is used to form a class which can be searched by name and that contains a member value object. Most of the core logic for this template is found in and derived from the object_value template.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 1067 of file linked.h.

Constructor & Destructor Documentation

template<typename T , class O = NamedObject>
ucommon::named_value< T, O >::named_value ( LinkedObject **  root,
char *  name 
)
inline

Construct embedded named object on a linked list.

Parameters
rootnode or pointer for list.
nameof our object.

Definition at line 1075 of file linked.h.

Here is the call graph for this function:

Member Function Documentation

template<typename T , class O = NamedObject>
static named_value ucommon::named_value< T, O >::find ( named_value< T, O > *  first,
const char *  name 
)
inlinestatic

Find embedded object in chain by name.

Parameters
firstobject in list to search from.
nameto search for.
Returns
composite object found by name or NULL if not found.

Definition at line 1091 of file linked.h.

Here is the call graph for this function:

template<typename T , class O = NamedObject>
void ucommon::named_value< T, O >::operator= ( const T &  typed_value)
inline

Assign embedded value from related type.

Parameters
typed_valueto assign.

Definition at line 1082 of file linked.h.

Here is the call graph for this function:


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