libexpatpp 0.1.8
Public Member Functions | List of all members
xmlpp::abstract_delegate Class Reference

default base class for delegates. More...

#include <delegate.hpp>

Inheritance diagram for xmlpp::abstract_delegate:
Inheritance graph
[legend]
Collaboration diagram for xmlpp::abstract_delegate:
Collaboration graph
[legend]

Public Member Functions

void onStartElement (const XML_Char *fullname, const XML_Char **atts) override
 this callback is called after parsing the starting tag of an xml element.
 
void onEndElement (const XML_Char *fullname) override
 callback is called after parsing the end tag of an xml element
 
void onCharacterData (const char *pBuf, int len) override
 callback is called with parsed character data inside of an xml element.
 
void onProcessingInstruction (const XML_Char *target, const XML_Char *data) override
 delegate function is called if an xml processing instruction was found
 
void onUnparsedEntityDecl (const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName) override
 
void onNotationDecl (const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) override
 delegate function is called if an notation declaration was parsed
 
void onStartNamespace (const XML_Char *prefix, const XML_Char *uri) override
 delegate function is called when an xml namespace is started/ opened
 
void onEndNamespace (const XML_Char *) override
 delegate function is called when an xml namespace is ended
 
void onAttlistDecl (const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, bool isrequired) override
 delegate function is called if an element attribute list declaration is parsed.
 
void onStartCdataSection () override
 callback will be called if the begin of a PCDATA section was parsed
 
void onEndCdataSection () override
 callback will be called after the end of a PCDATA section was parsed
 
void onStartDoctypeDecl (const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset) override
 delegate function is called when a DTD (document type definition) xml entry is parsed.
 
void onEndDoctypeDecl () override
 delegate function is called if end of DTD is parsed from xml data
 
void onComment (const XML_Char *data) override
 callback called on parsed xml comment
 
void onElementDecl (const XML_Char *name, XML_Content *model) override
 delegate function is called if an DTD element declaration is parsed from xml data.
 
void onEntityDecl (const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName) override
 delegate function is called if an entity declaration was parsed

 
void onSkippedEntity (const XML_Char *entityName, int is_parameter_entity) override
 
void onXmlDecl (const XML_Char *version, const XML_Char *encoding, int standalone) override
 delegate function is called after the (starting) xml declaration is parsed.
 
void onParseError (size_t line, size_t column, size_t pos, Error error) override
 function is called if on parsing a parse error is detected
 

Detailed Description

default base class for delegates.

only needed methods needs to be overridden, all interface maethods have an empt default implementation

Member Function Documentation

◆ onAttlistDecl()

void xmlpp::abstract_delegate::onAttlistDecl ( const XML_Char *  elname,
const XML_Char *  attname,
const XML_Char *  att_type,
const XML_Char *  dflt,
bool  isrequired 
)
overridevirtual

delegate function is called if an element attribute list declaration is parsed.

Parameters
elnamename of the declared element this attribute list refers to
attnamename of the declared attribute
att_typetype of the declared attribute
dflt
isrequiredtrue if attribute is required, false if optional

Implements xmlpp::delegate.

◆ onCharacterData()

void xmlpp::abstract_delegate::onCharacterData ( const char *  pBuf,
int  len 
)
overridevirtual

callback is called with parsed character data inside of an xml element.

it may called more than once if the text inside of an xml element does not fit into the parse buffer.

Parameters
pBufpointer to the text data
lenlen of the returned string

Implements xmlpp::delegate.

Reimplemented in xmlpp::StatefulDelegate.

◆ onComment()

void xmlpp::abstract_delegate::onComment ( const XML_Char *  data)
overridevirtual

callback called on parsed xml comment

Parameters
datacontains the content of the comment
Todo:
check if called more than once for one comment

Implements xmlpp::delegate.

◆ onElementDecl()

void xmlpp::abstract_delegate::onElementDecl ( const XML_Char *  name,
XML_Content *  model 
)
overridevirtual

delegate function is called if an DTD element declaration is parsed from xml data.

for details of the model see expat library documentation

Parameters
namename of the declared element
modelthe content model for the declared element

Implements xmlpp::delegate.

◆ onEndCdataSection()

void xmlpp::abstract_delegate::onEndCdataSection ( )
overridevirtual

callback will be called after the end of a PCDATA section was parsed

Implements xmlpp::delegate.

◆ onEndDoctypeDecl()

void xmlpp::abstract_delegate::onEndDoctypeDecl ( )
overridevirtual

