libetonyek::IWORKStyleContext Class Reference

`#include <IWORKStyleContext.h>`

Inheritance diagram for libetonyek::IWORKStyleContext:

## 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)
IWORKXMLParserState & | getState ()
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
IWORKPropertyMap & | m_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 >
IWORKCollector & | getCollector () 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 >
IWORKXMLParserState & | m_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 )
| override virtual

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 | ) |
| override private virtual

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 | ( |  | ) |
| override virtual

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

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

## ◆ m_ident

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

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

## ◆ m_ownProps

IWORKPropertyMap libetonyek::IWORKStyleContext::m_ownProps
| private

Referenced by IWORKStyleContext(), and IWORKStyleContext().

## ◆ m_parentIdent

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

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

## ◆ m_props

IWORKPropertyMap& libetonyek::IWORKStyleContext::m_props
| private

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

## ◆ 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

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

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

- IWORKStyleContext.h
- IWORKStyleContext.cpp