Edinburgh Speech Tools  2.1-release
XML_Parser Class Reference

#include <include/rxp/XML_Parser.h>

Collaboration diagram for XML_Parser:

Public Member Functions

 ~XML_Parser ()
 Destructor, may close input if required. More...
 
void track_context (bool flag)
 
void track_contents (bool flag)
 
EST_String context (int n)
 
void go ()
 Run the parser. More...
 

Protected Member Functions

 XML_Parser (XML_Parser_Class &parent, InputSource source, Entity initial_entity, void *data)
 Creator used by XML_Parser_Class::make_parser() More...
 
InputSource open (Entity ent)
 Open. Asks the parser class to do the work. More...
 
const char * get_error ()
 Get the error message for the last error. More...
 

Protected Attributes

XML_Parser_Classpclass
 
XBit current_bit
 The piece of markup being processed. More...
 
InputSource source
 Where we are reading from. More...
 
Entity initial_entity
 
void * data
 Arbitrary data which can be used by callbacks. More...
 
Parser p
 The RXP parser object. More...
 
EST_TDeque< EST_Stringp_context
 If context is being tracked, this is a stack of element names. More...
 

Friends

class XML_Parser_Class
 

Detailed Description

An actual parser. Each such instance parses just one stream which is given when the parser is created.

The behaviour of the parser is given by the class to which it belongs.

Definition at line 240 of file XML_Parser.h.

Constructor & Destructor Documentation

XML_Parser::XML_Parser ( XML_Parser_Class parent,
InputSource  source,
Entity  initial_entity,
void *  data 
)
protected

Creator used by XML_Parser_Class::make_parser()

Definition at line 251 of file XML_Parser.cc.

XML_Parser::~XML_Parser ( )

Destructor, may close input if required.

Definition at line 269 of file XML_Parser.cc.

Member Function Documentation

InputSource XML_Parser::open ( Entity  ent)
protected

Open. Asks the parser class to do the work.

Definition at line 277 of file XML_Parser.cc.

const char * XML_Parser::get_error ( )
protected

Get the error message for the last error.

Definition at line 403 of file XML_Parser.cc.

void XML_Parser::track_context ( bool  flag)

Request that parser keep track of the currently open elements.

These are recorded on a atsck. Use context() to access the information.

Definition at line 391 of file XML_Parser.cc.

void XML_Parser::track_contents ( bool  flag)

Keep track of the content of open elements.

Not yet implemented.

Definition at line 396 of file XML_Parser.cc.

EST_String XML_Parser::context ( int  n)

Get the name of the nth enclosing element.

context(0) is the element we are directly inside.

Definition at line 458 of file XML_Parser.cc.

void XML_Parser::go ( )

Run the parser.

Definition at line 282 of file XML_Parser.cc.

Friends And Related Function Documentation

friend class XML_Parser_Class
friend

Definition at line 316 of file XML_Parser.h.

Member Data Documentation

XML_Parser_Class* XML_Parser::pclass
protected

The class to which this parser belongs. Defines the behaviour of the parser.

Definition at line 256 of file XML_Parser.h.

XBit XML_Parser::current_bit
protected

The piece of markup being processed.

Definition at line 259 of file XML_Parser.h.

InputSource XML_Parser::source
protected

Where we are reading from.

Definition at line 262 of file XML_Parser.h.

Entity XML_Parser::initial_entity
protected

The entity we started from. May need to be freed at the end of the parse.

Definition at line 267 of file XML_Parser.h.

void* XML_Parser::data
protected

Arbitrary data which can be used by callbacks.

Definition at line 270 of file XML_Parser.h.

Parser XML_Parser::p
protected

The RXP parser object.

Definition at line 273 of file XML_Parser.h.

EST_TDeque<EST_String> XML_Parser::p_context
protected

If context is being tracked, this is a stack of element names.

Definition at line 276 of file XML_Parser.h.


The documentation for this class was generated from the following files: