Parser Class Reference

This class is an abstraction of libiksemel's XML parser. More...

#include <parser.h>

Collaboration diagram for Parser:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ParserState { PARSER_OK, PARSER_NOMEM, PARSER_BADXML }

Public Member Functions

 Parser (ClientBase *parent)
virtual ~Parser ()
ParserState feed (const std::string &data)

Friends

int cdataHook (Parser *parser, char *data, size_t len)
int tagHook (Parser *parser, char *name, char **atts, int type)

Detailed Description

This class is an abstraction of libiksemel's XML parser.

Author:
Jakob Schroeter <js@camaya.net>
Since:
0.4

Definition at line 36 of file parser.h.


Member Enumeration Documentation

enum ParserState
 

Describes the return values of the parser.

Enumerator:
PARSER_OK  Everything's alright.
PARSER_NOMEM  Memory allcation error.
PARSER_BADXML  XML parse error.

Definition at line 42 of file parser.h.


Constructor & Destructor Documentation

Parser ClientBase parent  ) 
 

Constructs a new Parser object.

Parameters:
parent The object to send incoming Tags to.

Definition at line 24 of file parser.cpp.

References Parser::cdataHook, and Parser::tagHook.

~Parser  )  [virtual]
 

Virtual destructor.

Definition at line 30 of file parser.cpp.


Member Function Documentation

Parser::ParserState feed const std::string &  data  ) 
 

Use this function to feed the parser with more XML.

Parameters:
data Raw xml to parse.
Returns:
The return value indicates success or failure of the parsing.

Definition at line 36 of file parser.cpp.

References Parser::PARSER_BADXML, Parser::PARSER_NOMEM, and Parser::PARSER_OK.

Referenced by Connection::recv().


The documentation for this class was generated from the following files:
Generated on Mon Jan 16 16:19:59 2006 for gloox by  doxygen 1.4.6