iterator for XML trees More...
#include <xmlstorage.h>

Public Member Functions | |
| const_XMLPos (const XMLNode *root) | |
| const_XMLPos (const const_XMLPos &other) | |
| const_XMLPos (const XMLPos &other) | |
| const XMLNode & | cur () const | 
| access to current node   | |
| operator const XMLNode * () const | |
| automatic access to current node   | |
| const XMLNode * | operator-> () const | 
| const XMLNode & | operator* () const | 
| XS_String | get (const XS_String &attr_name) const | 
| attribute access   | |
| template<typename T > | |
| XS_String | get (const T &attr_name) const | 
| index operator attribute access   | |
| XS_String | operator[] (const XS_String &attr_name) const | 
| bool | back () | 
| go back to previous position   | |
| bool | go_down () | 
| go down to first child   | |
| bool | go_down (const XS_String &child_name, int n=0) | 
| search for child and go down   | |
| bool | iterate (const XS_String &child_name, int &cnt) | 
| iterate to the next matching child   | |
| bool | go (const XPath &xpath) | 
| move to the position defined by xpath in XML tree   | |
| const XS_String & | str () const | 
Protected Member Functions | |
| void | go_to (const XMLNode *child) | 
| go to specified node   | |
Protected Attributes | |
| const XMLNode * | _root | 
| const XMLNode * | _cur | 
| std::stack< const XMLNode * > | _stack | 
iterator for XML trees
Definition at line 2442 of file xmlstorage.h.
| XMLStorage::const_XMLPos::const_XMLPos | ( | const XMLNode * | root ) |  [inline] | 
        
Definition at line 2444 of file xmlstorage.h.
| XMLStorage::const_XMLPos::const_XMLPos | ( | const const_XMLPos & | other ) |  [inline] | 
        
Definition at line 2450 of file xmlstorage.h.
| XMLStorage::const_XMLPos::const_XMLPos | ( | const XMLPos & | other ) |  [inline] | 
        
Definition at line 2456 of file xmlstorage.h.
| bool XMLStorage::const_XMLPos::back | ( | ) |  [inline] | 
        
| const XMLNode& XMLStorage::const_XMLPos::cur | ( | ) |  const [inline] | 
        
access to current node
Definition at line 2463 of file xmlstorage.h.
References _cur.
    {
        return *_cur;
    }
attribute access
Definition at line 2476 of file xmlstorage.h.
References _cur, and XMLStorage::XMLNode::get().
Referenced by XMLStorage::read_option().
    {
        return _cur->get(attr_name);
    }


| XS_String XMLStorage::const_XMLPos::get | ( | const T & | attr_name ) |  const [inline] | 
        
index operator attribute access
Definition at line 2482 of file xmlstorage.h.
References _cur, and XMLStorage::XMLNode::get().
{return _cur->get(attr_name);}

| bool XMLStorage::const_XMLPos::go | ( | const XPath & | xpath ) | 
move to the position defined by xpath in XML tree
Definition at line 125 of file xmlstorage.cpp.
References XMLStorage::XPath::_absolute, _cur, _root, XMLStorage::XMLNode::find_relative(), and go_to().
{
    const XMLNode* node = xpath._absolute? _root: _cur;
    node = node->find_relative(xpath);
    if (node) {
        go_to(node);
        return true;
    } else
        return false;
}

| bool XMLStorage::const_XMLPos::go_down | ( | ) |  [inline] | 
        
go down to first child
Definition at line 2499 of file xmlstorage.h.
References _cur, XMLStorage::XMLNode::get_first_child(), and go_to().
Referenced by XMLRPC::XMLRPCValue::get_any(), XMLRPC::XMLRPCValue::get_array(), XMLRPC::XMLRPCValue::get_binary(), XMLRPC::XMLRPCValue::get_bool(), XMLRPC::XMLRPCValue::get_date(), XMLRPC::XMLRPCValue::get_double(), XMLRPC::XMLRPCValue::get_int(), XMLRPC::XMLRPCValue::get_string(), XMLRPC::XMLRPCValue::get_struct(), XMLRPC::XMLRPCArray::XMLRPCArray(), and XMLRPC::XMLRPCStruct::XMLRPCStruct().
    {
        const XMLNode* node = _cur->get_first_child();
        if (node) {
            go_to(node);
            return true;
        } else
            return false;
    }


| bool XMLStorage::const_XMLPos::go_down | ( | const XS_String & | child_name, | 
| int |  n = 0  | 
        ||
| ) |  [inline] | 
        
search for child and go down
Definition at line 2511 of file xmlstorage.h.
References _cur, XMLStorage::XPathElement::const_find(), and go_to().
    {
        const XMLNode* node = XPathElement(child_name, n).const_find(_cur);
        if (node) {
            go_to(node);
            return true;
        } else
            return false;
    }

| void XMLStorage::const_XMLPos::go_to | ( | const XMLNode * | child ) |  [inline, protected] | 
        
| bool XMLStorage::const_XMLPos::iterate | ( | const XS_String & | child_name, | 
| int & | cnt | ||
| ) |  [inline] | 
        
iterate to the next matching child
Definition at line 2523 of file xmlstorage.h.
References _cur, XMLStorage::XPathElement::const_find(), and go_to().
    {
        const XMLNode* node = XPathElement(child_name, cnt).const_find(_cur);
        if (node) {
            go_to(node);
            ++cnt;
            return true;
        } else
            return false;
    }

| XMLStorage::const_XMLPos::operator const XMLNode * | ( | ) |  const [inline] | 
        
automatic access to current node
Definition at line 2469 of file xmlstorage.h.
References _cur.
{return _cur;}
| const XMLNode& XMLStorage::const_XMLPos::operator* | ( | ) |  const [inline] | 
        
| const XMLNode* XMLStorage::const_XMLPos::operator-> | ( | ) |  const [inline] | 
        
Definition at line 2483 of file xmlstorage.h.
References _cur, and XMLStorage::XMLNode::get().
{return _cur->get(attr_name);}

| const XS_String& XMLStorage::const_XMLPos::str | ( | ) |  const [inline] | 
        
const XMLNode* XMLStorage::const_XMLPos::_cur [protected] | 
        
Definition at line 2556 of file xmlstorage.h.
Referenced by back(), cur(), get(), go(), go_down(), go_to(), iterate(), operator const XMLNode *(), operator*(), operator->(), operator[](), and str().
const XMLNode* XMLStorage::const_XMLPos::_root [protected] | 
        
Definition at line 2555 of file xmlstorage.h.
Referenced by go().
std::stack<const XMLNode*> XMLStorage::const_XMLPos::_stack [protected] | 
        
Definition at line 2557 of file xmlstorage.h.
 1.7.2