Go to the documentation of this file.
10 #ifndef IWORKSTYLECONTAINER_H_INCLUDED
11 #define IWORKSTYLECONTAINER_H_INCLUDED
16 #include <boost/optional.hpp>
28 template<
int TokenId,
int RefTokenId,
int TokenId2=0,
int RefTokenId2=0>
51 template<
int TokenId,
int RefTokenId,
int TokenId2,
int RefTokenId2>
55 , m_styleMap(styleMap)
58 , m_styleMap2(nullptr)
63 template<
int TokenId,
int RefTokenId,
int TokenId2,
int RefTokenId2>
67 , m_styleMap(styleMap)
70 , m_styleMap2(&styleMap2)
75 template<
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);
92 m_context = std::make_shared<IWORKStyleContext>(getState(), m_styleMap2);
95 if (
name==RefTokenId2)
96 return std::make_shared<IWORKRefContext>(getState(), m_ref2);
103 template<
int TokenId,
int RefTokenId,
int TokenId2,
int RefTokenId2>
108 else if (m_ref2 && m_styleMap2)
109 m_style = getState().getStyleByName(
get(m_ref2).c_str(), *m_styleMap2);
116 #endif // IWORKSTYLECONTAINER_H_INCLUDED
IWORKStyleContainer(IWORKXMLParserState &state, IWORKStylePtr_t &style, IWORKStyleMap_t &styleMap)
Definition: IWORKStyleContainer.h:52
IWORKStylePtr_t m_style
Definition: IWORKPropertyMapElement.cpp:172
Definition: IWORKBezierElement.cpp:21
@ null
Definition: IWORKToken.h:330
std::unordered_map< ID_t, IWORKStylePtr_t > IWORKStyleMap_t
Definition: IWORKStyle_fwd.h:24
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
boost::optional< ID_t > m_ref2
Definition: IWORKStyleContainer.h:48
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
std::shared_ptr< IWORKStyleContext > m_context
Definition: IWORKStyleContainer.h:45
Definition: IWORKXMLParserState.h:32
std::shared_ptr< IWORKXMLContext > m_context
Definition: IWORKPropertyMapElement.cpp:90
Definition: IWORKStyleContainer.h:30
void endOfElement() override
Definition: IWORKStyleContainer.h:104
IWORKStyleContainer(IWORKStyleContainer const &)
IWORKStylePtr_t & m_style
Definition: IWORKStyleContainer.h:43
@ style
Definition: IWORKToken.h:414
@ INVALID_TOKEN
Definition: IWORKToken.h:27
Definition: IWORKXMLContextBase.h:28
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKStyleContainer.h:76
IWORKStyleMap_t & m_styleMap
Definition: IWORKStyleContainer.h:44
@ NS_URI_SF
Definition: IWORKToken.h:688
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
IWORKStyleMap_t * m_styleMap2
Definition: IWORKStyleContainer.h:47
boost::optional< ID_t > m_ref
Definition: IWORKPathElement.cpp:285
boost::optional< ID_t > m_ref
Definition: IWORKStyleContainer.h:46
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
IWORKStyleContainer & operator=(IWORKStyleContainer const &)
@ name
Definition: IWORKToken.h:578
Generated for libetonyek by
doxygen 1.8.18