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.
void operator= (T &typed_value)
 Assign embedded value from related type.
- 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.
 operator T & ()
 Retrieve data value by casting reference.
T & operator() ()
void operator() (T &data)
 Set data value by expression reference.
T & operator* ()
 Pointer reference to embedded data value.

Static Public Member Functions

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

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 (T &object)
 Assign our value from a typed data object.

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 1051 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 1059 of file linked.h.


Member Function Documentation

template<typename T , class O = NamedObject>
static named_value ucommon::named_value< T, O >::find ( named_value< T, O > *  first,
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 1075 of file linked.h.

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

Assign embedded value from related type.

Parameters:
typed_valueto assign.

Reimplemented from ucommon::object_value< T, O >.

Definition at line 1066 of file linked.h.


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