Public Member Functions | Private Member Functions | List of all members
libebook::FictionBook2NodeContextBase Class Reference

Base class for non-leaf element contexts. More...

`#include <FictionBook2ParserContext.h>`

Inheritance diagram for libebook::FictionBook2NodeContextBase:

## Public Member Functions
| FictionBook2NodeContextBase (FictionBook2ParserContext *parentContext, FictionBook2Collector *collector=nullptr)
Public Member Functions inherited from libebook::FictionBook2ParserContext
| FictionBook2ParserContext (FictionBook2ParserContext *parentContext, FictionBook2Collector *collector=nullptr)
| Create a new context with `parentContext` as parent.
FictionBook2XMLParserContext * | leaveContext () const override
| Destroy this context and return parent.
FictionBook2Collector * | getCollector () const
| Get the collector.
FictionBook2ParserContext * | getParentContext () const
| Get the parent context.
Public Member Functions inherited from libebook::FictionBook2XMLParserContext
virtual | ~FictionBook2XMLParserContext ()=0
virtual FictionBook2XMLParserContext * | element (const FictionBook2TokenData &name, const FictionBook2TokenData &ns)=0
| Create a context for parsing a child element.
virtual void | endOfElement ()=0
| Signalize the end of an element.
virtual void | attribute (const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value)=0
| Process an attribute.

## Private Member Functions
void | startOfElement () override
| Signalize the start of an element.
void | endOfAttributes () override
| Signalize the end of attributes.
void | text (const char *value) override
| Process textual content of an element.

## Detailed Description

Base class for non-leaf element contexts.

It provides empty implementations for functions that are typically not needed for processing non-leaf elements.

## Constructor & Destructor Documentation

## ◆ FictionBook2NodeContextBase()

libebook::FictionBook2NodeContextBase::FictionBook2NodeContextBase | ( | FictionBook2ParserContext * | parentContext,
|  | FictionBook2Collector * | collector = nullptr )
| explicit

## Member Function Documentation

## ◆ endOfAttributes()

void libebook::FictionBook2NodeContextBase::endOfAttributes | ( |  | ) |
| override private virtual

Signalize the end of attributes.

Implements libebook::FictionBook2XMLParserContext.

## ◆ startOfElement()

void libebook::FictionBook2NodeContextBase::startOfElement | ( |  | ) |
| override private virtual

Signalize the start of an element.

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

Implements libebook::FictionBook2XMLParserContext.

Reimplemented in libebook::FictionBook2PoemContext, and libebook::FictionBook2TableContext.

## ◆ text()

void libebook::FictionBook2NodeContextBase::text | ( | const char * | value | ) |
| override private virtual

Process textual content of an element.

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

Implements libebook::FictionBook2XMLParserContext.

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

- FictionBook2ParserContext.h
- FictionBook2ParserContext.cpp