Main Page | Class Hierarchy | Class List | File List | Class Members

RAX_Parser Class Reference

#include <rax_parser.h>

Inheritance diagram for RAX_Parser:

RAX_Parser_SPH List of all members.

Public Member Functions

 RAX_Parser ()
virtual void start_element (const std::string &name, AttributeList &attributes)
virtual void end_element (const std::string &name)
virtual void text (const std::string &name, const std::string &t)
bool parse (const std::string &filename)
void push_handlers ()
void pop_handlers ()
void set_handler (const std::string &element_name, Pointer< RAX_Handler > handler)
virtual ~RAX_Parser ()

Static Public Member Functions

const std::string xmlch_to_string (const XMLCh *const name)

Detailed Description

Recursive API for XML.

Author:
Moritz Franosch


Constructor & Destructor Documentation

RAX_Parser::RAX_Parser  ) 
 

Constructs a RAX Parser.

RAX_Parser::~RAX_Parser  )  [virtual]
 

Virtual destructor.


Member Function Documentation

void RAX_Parser::end_element const std::string &  name  )  [virtual]
 

Called whenever an end-tag is encountered.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

name The name of the end-tag.

Reimplemented in RAX_Parser_SPH.

bool RAX_Parser::parse const std::string &  filename  ) 
 

Parses XML-File filename.

Returns true if successful.

Reimplemented in RAX_Parser_SPH.

void RAX_Parser::pop_handlers  ) 
 

Pops the last pushed handles from the stack.

void RAX_Parser::push_handlers  ) 
 

Pushes the current handlers on the stack.

void RAX_Parser::set_handler const std::string &  element_name,
Pointer< RAX_Handler handler
 

Sets *handler as a handler for element with name element_name.

void RAX_Parser::start_element const std::string &  name,
AttributeList &  attributes
[virtual]
 

Called whenever a start-tag is encountered.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

name The name of the end-tag.

attributes The specified or defaulted attributes.

Reimplemented in RAX_Parser_SPH.

void RAX_Parser::text const std::string &  name,
const std::string &  t
[virtual]
 

Called whenever a start- or an end-tag is encountered.

By default, do nothing. Application writers may override this method in a subclass to take specific actions for each chunk of character data.

name The name of the XML-tag in which context the character data was collected.

t The character data.

Reimplemented in RAX_Parser_SPH.

const string RAX_Parser::xmlch_to_string const XMLCh *const  name  )  [static]
 

Converts a XMLCh* to a std::string.


The documentation for this class was generated from the following files:
Generated on Fri Apr 22 11:06:46 2005 for partsim.kdevelop by doxygen 1.3.6