#include <HDF.h>
Inheritance diagram for ClearSilver::HDF:

Public Types | |
| typedef std::string | Name |
| typedef std::string | Name |
STL type definitions | |
| typedef size_t | size_type |
| typedef forward_iterator_tag | iterator_category |
| typedef HDF | value_type |
| typedef ptrdiff_t | difference_type |
| typedef HDF * | pointer |
| typedef HDF | reference |
| typedef HDF | iterator |
| typedef HDF | const_reference |
| typedef HDF | const_iterator |
Public Member Functions | |
| virtual ClearSilverNode | node () const |
| Access to the current node. | |
| ClearSilverNode | HDF::root () const |
| Access the root node. | |
| HDFAttributes | attributes () |
| Access the node attributes. | |
| void | swap (HDF &) throw () |
| Swap contents with another object. | |
| bool | is_iterator () const |
| Is this an iterator? | |
| bool | is_dataset () const |
| Is this a dataset? | |
| bool | is_reference () const |
| Is this a node within a dataset? | |
| void | sort (ClearSilverNodeComparator::Ptr) |
| Sort the children of the current node. | |
Constructors | |
| HDF () | |
| Default constructor. | |
| HDF (const char *path) | |
| Construct a dataset from a file. | |
| HDF (const std::string &path) | |
| Construct a dataset from a file. | |
| HDF (const RootNode &) | |
| Construct a dataset from a preexisting root node. | |
| HDF (const HDF &) | |
| Copy constructor. | |
| ~HDF () throw () | |
| Destructor. | |
| HDF & | operator= (const HDF &) |
| Assignment operator. | |
| HDF & | operator= (const char *value) |
| Assign a new value to an HDF node. | |
| HDF & | operator= (const std::string &value) |
| Assign a new value to an HDF node. | |
| HDF & | operator= (int value) |
| Assign a new value to an HDF node. | |
| HDF & | operator= (bool value) |
| Assign a new value to an HDF node. | |
| HDF & | operator= (const SymlinkTarget &) |
| Create a symbolic link. | |
Inspectors | |
| size_type | depth () const |
| Depth of current node from the root of the dataset. | |
| std::string | path () const |
| Path to the current node from the root of the dataset. | |
Associative array interface | |
| const_reference | operator[] (const char *key) const |
| const_reference | operator[] (const std::string &key) const |
| reference | operator[] (const char *key) |
| reference | operator[] (const std::string &key) |
STL iterator constructors | |
| const_iterator | begin () const |
| const_iterator | end () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | find (const char *key) const |
| const_iterator | find (const std::string &key) const |
| iterator | find (const char *key) |
| iterator | find (const std::string &key) |
Iterator methods | |
These methods provide the standard STL forward iteration interface. | |
| iterator & | operator++ () |
| iterator | operator++ (int) |
| value_type | operator * () |
| Dereference an iterator. | |
| pointer | operator-> () |
| Return a pointer to the current node. | |
| HDF & | copy (const HDF &dataset) |
| Deep copy methods. | |
| HDF & | copy (const char *key, const HDF &dataset) |
| HDF & | copy (const std::string &key, const HDF &dataset) |
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 |
HDF dataset operations | |
Most of these functions directly encapsulate the corresponding functions from the ClearSilver C API. Note that the constants returned by ConstHDFNode::True() and ConstHDFNode::False() are used internally to represent the corresponding boolean values in the dataset. | |
| void | set_value (const char *value) |
| void | set_value (const std::string &value) |
| void | set_value (int value) |
| void | set_value (bool value) |
| void | set_value (const char *key, const char *value) |
| void | set_value (const std::string &key, const std::string &value) |
| void | set_value (const char *key, int value) |
| void | set_value (const std::string &key, int value) |
| void | set_value (const char *key, unsigned int value) |
| void | set_value (const std::string &key, unsigned int value) |
| void | set_value (const char *key, bool value) |
| void | set_value (const std::string &key, bool value) |
| void | read_file (const char *filename) |
| void | read_file (const std::string &filename) |
Delete subtree methods | |
Note that these methods invalidate any references and iterators referring to nodes within the deleted subtree. | |
| void | remove_tree (const char *key) |
| Remove the subtree rooted at path. | |
| void | remove_tree (const std::string &key) |
| Remove the subtree rooted at path. | |
| void | remove_tree (HDF &) |
| Remove the subtree referenced by the HDF object. | |
| void | remove_cgi () |
| Delete the entire CGI environment from the HDF dataset. | |
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 |
| virtual Nodes & | nodes () |
| virtual void | push (const ConstHDFNode::Name &, const ClearSilverNode &) |
| virtual void | pop () |
| virtual ClearSilverNode | top () const |
| 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. | |
| void | swap (HDFNode &) throw () |
| Swap contents with another object. | |
Friends | |
| class | ConstHDF |
| bool | operator== (const reference &, const reference &) |
| Equality comparison operator. | |
Classes | |
| struct | forward_iterator_tag |
| struct | input_iterator_tag |
This class provides one of the two primary interfaces to a ClearSilver (http://www.clearsilver.net/) HDF dataset. Specifically, it encapsulates a non-constant dataset; the other primary interface, the ConstHDF class, encapsulates a constant datset. Members provide access to data within the HDF dataset via accessor functions, via an associative array interface, and via an STL iterator interface. The same class is used for all of these interfaces in order to achieve a recursive interface, regardless of the current level of nesting within the dataset.
Definition at line 76 of file HDF.h.
|
|
Access the debug flag. If the debug flag is true, syslog(3) messages with priority LOG_DEBUG will be logged. Reimplemented from ClearSilver::ConstHDFNode. Definition at line 468 of file HDF.cc. Referenced by operator=(). |
|
|
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 begin(), ClearSilver::ConstHDF::begin(), end(), ClearSilver::ConstHDF::end(), operator *(), ClearSilver::ConstHDF::operator *(), and operator=(). |
|
|
Dereference an iterator. This method interprets the current node as an iterator and dereferences it. Note that once dereferences, a node is no longer regarded as an iterator. Definition at line 361 of file HDF.cc. References ClearSilver::ConstHDFNode::is_iterator(). |
|
|
Return a pointer to the current node. This method interprets the current node as an iterator and returns a pointer to it. |
|
|
Create a symbolic link. This method replaces the value of a node with a symbolic link to another target node (which need not exist in the dataset). Definition at line 153 of file HDF.cc. References path(). |
|
|
Assign a new value to an HDF node. This method replaces the value of a node with a string version of its argument. Specifically, the value returned by the Boolean() method replaces the value of the node. Definition at line 146 of file HDF.cc. References ClearSilver::HDFNode::set_value(). |
|
|
Assign a new value to an HDF node. This method replaces the value of a node with its argument. Definition at line 139 of file HDF.cc. References ClearSilver::HDFNode::set_value(). |
|
|
Assign a new value to an HDF node. This method replaces the value of a node with its argument.
Definition at line 132 of file HDF.cc. References ClearSilver::HDFNode::set_value(). |
|
|
Assign a new value to an HDF node. This method replaces the value of a node with its argument. Definition at line 126 of file HDF.cc. References operator=(). |
|
|
Assignment operator. There are two distinct types of assignment semantics: assignment of an entire ClearSilver dataset and assignment of the value of a specific node within a dataset to another specific node. Both types of semantics are supported, depending on which of the following cases apply.
Definition at line 82 of file HDF.cc. References std::basic_string< _CharT, _Traits, _Alloc >::c_str(), debug(), ClearSilver::ConstHDFNode::get_value(), ClearSilver::ConstHDFNode::is_dataset(), ClearSilver::ConstHDFNode::is_iterator(), ClearSilver::ConstHDFNode::is_reference(), ClearSilver::TraceObject::operator=(), ClearSilver::HDFNode::set_value(), and swap(). Referenced by operator=(). |
|
|
Delete the entire CGI environment from the HDF dataset. The CGI environment that is deleted includes nodes rooted at the following paths: CGI, HTTP, Query, and Cookie. Note that this method invalidates any references and iterators referring to nodes within the deleted subtrees. Definition at line 173 of file HDFNode.cc. References ClearSilver::HDFNode::remove_tree(). |
1.4.5