|
ContRap-Core
|
Class XMLPool is a query class object for XML-trees. More...
#include <xmlpool.h>
Public Member Functions | |
| XMLPool (const std::string &text="") | |
| Creates a new parser. | |
| virtual | ~XMLPool () |
| Cleans up the memory. | |
| std::string | get_value (const std::string &key) |
| Returns a value. | |
| std::string * | is_set (const std::string &key) |
| Returns true if the key has an entry. | |
| std::string | to_string () |
| Prints the pool to a string. | |
Protected Member Functions | |
| virtual bool | start () |
| XML parser event functions. | |
| virtual bool | enter (const std::string &tag, std::map< std::string, std::string > &attributes, bool end) |
| Event functions are called on entering, parsing and leaving tags. | |
| virtual bool | content (const std::string &tag, std::map< std::string, std::string > &attributes, const std::string &value, int count) |
| virtual bool | leave (const std::string &tag, std::map< std::string, std::string > &attributes) |
Protected Attributes | |
| std::map< std::string, std::string > | entries |
| Pool data structure. | |
| std::stack< std::string > | keys |
| Currently parsed key. | |
| crp::XMLPool::XMLPool | ( | const std::string & | text = "" | ) |
Creates a new parser.
| text | XML-formatted string |
| virtual crp::XMLPool::~XMLPool | ( | ) | [virtual] |
Cleans up the memory.
| virtual bool crp::XMLPool::content | ( | const std::string & | tag, |
| std::map< std::string, std::string > & | attributes, | ||
| const std::string & | value, | ||
| int | count | ||
| ) | [protected, virtual] |
Reimplemented from crp::XMLParser.
| virtual bool crp::XMLPool::enter | ( | const std::string & | tag, |
| std::map< std::string, std::string > & | attributes, | ||
| bool | end | ||
| ) | [protected, virtual] |
Event functions are called on entering, parsing and leaving tags.
A false returned by an event function results in an error break.
Reimplemented from crp::XMLParser.
| std::string crp::XMLPool::get_value | ( | const std::string & | key | ) |
Returns a value.
| key | Key of the entry with tags separated by ':' |
| std::string* crp::XMLPool::is_set | ( | const std::string & | key | ) |
Returns true if the key has an entry.
| key | Key of the entry with tags separated by ':' |
| virtual bool crp::XMLPool::leave | ( | const std::string & | tag, |
| std::map< std::string, std::string > & | attributes | ||
| ) | [protected, virtual] |
Reimplemented from crp::XMLParser.
| virtual bool crp::XMLPool::start | ( | ) | [protected, virtual] |
XML parser event functions.
Reimplemented from crp::XMLParser.
| std::string crp::XMLPool::to_string | ( | ) |
Prints the pool to a string.
std::map<std::string, std::string> crp::XMLPool::entries [protected] |
Pool data structure.
std::stack<std::string> crp::XMLPool::keys [protected] |
Currently parsed key.
1.7.3