10#ifndef IWORKSTYLECONTAINER_H_INCLUDED
11#define IWORKSTYLECONTAINER_H_INCLUDED
16#include <boost/optional.hpp>
28template<
int TokenId,
int RefTokenId,
int TokenId2=0,
int RefTokenId2=0>
51template<
int TokenId,
int RefTokenId,
int TokenId2,
int RefTokenId2>
55 , m_styleMap(styleMap)
58 , m_styleMap2(nullptr)
63template<
int TokenId,
int RefTokenId,
int TokenId2,
int RefTokenId2>
67 , m_styleMap(styleMap)
70 , m_styleMap2(&styleMap2)
75template<
int TokenId,
int RefTokenId,
int TokenId2,
int RefTokenId2>
81 m_context = std::make_shared<IWORKStyleContext>(getState(), &m_styleMap);
84 return std::make_shared<IWORKRefContext>(getState(),
m_ref);
93 m_context = std::make_shared<IWORKStyleContext>(getState(), m_styleMap2);
96 if (
name==RefTokenId2)
97 return std::make_shared<IWORKRefContext>(getState(), m_ref2);
104template<
int TokenId,
int RefTokenId,
int TokenId2,
int RefTokenId2>
109 else if (m_ref2 && m_styleMap2)
110 m_style = getState().getStyleByName(
get(m_ref2).c_str(), *m_styleMap2);
boost::optional< ID_t > m_ref
Definition IWORKPathElement.cpp:285
IWORKStylePtr_t m_style
Definition IWORKPropertyMapElement.cpp:172
std::shared_ptr< IWORKXMLContext > m_context
Definition IWORKPropertyMapElement.cpp:90
Definition IWORKStyleContainer.h:30
IWORKStyleContainer(IWORKStyleContainer const &)
boost::optional< ID_t > m_ref2
Definition IWORKStyleContainer.h:48
IWORKStyleContainer(IWORKXMLParserState &state, IWORKStylePtr_t &style, IWORKStyleMap_t &styleMap)
Definition IWORKStyleContainer.h:52
void endOfElement() override
Definition IWORKStyleContainer.h:105
boost::optional< ID_t > m_ref
Definition IWORKStyleContainer.h:46
IWORKStyleMap_t & m_styleMap
Definition IWORKStyleContainer.h:44
IWORKXMLContextPtr_t element(int name) override
Definition IWORKStyleContainer.h:76
std::shared_ptr< IWORKStyleContext > m_context
Definition IWORKStyleContainer.h:45
IWORKStyleMap_t * m_styleMap2
Definition IWORKStyleContainer.h:47
IWORKStyleContainer & operator=(IWORKStyleContainer const &)
IWORKStylePtr_t & m_style
Definition IWORKStyleContainer.h:43
Definition IWORKXMLContextBase.h:28
Definition IWORKXMLParserState.h:32
#define ETONYEK_DEBUG_MSG(M)
Definition libetonyek_utils.h:54
@ INVALID_TOKEN
Definition IWORKToken.h:27
@ element
Definition IWORKToken.h:192
@ null
Definition IWORKToken.h:335
@ style
Definition IWORKToken.h:421
@ name
Definition IWORKToken.h:585
@ NS_URI_SF
Definition IWORKToken.h:696
Definition IWORKBezierElement.cpp:21
std::unordered_map< ID_t, IWORKStylePtr_t > IWORKStyleMap_t
Definition IWORKStyle_fwd.h:24
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition IWORKXMLContext.h:20
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition IWAField.h:190
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition IWORKStyle_fwd.h:23