UCommon
Public Member Functions | Data Fields | Protected Member Functions
ucommon::linked_value< T, O > Class Template Reference

A linked object base class for ordered objects. More...

#include <linked.h>

Inherits LinkedObject.

Public Member Functions

 linked_value ()
 Create embedded value object unlinked.
 
 linked_value (LinkedObject **root)
 Construct embedded object on a linked list.
 
 linked_value (LinkedObject **root, const T &typed_value)
 Assign embedded value from related type and link to list.
 
 linked_value (OrderedIndex *index)
 Construct embedded object on an ordered list.
 
 linked_value (OrderedIndex *index, const T &typed_value)
 Assign embedded value from related type and add to list.
 
 operator T& ()
 
void operator() (const T data)
 
T & operator* ()
 
linked_valueoperator= (const T &typed_value)
 Assign embedded value from related type.
 
void set (const T &typed_value)
 

Data Fields

value
 

Protected Member Functions

 linked_value (const linked_value &)
 
linked_valueoperator= (const linked_value &)
 

Detailed Description

template<typename T, class O = LinkedObject>
class ucommon::linked_value< T, O >

A linked object base class for ordered objects.

This is used for objects that must be ordered and listed through the OrderedIndex class.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org A linked object base class with members found by name. This class is used to help form named option lists and other forms of name indexed associative data structures. The id is assumed to be passed from a dupped or dynamically allocated string. If a constant string is used then you must not call delete for this object.

Named objects are either listed on an ordered list or keyed through an associate hash map table. When using a hash table, the name id string is used to determine the slot number to use in a list of n sized linked object lists. Hence, a hash index refers to a specific sized array of object indexes.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org The named tree class is used to form a tree oriented list of associated objects. Typical uses for such data structures might be to form a parsed XML document, or for forming complex configuration management systems or for forming system resource management trees.
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org A double linked list object. This is used as a base class for objects that will be organized through ordered double linked lists which allow convenient insertion and deletion of list members anywhere in the list.
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org Template value class to embed data structure into a linked list. This is used to form a class which can be linked together using either an ordered index or simple linked pointer chain 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.
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Examples
linked.cpp.

Definition at line 909 of file linked.h.

Constructor & Destructor Documentation

◆ linked_value() [1/5]

template<typename T , class O = LinkedObject>
ucommon::linked_value< T, O >::linked_value ( )
inline

Create embedded value object unlinked.

Definition at line 920 of file linked.h.

◆ linked_value() [2/5]

template<typename T , class O = LinkedObject>
ucommon::linked_value< T, O >::linked_value ( LinkedObject **  root)
inline

Construct embedded object on a linked list.

Parameters
rootnode or pointer for list.

Definition at line 926 of file linked.h.

◆ linked_value() [3/5]

template<typename T , class O = LinkedObject>
ucommon::linked_value< T, O >::linked_value ( OrderedIndex *  index)
inline

Construct embedded object on an ordered list.

Parameters
indexpointer for the ordered list.

Definition at line 934 of file linked.h.

◆ linked_value() [4/5]

template<typename T , class O = LinkedObject>
ucommon::linked_value< T, O >::linked_value ( LinkedObject **  root,
const T &  typed_value 
)
inline

Assign embedded value from related type and link to list.

Parameters
rootnode or pointer for list.
typed_valueto assign.

Definition at line 943 of file linked.h.

◆ linked_value() [5/5]

template<typename T , class O = LinkedObject>
ucommon::linked_value< T, O >::linked_value ( OrderedIndex *  index,
const T &  typed_value 
)
inline

Assign embedded value from related type and add to list.

Parameters
indexto list our object on.
typed_valueto assign.

Definition at line 953 of file linked.h.

Member Function Documentation

◆ operator T&()

template<typename T , class O = LinkedObject>
ucommon::linked_value< T, O >::operator T& ( )
inline

Definition at line 975 of file linked.h.

◆ operator()()

template<typename T , class O = LinkedObject>
void ucommon::linked_value< T, O >::operator() ( const T  data)
inline

Definition at line 979 of file linked.h.

◆ operator*()

template<typename T , class O = LinkedObject>
T & ucommon::linked_value< T, O >::operator* ( )
inline

Definition at line 971 of file linked.h.

◆ operator=()

template<typename T , class O = LinkedObject>
linked_value & ucommon::linked_value< T, O >::operator= ( const T &  typed_value)
inline

Assign embedded value from related type.

Parameters
typed_valueto assign.

Definition at line 966 of file linked.h.

◆ set()

template<typename T , class O = LinkedObject>
void ucommon::linked_value< T, O >::set ( const T &  typed_value)
inline

Definition at line 958 of file linked.h.

Field Documentation

◆ value

template<typename T , class O = LinkedObject>
T ucommon::linked_value< T, O >::value

Definition at line 915 of file linked.h.


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