libebook::FictionBook2BinaryContext Class Reference documentation

libebook::FictionBook2BinaryContext Class Reference

`#include <FictionBook2BinaryContext.h>`

Inheritance diagram for libebook::FictionBook2BinaryContext:

## Public Member Functions
| FictionBook2BinaryContext (std::shared_ptr< FictionBook2ParserContext > parentContext, FictionBook2Collector *collector)
Public Member Functions inherited from libebook::FictionBook2NodeContextBase
| FictionBook2NodeContextBase (std::shared_ptr< FictionBook2ParserContext > parentContext, FictionBook2Collector *collector=nullptr)
Public Member Functions inherited from libebook::FictionBook2ParserContext
| FictionBook2ParserContext (std::shared_ptr< FictionBook2ParserContext > parentContext, FictionBook2Collector *collector=nullptr)
| Create a new context with `parentContext` as parent.
virtual | ~FictionBook2ParserContext ()
std::shared_ptr< FictionBook2XMLParserContext > | leaveContext () const override
| Destroy this context and return parent.
FictionBook2Collector * | getCollector () const
| Get the collector.
std::shared_ptr< FictionBook2ParserContext > | getParentContext () const
| Get the parent context.
Public Member Functions inherited from libebook::FictionBook2XMLParserContext
virtual | ~FictionBook2XMLParserContext ()=0

## Private Member Functions
std::shared_ptr< FictionBook2XMLParserContext > | element (const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override
| Create a context for parsing a child element.
void | endOfElement () override
| Signalize the end of an element.
void | attribute (const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override
| Process an attribute.
void | text (const char *text) override
| Process textual content of an element.

## Private Attributes
std::string | m_id
std::string | m_contentType

## Constructor & Destructor Documentation

## ◆ FictionBook2BinaryContext()

libebook::FictionBook2BinaryContext::FictionBook2BinaryContext | ( | std::shared_ptr< FictionBook2ParserContext > | parentContext,
|  | FictionBook2Collector * | collector )

## Member Function Documentation

## ◆ attribute()

void libebook::FictionBook2BinaryContext::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()

std::shared_ptr< FictionBook2XMLParserContext > libebook::FictionBook2BinaryContext::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.

## ◆ endOfElement()

void libebook::FictionBook2BinaryContext::endOfElement | ( |  | ) |
| overrideprivatevirtual

Signalize the end of an element.

Implements libebook::FictionBook2XMLParserContext.

## ◆ text()

void libebook::FictionBook2BinaryContext::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_contentType

std::string libebook::FictionBook2BinaryContext::m_contentType
| private

Referenced by attribute(), FictionBook2BinaryContext(), and text().

## ◆ m_id

std::string libebook::FictionBook2BinaryContext::m_id
| private

Referenced by attribute(), FictionBook2BinaryContext(), and text().

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

- FictionBook2BinaryContext.h
- FictionBook2BinaryContext.cpp