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

ts::config::Path Class Reference

A path to a value in a configuration. More...

#include <TsValue.h>

Collaboration diagram for ts::config::Path:
Collaboration graph
[legend]

Data Structures

class  ImplType
class  Parser
 Parser for path text. More...

Public Types

typedef Path self
 Self reference type.

Public Member Functions

 Path ()
 Default constructor.
selfappend (ConstBuffer const &tag)
 Append a string tag to the path.
selfappend (size_t idx)
 Append a numeric index to the path.
selfreset ()
 Reset to default constructed state.
size_t count () const
 Get the number of elements in this path.
ConstBuffer const & operator[] (size_t index) const
 Access an element by index.

Protected Types

typedef IntrusivePtr< ImplTypeImplPtr
 Smart pointer to implementation.

Protected Member Functions

ImplTypeinstance ()
 Force an implementation instance and return a pointer to it.

Protected Attributes

ImplPtr _ptr
 Our instance.

Friends

class Value

Detailed Description

A path to a value in a configuration.

Definition at line 71 of file TsValue.h.


Member Typedef Documentation

Smart pointer to implementation.

Definition at line 172 of file TsValue.h.

Self reference type.

Definition at line 88 of file TsValue.h.


Constructor & Destructor Documentation

ts::config::Path::Path (  )  [inline]

Default constructor.

Definition at line 718 of file TsValue.h.


Member Function Documentation

Path & ts::config::Path::append ( ConstBuffer const &  tag  )  [inline]

Append a string tag to the path.

Parameters:
tag Text of tag.

Definition at line 720 of file TsValue.h.

References ts::config::Path::ImplType::_elements, and instance().

Referenced by ts::config::Builder::pathIndex(), and ts::config::Builder::pathTag().

Path & ts::config::Path::append ( size_t  idx  )  [inline]

Append a numeric index to the path.

Parameters:
idx Index.

Definition at line 721 of file TsValue.h.

References ts::config::Path::ImplType::_elements, and instance().

size_t ts::config::Path::count (  )  const [inline]

Get the number of elements in this path.

Definition at line 722 of file TsValue.h.

References _ptr.

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

Path::ImplType * ts::config::Path::instance (  )  [inline, protected]

Force an implementation instance and return a pointer to it.

Definition at line 719 of file TsValue.h.

References _ptr, and ts::IntrusivePtr< T >::get().

Referenced by append().

ConstBuffer const & ts::config::Path::operator[] ( size_t  index  )  const [inline]

Access an element by index.

Parameters:
index Element index.

Definition at line 723 of file TsValue.h.

References _ptr, and ts::config::detail::NULL_CONST_BUFFER.

Path & ts::config::Path::reset (  ) 

Reset to default constructed state.

Definition at line 215 of file TsValue.cc.

References _ptr, and ts::IntrusivePtr< T >::isShared().

Referenced by ts::config::Builder::pathOpen().


Friends And Related Function Documentation

friend class Value [friend]

Definition at line 72 of file TsValue.h.


Field Documentation

Our instance.

Definition at line 173 of file TsValue.h.

Referenced by count(), instance(), operator[](), and reset().


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