libebook::FictionBook2ParserContext Class Reference documentation

libebook::FictionBook2ParserContext Class Reference

Base class for all contexts. More...

`#include <FictionBook2ParserContext.h>`

Inheritance diagram for libebook::FictionBook2ParserContext:

## Public Member Functions
| 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 | startOfElement ()=0
| Signalize the start of an 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.
virtual void | endOfAttributes ()=0
| Signalize the end of attributes.
virtual void | text (const char *value)=0
| Process textual content of an element.

## Private Member Functions
| FictionBook2ParserContext (const FictionBook2ParserContext &other)
FictionBook2ParserContext & | operator= (const FictionBook2ParserContext &other)

## Private Attributes
FictionBook2Collector *const | m_collector
FictionBook2ParserContext *const | m_parentContext

## Detailed Description

Base class for all contexts.

## Constructor & Destructor Documentation

## ◆ FictionBook2ParserContext() [1/2]

libebook::FictionBook2ParserContext::FictionBook2ParserContext | ( | const FictionBook2ParserContext & | other | ) |
| private

Referenced by libebook::FictionBook2AuthorContext::FictionBook2AuthorContext(), libebook::FictionBook2BookNameContext::FictionBook2BookNameContext(), libebook::FictionBook2BookTitleContext::FictionBook2BookTitleContext(), libebook::FictionBook2CityContext::FictionBook2CityContext(), libebook::FictionBook2CoverpageContext::FictionBook2CoverpageContext(), libebook::FictionBook2CustomInfoContext::FictionBook2CustomInfoContext(), libebook::FictionBook2DataContextBase::FictionBook2DataContextBase(), libebook::FictionBook2DateContext::FictionBook2DateContext(), libebook::FictionBook2DescriptionContext::FictionBook2DescriptionContext(), libebook::FictionBook2EmailContext::FictionBook2EmailContext(), libebook::FictionBook2FirstNameContext::FictionBook2FirstNameContext(), libebook::FictionBook2GenreContext::FictionBook2GenreContext(), libebook::FictionBook2HistoryContext::FictionBook2HistoryContext(), libebook::FictionBook2HomePageContext::FictionBook2HomePageContext(), libebook::FictionBook2IdContext::FictionBook2IdContext(), libebook::FictionBook2IsbnContext::FictionBook2IsbnContext(), libebook::FictionBook2KeywordsContext::FictionBook2KeywordsContext(), libebook::FictionBook2LangContext::FictionBook2LangContext(), libebook::FictionBook2LastNameContext::FictionBook2LastNameContext(), libebook::FictionBook2MiddleNameContext::FictionBook2MiddleNameContext(), libebook::FictionBook2NicknameContext::FictionBook2NicknameContext(), libebook::FictionBook2NodeContextBase::FictionBook2NodeContextBase(), libebook::FictionBook2OutputContext::FictionBook2OutputContext(), libebook::FictionBook2OutputDocumentClassContext::FictionBook2OutputDocumentClassContext(), FictionBook2ParserContext(), FictionBook2ParserContext(), libebook::FictionBook2PartContext::FictionBook2PartContext(), libebook::FictionBook2ProgramUsedContext::FictionBook2ProgramUsedContext(), libebook::FictionBook2PublisherContext::FictionBook2PublisherContext(), libebook::FictionBook2PublishInfoContext::FictionBook2PublishInfoContext(), libebook::FictionBook2SequenceContext::FictionBook2SequenceContext(), libebook::FictionBook2SkipElementContext::FictionBook2SkipElementContext(), libebook::FictionBook2SrcLangContext::FictionBook2SrcLangContext(), libebook::FictionBook2SrcOcrContext::FictionBook2SrcOcrContext(), libebook::FictionBook2SrcTitleInfoContext::FictionBook2SrcTitleInfoContext(), libebook::FictionBook2SrcUrlContext::FictionBook2SrcUrlContext(), libebook::FictionBook2StyleContextBase::FictionBook2StyleContextBase(), libebook::FictionBook2TextContextBase::FictionBook2TextContextBase(), libebook::FictionBook2TextInfoContext::FictionBook2TextInfoContext(), libebook::FictionBook2TitleInfoContext::FictionBook2TitleInfoContext(), libebook::FictionBook2TranslatorContext::FictionBook2TranslatorContext(), libebook::FictionBook2VersionContext::FictionBook2VersionContext(), libebook::FictionBook2YearContext::FictionBook2YearContext(), getParentContext(), leaveContext(), libebook::FictionBook2SkipElementContext::leaveContext(), libebook::FictionBook2DateContext::operator=(), operator=(), libebook::FictionBook2TextInfoContext::operator=(), and libebook::FictionBook2TitleInfoContext::operator=().

