ClearSilver::ConstHDFNode Class Reference

Constant HDF node. More...

#include <ConstHDFNode.h>

Inheritance diagram for ClearSilver::ConstHDFNode:

ClearSilver::ConstHDF ClearSilver::HDF List of all members.

Public Types

typedef std::string Name

Public Member Functions

virtual ClearSilverNode node () const =0
 Access to the current node.
bool is_dataset () const
 Is this a dataset?
bool is_reference () const
 Is this a node within a dataset?
bool is_iterator () const
 Is this an iterator?
Constructors and assignment operators
 ConstHDFNode ()
 ConstHDFNode (const ConstHDFNode &n)
 ~ConstHDFNode () throw ()
STL inspectors
bool empty () const
Conversions
 operator bool () const
 Is this a valid node?
 operator std::string () const
 Convert to the value of the node.
Node accessors
std::string name () const
 Name of the node.
std::string value () const
 Value of the node.
HDF dataset operations
These functions directly encapsulate the corresponding functions from the ClearSilver C API. Note that the values stored internally to represent boolean values correspond to the constants returned by True() and False().

std::string get_value () const
std::string get_value (const char *key) const
std::string get_value (const std::string &key) const
std::string get_value (const char *key, const char *default_value) const
std::string get_value (const std::string &key, const std::string &default_value) const
void write_file (const char *filename) const
void write_file (const std::string &filename) const
void dump () const
void dump (const char *prefix) const
void dump (const std::string &prefix) const

Static Public Member Functions

static bool & debug ()
 Access the debug flag.
Boolean constants
These string values represent the boolean constants "true" and "false" within the dataset. This simplifies, for example, the comparison of node values expected to represent boolean values with a consistent set of contants.

static std::string Boolean (bool b)
static std::string True ()
static std::string False ()

Protected Member Functions

virtual Nodes nodes () const =0
virtual Nodesnodes ()=0
virtual void push (const Name &, const ClearSilverNode &)=0
virtual void pop ()=0
virtual ClearSilverNode top () const =0
void swap (ConstHDFNode &) throw ()
 Swap contents with another object.
Nodes find_node (const std::string &) const
 Construct the path to a node.
bool & is_iterator ()
 Access the iterator flag.

Detailed Description

Constant HDF node.

This class encapsulates the constant portion of the interface to a ClearSilver HDF dataset node. It is intended to be a base class for either the ConstHDF or HDF classes, which represent entire datasets not single nodes and manage the memory associated with the dataset.

Definition at line 62 of file ConstHDFNode.h.


Member Function Documentation

bool & ClearSilver::ConstHDFNode::debug  )  [static]
 

Access the debug flag.

If the debug flag is true, syslog(3) messages with priority LOG_DEBUG will be logged.

Reimplemented in ClearSilver::ConstHDF, and ClearSilver::HDF.

Definition at line 223 of file ConstHDFNode.cc.

bool & ClearSilver::ConstHDFNode::is_iterator  )  [protected]
 

Access the iterator flag.

The STL iterator constructors (e.g., begin() and end()) must set this flag appropriately in order for the assignment operator to differentiate between assigning the whole dataset in the case of an iterator or assigning the node value otherwise.

Definition at line 342 of file ConstHDFNode.cc.

Referenced by ClearSilver::HDF::begin(), ClearSilver::ConstHDF::begin(), ClearSilver::HDF::end(), ClearSilver::ConstHDF::end(), ClearSilver::HDF::operator *(), ClearSilver::ConstHDF::operator *(), and ClearSilver::HDF::operator=().


The documentation for this class was generated from the following files:
Generated on Tue May 16 14:50:54 2006 for ClearSilver C++ Library by  doxygen 1.4.5