Base class for all contexts. More...
#include <FictionBook2ParserContext.h>
Public Member Functions | |
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... | |
![]() | |
virtual | ~FictionBook2XMLParserContext ()=0 |
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 | |
FictionBook2ParserContext (const FictionBook2ParserContext &other) | |
FictionBook2ParserContext & | operator= (const FictionBook2ParserContext &other) |
Private Attributes | |
FictionBook2Collector *const | m_collector |
FictionBook2ParserContext *const | m_parentContext |
Base class for all contexts.
|
private |
|
explicit |
Create a new context with parentContext
as parent.
[in] | parentContext | A parent context. |
[in] | collector | A collector for the context's content. |
FictionBook2Collector * libebook::FictionBook2ParserContext::getCollector | ( | ) | const |
Get the collector.
Referenced by libebook::FictionBook2ParaContextBase::attribute(), libebook::FictionBook2TableContext::attribute(), libebook::FictionBook2CiteContext::attribute(), libebook::FictionBook2CellContext::attribute(), libebook::FictionBook2EpigraphContext::attribute(), libebook::FictionBook2ImageContext::attribute(), libebook::FictionBook2PoemContext::attribute(), libebook::FictionBook2SectionContext::attribute(), libebook::FictionBook2TitleContext::attribute(), libebook::FictionBook2ParaContextBase::endOfElement(), libebook::FictionBook2BodyContext::endOfElement(), libebook::FictionBook2TableContext::endOfElement(), libebook::FictionBook2AContext::endOfElement(), libebook::FictionBook2CellContext::endOfElement(), libebook::FictionBook2EmptyLineContext::endOfElement(), libebook::FictionBook2InlineImageContext::endOfElement(), libebook::FictionBook2ImageContext::endOfElement(), libebook::FictionBook2TrContext::endOfElement(), libebook::FictionBook2CustomInfoContext::endOfElement(), libebook::FictionBook2StanzaContext::endOfElement(), libebook::FictionBook2TitleInfoContext::endOfElement(), libebook::FictionBook2CellContext::openCell(), libebook::FictionBook2TrContext::openRow(), libebook::FictionBook2ParaContextBase::startOfElement(), libebook::FictionBook2BodyContext::startOfElement(), libebook::FictionBook2TableContext::startOfElement(), libebook::FictionBook2PoemContext::startOfElement(), libebook::FictionBook2BinaryContext::text(), libebook::FictionBook2AContext::text(), libebook::FictionBook2BookTitleContext::text(), libebook::FictionBook2DateContext::text(), libebook::FictionBook2StyleContextBase::text(), libebook::FictionBook2KeywordsContext::text(), libebook::FictionBook2LangContext::text(), libebook::FictionBook2PublisherContext::text(), libebook::FictionBook2SrcUrlContext::text(), and libebook::FictionBook2VersionContext::text().
FictionBook2ParserContext * libebook::FictionBook2ParserContext::getParentContext | ( | ) | const |
Get the parent context.
Referenced by libebook::FictionBook2SkipElementContext::leaveContext().
|
overridevirtual |
Destroy this context and return parent.
Implements libebook::FictionBook2XMLParserContext.
Reimplemented in libebook::FictionBook2SkipElementContext.
|
private |
|
private |
Referenced by getCollector().
|
private |
Referenced by getParentContext(), and leaveContext().