delegate function is called if end of DTD is parsed from xml data

Implements xmlpp::delegate.

◆ onEndElement()

void xmlpp::abstract_delegate::onEndElement ( const XML_Char *  fullname)
overridevirtual

callback is called after parsing the end tag of an xml element

Parameters
fullnamename of the ended sml element

Implements xmlpp::delegate.

Reimplemented in xmlpp::StatefulDelegate.

◆ onEndNamespace()

void xmlpp::abstract_delegate::onEndNamespace ( const XML_Char *  prefix)
overridevirtual

delegate function is called when an xml namespace is ended

Parameters
prefixprefix of the xml namespace

Implements xmlpp::delegate.

◆ onEntityDecl()

void xmlpp::abstract_delegate::onEntityDecl ( const XML_Char *  entityName,
int  is_parameter_entity,
const XML_Char *  value,
int  value_length,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId,
const XML_Char *  notationName 
)
overridevirtual

delegate function is called if an entity declaration was parsed

Parameters
entityNamename of the declared entity
is_parameter_entity
value
value_length
base
systemId
publicId
notationName

Implements xmlpp::delegate.

◆ onNotationDecl()

void xmlpp::abstract_delegate::onNotationDecl ( const XML_Char *  notationName,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId 
)
overridevirtual

delegate function is called if an notation declaration was parsed

Parameters
notationNamename of the declared notation
base
systemId
publicId

Implements xmlpp::delegate.

◆ onParseError()

void xmlpp::abstract_delegate::onParseError ( size_t  line,
size_t  column,
size_t  pos,
Error  error 
)
overridevirtual

function is called if on parsing a parse error is detected

Parameters
lineline in xml file or string where the error is detected
columncolumn in xml file or string where the error is detected
posposition of detected parse error in bytes from begin of parsing
errorerror code for type of parse error (wrapper for XML_Error from expat

Implements xmlpp::delegate.

◆ onProcessingInstruction()

void xmlpp::abstract_delegate::onProcessingInstruction ( const XML_Char *  target,
const XML_Char *  data 
)
overridevirtual

delegate function is called if an xml processing instruction was found

Parameters
targetTODO
dataTODO

Implements xmlpp::delegate.

◆ onSkippedEntity()

void xmlpp::abstract_delegate::onSkippedEntity ( const XML_Char *  entityName,
int  is_parameter_entity 
)
overridevirtual

Implements xmlpp::delegate.

◆ onStartCdataSection()

void xmlpp::abstract_delegate::onStartCdataSection ( )
overridevirtual

callback will be called if the begin of a PCDATA section was parsed

Implements xmlpp::delegate.

◆ onStartDoctypeDecl()

void xmlpp::abstract_delegate::onStartDoctypeDecl ( const XML_Char *  doctypeName,
const XML_Char *  sysid,
const XML_Char *  pubid,
int  has_internal_subset 
)
overridevirtual

delegate function is called when a DTD (document type definition) xml entry is parsed.

Parameters
doctypeNamename of the document type definition
sysidsystem Id
pubidpublic id
has_internal_subsetdtd has an internal subset

Implements xmlpp::delegate.

◆ onStartElement()

void xmlpp::abstract_delegate::onStartElement ( const XML_Char *  fullname,
const XML_Char **  atts 
)
overridevirtual

this callback is called after parsing the starting tag of an xml element.

Parameters
fullnamename of the started xml element
attslist of elements attributes as list of key and value strings

Implements xmlpp::delegate.

Reimplemented in xmlpp::StatefulDelegate.

◆ onStartNamespace()

void xmlpp::abstract_delegate::onStartNamespace ( const XML_Char *  prefix,
const XML_Char *  uri 
)
overridevirtual

delegate function is called when an xml namespace is started/ opened

Parameters
prefixprefix of the xml namespace
uriuri of namespace

Implements xmlpp::delegate.

◆ onUnparsedEntityDecl()

void xmlpp::abstract_delegate::onUnparsedEntityDecl ( const XML_Char *  entityName,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId,
const XML_Char *  notationName 
)
overridevirtual

Implements xmlpp::delegate.

◆ onXmlDecl()

void xmlpp::abstract_delegate::onXmlDecl ( const XML_Char *  version,
const XML_Char *  encoding,
int  standalone 
)
overridevirtual

delegate function is called after the (starting) xml declaration is parsed.

Parameters
versionthe xml version
encodingthe encoding of the following xml content
standalone1 for standalone xml file

Implements xmlpp::delegate.


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