libebook::FB2ParserContext Class Reference documentation

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

Base class for all contexts. More...

`#include <FB2ParserContext.h>`

Inheritance diagram for libebook::FB2ParserContext:

## Public Member Functions
| FB2ParserContext (FB2ParserContext *parentContext, FB2Collector *collector=0)
| Create a new context with `parentContext` as parent. More...
virtual FB2XMLParserContext * | leaveContext () const
| Destroy this context and return parent. More...
FB2Collector * | getCollector () const
| Get the collector. More...
FB2ParserContext * | getParentContext () const
| Get the parent context. More...
Public Member Functions inherited from libebook::FB2XMLParserContext
virtual | ~FB2XMLParserContext ()=0
virtual FB2XMLParserContext * | element (const FB2TokenData &name, const FB2TokenData &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 FB2TokenData &name, const FB2TokenData *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
| FB2ParserContext (const FB2ParserContext &other)
FB2ParserContext & | operator= (const FB2ParserContext &other)

## Private Attributes
FB2Collector *const | m_collector
FB2ParserContext *const | m_parentContext

## Detailed Description

Base class for all contexts.

## Constructor & Destructor Documentation

## § FB2ParserContext() [1/2]

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

## § FB2ParserContext() [2/2]

libebook::FB2ParserContext::FB2ParserContext | ( | FB2ParserContext * | parentContext,
|  | FB2Collector * | collector = `0`
| ) |  |
| 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()

FB2Collector * libebook::FB2ParserContext::getCollector | ( |  | ) | const

Get the collector.

Returns
  The collector.

Referenced by libebook::FB2ParaContextBase::attribute(), libebook::FB2TableContext::attribute(), libebook::FB2CiteContext::attribute(), libebook::FB2CellContext::attribute(), libebook::FB2EpigraphContext::attribute(), libebook::FB2ImageContext::attribute(), libebook::FB2PoemContext::attribute(), libebook::FB2SectionContext::attribute(), libebook::FB2TitleContext::attribute(), libebook::FB2ParaContextBase::endOfElement(), libebook::FB2BodyContext::endOfElement(), libebook::FB2TableContext::endOfElement(), libebook::FB2CellContext::endOfElement(), libebook::FB2EmptyLineContext::endOfElement(), libebook::FB2InlineImageContext::endOfElement(), libebook::FB2ImageContext::endOfElement(), libebook::FB2TrContext::endOfElement(), libebook::FB2CustomInfoContext::endOfElement(), libebook::FB2StanzaContext::endOfElement(), libebook::FB2TitleInfoContext::endOfElement(), libebook::FB2CellContext::openCell(), libebook::FB2TrContext::openRow(), libebook::FB2ParaContextBase::startOfElement(), libebook::FB2BodyContext::startOfElement(), libebook::FB2TableContext::startOfElement(), libebook::FB2PoemContext::startOfElement(), libebook::FB2BinaryContext::text(), libebook::FB2AContext::text(), libebook::FB2BookTitleContext::text(), libebook::FB2DateContext::text(), libebook::FB2StyleContextBase::text(), libebook::FB2KeywordsContext::text(), libebook::FB2LangContext::text(), libebook::FB2PublisherContext::text(), libebook::FB2SrcUrlContext::text(), and libebook::FB2VersionContext::text().

## § getParentContext()

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

Get the parent context.

Returns
  The parent context.

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

## § leaveContext()

FB2XMLParserContext * libebook::FB2ParserContext::leaveContext | ( |  | ) | const
| virtual

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::FB2XMLParserContext.

Reimplemented in libebook::FB2SkipElementContext.

## § operator=()

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

## Member Data Documentation

## § m_collector

FB2Collector* const libebook::FB2ParserContext::m_collector
| private

Referenced by getCollector().

## § m_parentContext

FB2ParserContext* const libebook::FB2ParserContext::m_parentContext
| private

Referenced by getParentContext(), and leaveContext().

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

- FB2ParserContext.h
- FB2ParserContext.cpp