libebook::FB2SkipElementContext Class Reference

Context for skipping element hierarchies. More...

#include <FB2ParserContext.h>

Inheritance diagram for libebook::FB2SkipElementContext:
libebook::FB2ParserContext libebook::FB2XMLParserContext

List of all members.

Public Member Functions

 FB2SkipElementContext (FB2ParserContext *parentContext)

Private Member Functions

virtual FB2XMLParserContextleaveContext () const
 Destroy this context and return parent.
virtual FB2XMLParserContextelement (const EBOOKToken &name, const EBOOKToken &ns)
 Create a context for parsing a child element.
virtual void startOfElement ()
 Signalize the start of an element.
virtual void endOfElement ()
 Signalize the end of an element.
virtual void attribute (const EBOOKToken &name, const EBOOKToken *ns, const char *value)
 Process an attribute.
virtual void endOfAttributes ()
 Signalize the end of attributes.
virtual void text (const char *value)
 Process textual content of an element.

Private Attributes

unsigned m_level

Detailed Description

Context for skipping element hierarchies.


Constructor & Destructor Documentation


Member Function Documentation

void libebook::FB2SkipElementContext::attribute ( const EBOOKToken name,
const EBOOKToken ns,
const char *  value 
) [private, virtual]

Process an attribute.

Attributes are handled to the current element's context one by one.

Implements libebook::FB2XMLParserContext.

FB2XMLParserContext * libebook::FB2SkipElementContext::element ( const EBOOKToken name,
const EBOOKToken ns 
) [private, virtual]

Create a context for parsing a child element.

Returns:
A new context or 0 if the child element cannot be handled.

Implements libebook::FB2XMLParserContext.

Signalize the end of attributes.

Implements libebook::FB2XMLParserContext.

void libebook::FB2SkipElementContext::endOfElement ( ) [private, virtual]

Signalize the end of an element.

Implements libebook::FB2XMLParserContext.

Destroy this context and return parent.

Todo:
It would be handier to use shared_ptr to manage the context lifetimes.
Returns:
The parent context.

Reimplemented from libebook::FB2ParserContext.

Signalize the start of an element.

This can be used if initialization of the context needs virtual function calls.

Implements libebook::FB2XMLParserContext.

void libebook::FB2SkipElementContext::text ( const char *  value) [private, virtual]

Process textual content of an element.

This function can be called more than once if the element has mixed content.

Implements libebook::FB2XMLParserContext.


Member Data Documentation


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