Data Structures | Public Member Functions | Protected Types | Protected Attributes | Friends

ts::config::detail::ValueItem Class Reference

A value in the configuration. More...

#include <TsValue.h>

Collaboration diagram for ts::config::detail::ValueItem:
Collaboration graph
[legend]

Data Structures

struct  Name
 Hold a child item name in a table for fast lookup. More...

Public Member Functions

 ValueItem ()
 Default constructor.
 ValueItem (ValueType type)
 Construct empty item of a specific type.
ValueType getType () const
 Get item type.

Protected Types

typedef std::vector< ValueIndexChildGroup
 Container for children of this item.
typedef std::vector< NameNameGroup
 Container for child names.

Protected Attributes

ValueType _type
 Type of value.
ValueIndex _parent
 Table index of parent value.
ConstBuffer _text
 Text of value (if scalar).
ConstBuffer _name
 Local name of value, if available.
size_t _local_index
 Index among siblings.
int _srcLine
 Source line.
int _srcColumn
 Source column.
ChildGroup _children
 Child items of this item.
Path _path
 Path if present.
NameGroup _names
 Child names, if appropriate.

Friends

class ts::config::Value
class ValueTable

Detailed Description

A value in the configuration.

This is used in a global table so it handles all types of Values. Members that are not used for scalars are designed to be NULL pointers in that case.

Definition at line 205 of file TsValue.h.


Member Typedef Documentation

typedef std::vector<ValueIndex> ts::config::detail::ValueItem::ChildGroup [protected]

Container for children of this item.

Definition at line 228 of file TsValue.h.

typedef std::vector<Name> ts::config::detail::ValueItem::NameGroup [protected]

Container for child names.

Definition at line 241 of file TsValue.h.


Constructor & Destructor Documentation

ts::config::detail::ValueItem::ValueItem (  )  [inline]

Default constructor.

Definition at line 647 of file TsValue.h.

ts::config::detail::ValueItem::ValueItem ( ValueType  type  )  [inline]

Construct empty item of a specific type.

Definition at line 648 of file TsValue.h.


Member Function Documentation

ValueType ts::config::detail::ValueItem::getType (  )  const [inline]

Get item type.

Definition at line 649 of file TsValue.h.

References _type.


Friends And Related Function Documentation

friend class ts::config::Value [friend]

Definition at line 209 of file TsValue.h.

friend class ValueTable [friend]

Definition at line 210 of file TsValue.h.


Field Documentation

Child items of this item.

Definition at line 230 of file TsValue.h.

Referenced by ts::config::Value::childCount(), ts::config::detail::ValueTable::make(), and ts::config::Value::operator[]().

Index among siblings.

Definition at line 223 of file TsValue.h.

Referenced by ts::config::Value::getIndex(), and ts::config::detail::ValueTable::make().

Local name of value, if available.

Definition at line 222 of file TsValue.h.

Referenced by ts::config::Value::getName(), and ts::config::detail::ValueTable::make().

Child names, if appropriate.

This is faulted in when needed, if this value is an aggregate with named children. The list must be sorted on name so that it can be binary searched for performance.

Definition at line 247 of file TsValue.h.

Table index of parent value.

Definition at line 220 of file TsValue.h.

Referenced by ts::config::detail::ValueTable::make().

Path if present.

Definition at line 232 of file TsValue.h.

Text of value (if scalar).

Definition at line 221 of file TsValue.h.

Referenced by ts::config::Value::setText().

Type of value.

Definition at line 219 of file TsValue.h.

Referenced by getType(), and ts::config::detail::ValueTable::make().


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