|
Aegis
4.25.D505
|
#include <by_node.h>
Public Member Functions | |
| virtual | ~xml_text_reader_by_node () |
| xml_text_reader_by_node (input &deeper, bool validate=false) | |
| void | register_node_handler (const nstring &name, xml_node &handler) |
| void | process_node (void) |
| void | process_node_end (bool empty) |
Private Member Functions | |
| void | push_name (const nstring &name) |
| void | pop_name (const nstring &name) |
| void | calculate_current_node_handler (void) |
| xml_text_reader_by_node () | |
| xml_text_reader_by_node (const xml_text_reader_by_node &) | |
| xml_text_reader_by_node & | operator= (const xml_text_reader_by_node &) |
Private Attributes | |
| symtab< xml_node > | handlers |
| nstring_list | names |
| xml_node * | current_node |
The xml_text_reader_by_node class is used to represent an XML text reader which dispatches nodes to their registered handlers.
| virtual xml_text_reader_by_node::~xml_text_reader_by_node | ( | ) | [virtual] |
The destructor.
| xml_text_reader_by_node::xml_text_reader_by_node | ( | input & | deeper, |
| bool | validate = false |
||
| ) |
The constructor.
| xml_text_reader_by_node::xml_text_reader_by_node | ( | ) | [private] |
The default constructor. Do not use.
| xml_text_reader_by_node::xml_text_reader_by_node | ( | const xml_text_reader_by_node & | ) | [private] |
The copy constructor. Do not use.
| void xml_text_reader_by_node::calculate_current_node_handler | ( | void | ) | [private] |
The calculate_current_node_handler method is used to set the current_node from the name at the top of the names stack.
| xml_text_reader_by_node& xml_text_reader_by_node::operator= | ( | const xml_text_reader_by_node & | ) | [private] |
The assignment operator. Do not use.
| void xml_text_reader_by_node::pop_name | ( | const nstring & | name | ) | [private] |
the pop_name method is used to tack action when the end of an entity or element is seen.
| void xml_text_reader_by_node::process_node | ( | void | ) | [virtual] |
The process_node method is used to process each node as it is read from the input. Each derived class must supply its own process_node method.
Implements xml_text_reader.
| void xml_text_reader_by_node::process_node_end | ( | bool | empty | ) | [virtual] |
The process_node_end method is only ever called for ELEMENT nodes, and only after all of the attributes have been given to the process_node method.
The default implimentation does nothing.
| empty | Whether or not the original ELEMENT node was empty. |
Reimplemented from xml_text_reader.
| void xml_text_reader_by_node::push_name | ( | const nstring & | name | ) | [private] |
the push_name method is used to tack action when the beginning of an entity or element is seen.
| void xml_text_reader_by_node::register_node_handler | ( | const nstring & | name, |
| xml_node & | handler | ||
| ) |
The register_node_handler method is sued to register a node name and a corresponding handler.
| name | The name of the node to be handled. Nodes are named ratyher like UNIX paths, they are slash separated. E.g. parent/ child/ subchild, etc. NO wildcards are available. |
| handler | The object which will process the named nodes. Note that (depending on the DTD) this may be called from more than one instance, but always with begin/end pairs, so it is possible to keep track. |
xml_node* xml_text_reader_by_node::current_node [private] |
symtab<xml_node> xml_text_reader_by_node::handlers [private] |
nstring_list xml_text_reader_by_node::names [private] |
1.7.6.1