## ◆ FictionBook2ParserContext() [2/2]

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

Create a new context with `parentContext` as parent.

Parameters

  [in] | parentContext | A parent context.
  [in] | collector | A collector for the context's content.

## Member Function Documentation

## ◆ getCollector()

FictionBook2Collector * libebook::FictionBook2ParserContext::getCollector | ( |  | ) | const

Get the collector.

Returns
  The collector.

Referenced by libebook::FictionBook2CellContext::attribute(), libebook::FictionBook2CiteContext::attribute(), libebook::FictionBook2EpigraphContext::attribute(), libebook::FictionBook2ImageContext::attribute(), libebook::FictionBook2ParaContextBase::attribute(), libebook::FictionBook2PoemContext::attribute(), libebook::FictionBook2SectionContext::attribute(), libebook::FictionBook2TableContext::attribute(), libebook::FictionBook2TitleContext::attribute(), libebook::FictionBook2AContext::endOfElement(), libebook::FictionBook2BodyContext::endOfElement(), libebook::FictionBook2CellContext::endOfElement(), libebook::FictionBook2CustomInfoContext::endOfElement(), libebook::FictionBook2EmptyLineContext::endOfElement(), libebook::FictionBook2ImageContext::endOfElement(), libebook::FictionBook2InlineImageContext::endOfElement(), libebook::FictionBook2ParaContextBase::endOfElement(), libebook::FictionBook2StanzaContext::endOfElement(), libebook::FictionBook2TableContext::endOfElement(), libebook::FictionBook2TitleInfoContext::endOfElement(), libebook::FictionBook2TrContext::endOfElement(), libebook::FictionBook2CellContext::openCell(), libebook::FictionBook2TrContext::openRow(), libebook::FictionBook2BodyContext::startOfElement(), libebook::FictionBook2ParaContextBase::startOfElement(), libebook::FictionBook2PoemContext::startOfElement(), libebook::FictionBook2TableContext::startOfElement(), libebook::FictionBook2AContext::text(), libebook::FictionBook2BinaryContext::text(), libebook::FictionBook2BookTitleContext::text(), libebook::FictionBook2DateContext::text(), libebook::FictionBook2KeywordsContext::text(), libebook::FictionBook2LangContext::text(), libebook::FictionBook2PublisherContext::text(), libebook::FictionBook2SrcUrlContext::text(), libebook::FictionBook2StyleContextBase::text(), and libebook::FictionBook2VersionContext::text().

## ◆ getParentContext()

FictionBook2ParserContext * libebook::FictionBook2ParserContext::getParentContext | ( |  | ) | const

Get the parent context.

Returns
  The parent context.

Referenced by libebook::FictionBook2SkipElementContext::leaveContext().

## ◆ leaveContext()

FictionBook2XMLParserContext * libebook::FictionBook2ParserContext::leaveContext | ( |  | ) | const
| overridevirtual

Destroy this context and return parent.

Todo
  It would be handier to use shared_ptr to manage the context lifetimes.

Returns
  The parent context.

Implements libebook::FictionBook2XMLParserContext.

Reimplemented in libebook::FictionBook2SkipElementContext.

## ◆ operator=()

FictionBook2ParserContext & libebook::FictionBook2ParserContext::operator= | ( | const FictionBook2ParserContext & | other | ) |
| private

## Member Data Documentation

## ◆ m_collector

FictionBook2Collector* const libebook::FictionBook2ParserContext::m_collector
| private

Referenced by FictionBook2ParserContext(), and getCollector().

## ◆ m_parentContext

FictionBook2ParserContext* const libebook::FictionBook2ParserContext::m_parentContext
| private

Referenced by FictionBook2ParserContext(), getParentContext(), and leaveContext().

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

- FictionBook2ParserContext.h
- FictionBook2ParserContext.cpp