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

Base class for leaf data element contexts. More...

`#include <FictionBook2ParserContext.h>`

Inheritance diagram for libebook::FictionBook2DataContextBase:

## Public Member Functions
| FictionBook2DataContextBase (FictionBook2ParserContext *parentContext)
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 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
FictionBook2XMLParserContext * | element (const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override
| Create a context for parsing a child element.
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 leaf data element contexts.

It provides empty implementations for functions that are typically not needed for processing leaf data elements (i.e., empty elements that only have attributes).

Note
  The parser inserts an artificial endOfElement() call for empty elements.

## Constructor & Destructor Documentation

## ◆ FictionBook2DataContextBase()

libebook::FictionBook2DataContextBase::FictionBook2DataContextBase | ( | FictionBook2ParserContext * | parentContext | ) |
| explicit

## Member Function Documentation

## ◆ element()

FictionBook2XMLParserContext * libebook::FictionBook2DataContextBase::element | ( | const FictionBook2TokenData & | name,
|  | const FictionBook2TokenData & | ns )
| override 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::FictionBook2XMLParserContext.

## ◆ endOfAttributes()

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

Signalize the end of attributes.

Implements libebook::FictionBook2XMLParserContext.

Reimplemented in libebook::FictionBook2InlineImageContext.

## ◆ startOfElement()

void libebook::FictionBook2DataContextBase::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::FictionBook2InlineImageContext.

## ◆ text()

void libebook::FictionBook2DataContextBase::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