libebook::FictionBook2SkipElementContext Class Reference

Context for skipping element hierarchies. More...

#include <FictionBook2ParserContext.h>

Inheritance diagram for libebook::FictionBook2SkipElementContext:
libebook::FictionBook2ParserContext libebook::FictionBook2XMLParserContext

Public Member Functions

 FictionBook2SkipElementContext (FictionBook2ParserContext *parentContext)
 
- Public Member Functions inherited from libebook::FictionBook2ParserContext
 FictionBook2ParserContext (FictionBook2ParserContext *parentContext, FictionBook2Collector *collector=nullptr)
 Create a new context with parentContext as parent. More...
 
FictionBook2CollectorgetCollector () const
 Get the collector. More...
 
FictionBook2ParserContextgetParentContext () const
 Get the parent context. More...
 
- Public Member Functions inherited from libebook::FictionBook2XMLParserContext
virtual ~FictionBook2XMLParserContext ()=0
 

Private Member Functions

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

Private Attributes

unsigned m_level
 

Detailed Description

Context for skipping element hierarchies.

Constructor & Destructor Documentation

◆ FictionBook2SkipElementContext()

libebook::FictionBook2SkipElementContext::FictionBook2SkipElementContext ( FictionBook2ParserContext parentContext)
explicit

Member Function Documentation

◆ attribute()

void libebook::FictionBook2SkipElementContext::attribute ( const FictionBook2TokenData name,
const FictionBook2TokenData ns,
const char *  value 
)
overrideprivatevirtual

Process an attribute.

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

Implements libebook::FictionBook2XMLParserContext.

◆ element()

FictionBook2XMLParserContext * libebook::FictionBook2SkipElementContext::element ( const FictionBook2TokenData name,
const FictionBook2TokenData ns 
)
overrideprivatevirtual

Create a context for parsing a child element.

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

Implements libebook::FictionBook2XMLParserContext.

◆ endOfAttributes()

void libebook::FictionBook2SkipElementContext::endOfAttributes ( )
overrideprivatevirtual

Signalize the end of attributes.

Implements libebook::FictionBook2XMLParserContext.

◆ endOfElement()

void libebook::FictionBook2SkipElementContext::endOfElement ( )
overrideprivatevirtual

Signalize the end of an element.

Implements libebook::FictionBook2XMLParserContext.

◆ leaveContext()

FictionBook2XMLParserContext * libebook::FictionBook2SkipElementContext::leaveContext ( ) const
overrideprivatevirtual

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::FictionBook2ParserContext.

◆ startOfElement()

void libebook::FictionBook2SkipElementContext::startOfElement ( )
overrideprivatevirtual

Signalize the start of an element.

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

Implements libebook::FictionBook2XMLParserContext.

◆ text()

void libebook::FictionBook2SkipElementContext::text ( const char *  value)
overrideprivatevirtual

Process textual content of an element.

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

Implements libebook::FictionBook2XMLParserContext.

Member Data Documentation

◆ m_level

unsigned libebook::FictionBook2SkipElementContext::m_level
private

Referenced by element(), endOfElement(), and leaveContext().


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

Generated for libe-book by doxygen 1.8.14