#include <sconfig.hpp>

Public Member Functions | |
| Node (const string &name="") | |
| Default constructor. | |
| Node (const Node &node) | |
| ~Node () | |
| Node & | operator= (const Node &old) |
| void | CopyTo (Node &target) const |
| Creates a valid copy of the actual object. | |
| void | Clear () |
| Resets private members. | |
| bool | HasChildren () const |
| Checks if there are child Nodes. | |
| bool | HasPairs () const |
| Checks if there are any Pairs inside this Node. | |
| Pair * | AddPair (const Pair &pair) |
| Inserts a new Pair to the actual Node. | |
| Node * | AddNode (const Node &node) |
| Inserts a new Node child to the actual Node. | |
| const Pair * | FirstPair () const |
| Gets the first Pair. | |
| Pair * | FirstPair () |
| const Pair * | FirstPair (const string &name) const |
| Gets the first Pair with a specific key name. | |
| Pair * | FirstPair (const string &name) |
| const Node * | FirstNode () const |
| Gets the first Node. | |
| Node * | FirstNode () |
| const Node * | FirstNode (const string &name) const |
| Gets the first child Node with a specific name. | |
| Node * | FirstNode (const string &name) |
| void | Print () const |
| Prints the actual Node. | |
| const Node * | NextSibling () const |
| Gets the next Node sibling. | |
| Node * | NextSibling () |
| const Node * | NextSibling (const string &name) const |
| Gets the next Node sibling with a specific name. | |
| Node * | NextSibling (const string &name) |
| const Node * | PreviousSibling () const |
| Gets the previous Node sibling. | |
| Node * | PreviousSibling () |
| const Node * | PreviousSibling (const string &name) const |
| Gets the previous Node sibling with a specific name. | |
| Node * | PreviousSibling (const string &name) |
| const Node * | Parent () const |
| Gets the parent Node. | |
| Node * | Parent () |
| int | Depth () const |
| Gets the Node's depth relative to it's parent. | |
| const string & | Name () const |
| Gets the name. | |
| void | Name (const string &name) |
| Sets the name. | |
| bool | Path (const string &path, string &store, char token= '.') const |
| Convenient function to access a Pair's value. | |
| template<class O> | |
| bool | TPath (const string &path, O &store, char token= '.') const |
| Same as Path() but templated, so that result is converted to the desired type. Be _very_ careful with destination type. | |
Private Attributes | |
| string | m_Name |
| Node * | m_PreviousSibling |
| Node * | m_NextSibling |
| Node * | m_Parent |
| Node * | _lastNode |
| Pair * | _lastPair |
| t_node_list | m_Children |
| t_pair_list | m_Pairs |
Friends | |
| class | SConfigParser |
| Node::Node | ( | const string & | name = "" |
) |
Default constructor.
| name | string for node name. |
| Node::Node | ( | const Node & | node | ) |
| JC::SConfig::Node::~Node | ( | ) | [inline] |
| void Node::CopyTo | ( | Node & | target | ) | const |
Creates a valid copy of the actual object.
| target | the destination where to copy the object. |
| void Node::Clear | ( | ) |
Resets private members.
| bool Node::HasChildren | ( | ) | const |
Checks if there are child Nodes.
| bool Node::HasPairs | ( | ) | const |
Checks if there are any Pairs inside this Node.
| const Pair * Node::FirstPair | ( | ) | const |
| Pair * Node::FirstPair | ( | ) |
| const Pair * Node::FirstPair | ( | const string & | name | ) | const |
| Pair * Node::FirstPair | ( | const string & | name | ) |
| const Node * Node::FirstNode | ( | ) | const |
| Node * Node::FirstNode | ( | ) |
| const Node * Node::FirstNode | ( | const string & | name | ) | const |
| Node * Node::FirstNode | ( | const string & | name | ) |
| void Node::Print | ( | ) | const |
Prints the actual Node.
| const Node * Node::NextSibling | ( | ) | const |
Gets the next Node sibling.
| Node * Node::NextSibling | ( | ) |
| const Node * Node::NextSibling | ( | const string & | name | ) | const |
Gets the next Node sibling with a specific name.
| name | the Node's name to search for. |
| Node * Node::NextSibling | ( | const string & | name | ) |
| const Node * Node::PreviousSibling | ( | ) | const |
Gets the previous Node sibling.
| Node * Node::PreviousSibling | ( | ) |
| const Node * Node::PreviousSibling | ( | const string & | name | ) | const |
Gets the previous Node sibling with a specific name.
| name | the Node's name to search for. |
| Node * Node::PreviousSibling | ( | const string & | name | ) |
| const Node * Node::Parent | ( | ) | const |
| Node * Node::Parent | ( | ) |
| int Node::Depth | ( | ) | const |
Gets the Node's depth relative to it's parent.
| const string & Node::Name | ( | ) | const |
Gets the name.
| void Node::Name | ( | const string & | name | ) |
Sets the name.
| name | the string to set |
| bool Node::Path | ( | const string & | path, | |
| string & | store, | |||
| char | token = '.' | |||
| ) | const |
Convenient function to access a Pair's value.
| path | string with a list of Nodes names and a Pair key, separated by a token (ex. "myApp.mainWindow.width"). | |
| store | destination to store the Pair's value. | |
| token | token used to separate Nodes and Pairs in path. |
| bool JC::SConfig::Node::TPath | ( | const string & | path, | |
| O & | store, | |||
| char | token = '.' | |||
| ) | const [inline] |
Same as Path() but templated, so that result is converted to the desired type. Be _very_ careful with destination type.
| path | string with a list of Nodes names and a Pair key, separated by a token (ex. "myApp.mainWindow.width"). | |
| store | destination to store the Pair's value. | |
| token | token used to separate Nodes and Pairs in path. |
friend class SConfigParser [friend] |
string JC::SConfig::Node::m_Name [private] |
Node* JC::SConfig::Node::m_PreviousSibling [private] |
Node* JC::SConfig::Node::m_NextSibling [private] |
Node* JC::SConfig::Node::m_Parent [private] |
Node* JC::SConfig::Node::_lastNode [private] |
Pair* JC::SConfig::Node::_lastPair [private] |
t_node_list JC::SConfig::Node::m_Children [private] |
t_pair_list JC::SConfig::Node::m_Pairs [private] |
1.5.6