libebook::FictionBook2StyleContextBase Class Reference documentation

libebook::FictionBook2StyleContextBase Class Reference

`#include <FictionBook2ParserContext.h>`

Inheritance diagram for libebook::FictionBook2StyleContextBase:

## Public Member Functions
| FictionBook2StyleContextBase (std::shared_ptr< FictionBook2ParserContext > parentContext, const FictionBook2Style &style)
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
virtual void | startOfElement ()=0
| Signalize the start of an element.

## Protected Member Functions
FictionBook2Style & | getStyle ()
FictionBook2TextFormat & | getTextFormat ()
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 | endOfAttributes () override
| Signalize the end of attributes.
void | text (const char *value) override
| Process textual content of an element.

## Private Attributes
FictionBook2Style | m_style

## Constructor & Destructor Documentation

## ◆ FictionBook2StyleContextBase()

libebook::FictionBook2StyleContextBase::FictionBook2StyleContextBase | ( | std::shared_ptr< FictionBook2ParserContext > | parentContext,
|  | const FictionBook2Style & | style )

Referenced by libebook::FictionBook2AContext::FictionBook2AContext(), libebook::FictionBook2CellContext::FictionBook2CellContext(), libebook::FictionBook2CodeContext::FictionBook2CodeContext(), libebook::FictionBook2EmphasisContext::FictionBook2EmphasisContext(), libebook::FictionBook2ParaContextBase::FictionBook2ParaContextBase(), libebook::FictionBook2StrikethroughContext::FictionBook2StrikethroughContext(), libebook::FictionBook2StrongContext::FictionBook2StrongContext(), libebook::FictionBook2StyleContext::FictionBook2StyleContext(), libebook::FictionBook2SubContext::FictionBook2SubContext(), and libebook::FictionBook2SupContext::FictionBook2SupContext().

## Member Function Documentation

## ◆ attribute()

void libebook::FictionBook2StyleContextBase::attribute | ( | const FictionBook2TokenData & | name,
|  | const FictionBook2TokenData * | ns,
|  | const char * | value )
| overrideprotectedvirtual

Process an attribute.

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

Implements libebook::FictionBook2XMLParserContext.

Referenced by libebook::FictionBook2ParaContextBase::attribute().

## ◆ element()

std::shared_ptr< FictionBook2XMLParserContext > libebook::FictionBook2StyleContextBase::element | ( | const FictionBook2TokenData & | name,
|  | const FictionBook2TokenData & | ns )
| overrideprotectedvirtual

Create a context for parsing a child element.

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

Implements libebook::FictionBook2XMLParserContext.

Referenced by libebook::FictionBook2AContext::element().

## ◆ endOfAttributes()

void libebook::FictionBook2StyleContextBase::endOfAttributes | ( |  | ) |
| overrideprotectedvirtual

Signalize the end of attributes.

Implements libebook::FictionBook2XMLParserContext.

## ◆ endOfElement()

void libebook::FictionBook2StyleContextBase::endOfElement | ( |  | ) |
| overrideprotectedvirtual

Signalize the end of an element.

Implements libebook::FictionBook2XMLParserContext.

## ◆ getStyle()

FictionBook2Style & libebook::FictionBook2StyleContextBase::getStyle | ( |  | ) |
| protected

Referenced by element(), libebook::FictionBook2ParaContextBase::startOfElement(), libebook::FictionBook2AContext::text(), and text().

## ◆ getTextFormat()

FictionBook2TextFormat & libebook::FictionBook2StyleContextBase::getTextFormat | ( |  | ) |
| protected

Referenced by libebook::FictionBook2CodeContext::startOfElement(), libebook::FictionBook2EmphasisContext::startOfElement(), libebook::FictionBook2StrikethroughContext::startOfElement(), libebook::FictionBook2StrongContext::startOfElement(), libebook::FictionBook2SubContext::startOfElement(), and libebook::FictionBook2SupContext::startOfElement().

## ◆ text()

void libebook::FictionBook2StyleContextBase::text | ( | const char * | value | ) |
| overrideprotectedvirtual

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_style

FictionBook2Style libebook::FictionBook2StyleContextBase::m_style
| private

Referenced by attribute(), FictionBook2StyleContextBase(), getStyle(), and getTextFormat().

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

- FictionBook2ParserContext.h
- FictionBook2ParserContext.cpp