#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 | 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 () |
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 |
Definition at line 32 of file by_node.h.
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.
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 adela with the named nodes. Noth 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. |
void xml_text_reader_by_node::process_node | ( | ) | [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::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::calculate_current_node_handler | ( | ) | [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.
symtab<xml_node> xml_text_reader_by_node::handlers [private] |
nstring_list xml_text_reader_by_node::names [private] |
xml_node* xml_text_reader_by_node::current_node [private] |