libetonyek::IWORKStyleContext Class Reference

#include <IWORKStyleContext.h>

Inheritance diagram for libetonyek::IWORKStyleContext:
libetonyek::IWORKXMLContextBase< IWORKXMLContextElement, IWORKXMLParserState > libetonyek::IWORKXMLContextElement libetonyek::IWORKXMLContextMinimal libetonyek::IWORKXMLContext

Public Member Functions

 IWORKStyleContext (IWORKXMLParserState &state, IWORKStyleMap_t *styleMap=nullptr)
 IWORKStyleContext (IWORKXMLParserState &state, IWORKPropertyMap &props, IWORKStyleMap_t *styleMap=nullptr, const char *defaultParent=nullptr)
void attribute (int name, const char *value) override
 Process an attribute.
void endOfElement () override
 Signalize the end of an element.
IWORKStylePtr_t getStyle ()
 returns the created style
Public Member Functions inherited from libetonyek::IWORKXMLContextBase< IWORKXMLContextElement, IWORKXMLParserState >
 IWORKXMLContextBase (IWORKXMLParserState &state)
 IWORKXMLContextBase (IWORKXMLParserState &state, const T &a)
IWORKXMLParserStategetState ()
Public Member Functions inherited from libetonyek::IWORKXMLContext
virtual ~IWORKXMLContext ()=0
virtual void CDATA (const char *value)
 Process CDATA content of an element.

Private Member Functions

IWORKXMLContextPtr_t element (int name) override
 Create a context for parsing a child element.
 IWORKStyleContext (IWORKStyleContext &)
IWORKStyleContext operator= (IWORKStyleContext &)

Private Attributes

IWORKStyleMap_t *const m_styleMap
const std::string m_defaultParent
IWORKPropertyMap m_ownProps
IWORKPropertyMapm_props
IWORKStylePtr_t m_style
 the final style
boost::optional< std::string > m_ident
boost::optional< std::string > m_parentIdent

Additional Inherited Members

Protected Member Functions inherited from libetonyek::IWORKXMLContextBase< IWORKXMLContextElement, IWORKXMLParserState >
IWORKCollectorgetCollector () const
int getToken (const char *const value) const
bool isCollector () const
Protected Member Functions inherited from libetonyek::IWORKXMLContextElement
 IWORKXMLContextElement (IWORKXMLParserState &)
void attribute (int name, const char *value) override
 Process an attribute.
void text (const char *value) override
 Process textual content of an element.
const boost::optional< ID_t > & getId () const
void setId (const char *value)
Protected Member Functions inherited from libetonyek::IWORKXMLContextMinimal
 IWORKXMLContextMinimal ()
void startOfElement () override
 Signalize the start of an element.
void endOfElement () override
 Signalize the end of an element.
Protected Attributes inherited from libetonyek::IWORKXMLContextBase< IWORKXMLContextElement, IWORKXMLParserState >
IWORKXMLParserStatem_state

Constructor & Destructor Documentation

◆ IWORKStyleContext() [1/3]

libetonyek::IWORKStyleContext::IWORKStyleContext ( IWORKXMLParserState & state,
IWORKStyleMap_t * styleMap = nullptr )

Referenced by IWORKStyleContext(), and operator=().

◆ IWORKStyleContext() [2/3]

libetonyek::IWORKStyleContext::IWORKStyleContext ( IWORKXMLParserState & state,
IWORKPropertyMap & props,
IWORKStyleMap_t * styleMap = nullptr,
const char * defaultParent = nullptr )

◆ IWORKStyleContext() [3/3]

libetonyek::IWORKStyleContext::IWORKStyleContext ( IWORKStyleContext & )
private

Member Function Documentation

◆ attribute()

void libetonyek::IWORKStyleContext::attribute ( int name,
const char * value )
overridevirtual

Process an attribute.

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

Implements libetonyek::IWORKXMLContext.

◆ element()

IWORKXMLContextPtr_t libetonyek::IWORKStyleContext::element ( int name)
overrideprivatevirtual

Create a context for parsing a child element.

Returns
A new context or an empty pointer if the child element cannot be handled.

Implements libetonyek::IWORKXMLContext.

◆ endOfElement()

void libetonyek::IWORKStyleContext::endOfElement ( )
overridevirtual

Signalize the end of an element.

Implements libetonyek::IWORKXMLContext.

◆ getStyle()

IWORKStylePtr_t libetonyek::IWORKStyleContext::getStyle ( )
inline

returns the created style

Note
must be called after the style is read, ie. after endOfElement have been called

◆ operator=()

IWORKStyleContext libetonyek::IWORKStyleContext::operator= ( IWORKStyleContext & )
private

Member Data Documentation

◆ m_defaultParent

const std::string libetonyek::IWORKStyleContext::m_defaultParent
private

◆ m_ident

boost::optional<std::string> libetonyek::IWORKStyleContext::m_ident
private

◆ m_ownProps

IWORKPropertyMap libetonyek::IWORKStyleContext::m_ownProps
private

◆ m_parentIdent

boost::optional<std::string> libetonyek::IWORKStyleContext::m_parentIdent
private

◆ m_props

IWORKPropertyMap& libetonyek::IWORKStyleContext::m_props
private

◆ m_style

IWORKStylePtr_t libetonyek::IWORKStyleContext::m_style
private

the final style

Referenced by endOfElement(), getStyle(), IWORKStyleContext(), and IWORKStyleContext().

◆ m_styleMap

IWORKStyleMap_t* const libetonyek::IWORKStyleContext::m_styleMap
private

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

Generated for libetonyek by doxygen 1.14.0