libebook::FictionBook2SectionContext Class Reference documentation

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

`#include <FictionBook2BlockContext.h>`

Inheritance diagram for libebook::FictionBook2SectionContext:

## Public Member Functions
| FictionBook2SectionContext (FictionBook2ParserContext *parentContext, const boost::optional< std::string > &lang)
| FictionBook2SectionContext (FictionBook2ParserContext *parentContext, uint8_t level, const boost::optional< std::string > &lang)
Public Member Functions inherited from libebook::FictionBook2NodeContextBase
| 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. More...
FictionBook2XMLParserContext * | leaveContext () const override
| Destroy this context and return parent. More...
FictionBook2Collector * | getCollector () const
| Get the collector. More...
FictionBook2ParserContext * | getParentContext () const
| Get the parent context. More...
Public Member Functions inherited from libebook::FictionBook2XMLParserContext
virtual | ~FictionBook2XMLParserContext ()=0
virtual FictionBook2XMLParserContext * | leaveContext () const =0
| Destroy this context and return parent. More...
virtual FictionBook2XMLParserContext * | element (const FictionBook2TokenData &name, const FictionBook2TokenData &ns)=0
| Create a context for parsing a child element. More...
virtual void | startOfElement ()=0
| Signalize the start of an element. More...
virtual void | endOfElement ()=0
| Signalize the end of an element. More...
virtual void | attribute (const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value)=0
| Process an attribute. More...
virtual void | endOfAttributes ()=0
| Signalize the end of attributes. More...
virtual void | text (const char *value)=0
| Process textual content of an element. More...

## Private Member Functions
FictionBook2XMLParserContext * | element (const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override
| Create a context for parsing a child 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...
FictionBook2BlockFormat | makeBlockFormat () const

## Private Attributes
boost::optional< uint8_t > | m_level
boost::optional< std::string > | m_lang

## Constructor & Destructor Documentation

## ◆ FictionBook2SectionContext() [1/2]

libebook::FictionBook2SectionContext::FictionBook2SectionContext | ( | FictionBook2ParserContext * | parentContext,
|  | const boost::optional< std::string > & | lang
| ) |  |

## ◆ FictionBook2SectionContext() [2/2]

libebook::FictionBook2SectionContext::FictionBook2SectionContext | ( | FictionBook2ParserContext * | parentContext,
|  | uint8_t | level,
|  | const boost::optional< std::string > & | lang
| ) |  |

## Member Function Documentation

## ◆ attribute()

void libebook::FictionBook2SectionContext::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::FictionBook2SectionContext::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::FictionBook2SectionContext::endOfElement | ( |  | ) |
| overrideprivatevirtual

Signalize the end of an element.

Implements libebook::FictionBook2XMLParserContext.

## ◆ makeBlockFormat()

FictionBook2BlockFormat libebook::FictionBook2SectionContext::makeBlockFormat | ( |  | ) | const
| private

Referenced by element().

## Member Data Documentation

## ◆ m_lang

boost::optional<std::string> libebook::FictionBook2SectionContext::m_lang
| private

Referenced by attribute(), element(), and makeBlockFormat().

## ◆ m_level

boost::optional<uint8_t> libebook::FictionBook2SectionContext::m_level
| private

Referenced by element().

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

- FictionBook2BlockContext.h
- FictionBook2BlockContext.cpp