KEY2StyleContext.h Source File documentation

KEY2StyleContext.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libetonyek project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef KEY2STYLECONTEXT_H_INCLUDED
11 #define KEY2STYLECONTEXT_H_INCLUDED
12
13 #include <string>
14
15 #include <boost/optional.hpp>
16
17 #include "IWORKPropertyMap.h"
18 #include "IWORKStyleContext.h"
19 #include "KEY2XMLContextBase.h"
20
21 namespace libetonyek
22 {
23
24 class KEY2StyleContext : public KEY2XMLElementContextBase
25 {
26 public:
27 KEY2StyleContext(KEY2ParserState &state, IWORKStyleMap_t *styleMap, const char *defaultParent=nullptr, bool nested = false);
28
29 private:
30 void attribute(int name, const char *value) override;
31 IWORKXMLContextPtr_t element(int name) override;
32 void endOfElement() override;
33
34 private:
35 IWORKPropertyMap m_props;
36 IWORKStyleContext m_base;
37 boost::optional<std::string> m_ident;
38 boost::optional<std::string> m_parentIdent;
39 };
40
41 }
42
43 #endif // KEY2STYLECONTEXT_H_INCLUDED
44
45 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::KEY2Token::BGBuildDurationProperty
@ BGBuildDurationProperty
Definition: KEY2Token.h:34
libetonyek::KEY2ParserState
Definition: KEY2ParserState.h:24
libetonyek::KEY2XMLElementContextBase
KEY2XMLContextBase< IWORKXMLContextElement > KEY2XMLElementContextBase
Definition: KEY2XMLContextBase.h:39
libetonyek
Definition: IWORKBezierElement.cpp:20
m_transition
boost::optional< KEYTransition > & m_transition
Definition: KEY2StyleContext.cpp:63
KEY2Token.h
libetonyek::KEY_TRANSITION_STYLE_TYPE_INHERITED
@ KEY_TRANSITION_STYLE_TYPE_INHERITED
Definition: KEYEnum.h:18
IWORKValueContext.h
libetonyek::IWORKStyleMap_t
std::unordered_map< ID_t, IWORKStylePtr_t > IWORKStyleMap_t
Definition: IWORKStyle_fwd.h:24
m_props
RVNGPropertyList & m_props
Definition: IWORKCollector.cpp:222
libetonyek::IWORKToken::animationAutoPlay
@ animationAutoPlay
Definition: IWORKToken.h:92
KEY2XMLContextBase.h
libetonyek::IWORKToken::ID
@ ID
Definition: IWORKToken.h:499
IWORKPropertyMap.h
libetonyek::KEY2Token::NS_URI_KEY
@ NS_URI_KEY
Definition: KEY2Token.h:110
libetonyek::IWORKToken::type
@ type
Definition: IWORKToken.h:486
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::IWORKToken::NS_URI_SFA
@ NS_URI_SFA
Definition: IWORKToken.h:689
libetonyek::IWORKStyleContext::attribute
void attribute(int name, const char *value) override
Definition: IWORKStyleContext.cpp:48
libetonyek::IWORKToken::animationAuto
@ animationAuto
Definition: IWORKToken.h:91
KEY2StyleContext.h
IWORKStyleContext.h
libetonyek::IWORKToken::ident
@ ident
Definition: IWORKToken.h:559
libetonyek::IWORKToken::transition
@ transition
Definition: IWORKToken.h:484
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::KEY_TRANSITION_STYLE_TYPE_NAMED
@ KEY_TRANSITION_STYLE_TYPE_NAMED
Definition: KEYEnum.h:20
libetonyek::KEY_TRANSITION_STYLE_TYPE_NONE
@ KEY_TRANSITION_STYLE_TYPE_NONE
Definition: KEYEnum.h:19
libetonyek::KEY2StyleContext::m_base
IWORKStyleContext m_base
Definition: KEY2StyleContext.h:36
IWORKPropertyContext.h
libetonyek::IWORKToken::property_map
@ property_map
Definition: IWORKToken.h:370
m_propMap
IWORKPropertyMap & m_propMap
Definition: KEY2StyleContext.cpp:201
KEY2ParserState.h
libetonyek::IWORKToken::animationDuration
@ animationDuration
Definition: IWORKToken.h:94
libetonyek::KEY2StyleContext::m_ident
boost::optional< std::string > m_ident
Definition: KEY2StyleContext.h:37
KEY2Dictionary.h
libetonyek::KEY2XMLContextBase
Definition: KEY2XMLContextBase.h:22
libetonyek::IWORKToken::number
@ number
Definition: IWORKToken.h:331
libetonyek::KEY2Token::number
@ number
Definition: KEY2Token.h:67
libetonyek::IWORKToken::animationDelay
@ animationDelay
Definition: IWORKToken.h:93
IWORKNumericPropertyContext.h
libetonyek::KEY2StyleContext::m_parentIdent
boost::optional< std::string > m_parentIdent
Definition: KEY2StyleContext.h:38
libetonyek::IWORKToken::val
@ val
Definition: IWORKToken.h:623
m_base
IWORKPropertyMapElement m_base
Definition: KEY2StyleContext.cpp:200
libetonyek::IWORKToken::element
@ element
Definition: IWORKToken.h:188
libetonyek::KEY2StyleContext::endOfElement
void endOfElement() override
Definition: KEY2StyleContext.cpp:282
IWORKPropertyMapElement.h
libetonyek::IWORKStyleContext::endOfElement
void endOfElement() override
Definition: IWORKStyleContext.cpp:88
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:411
libetonyek::KEY2StyleContext
Definition: KEY2StyleContext.h:24
libetonyek::IWORKToken::transition_attributes
@ transition_attributes
Definition: IWORKToken.h:485
KEYProperties.h
libetonyek::KEY2StyleContext::m_props
IWORKPropertyMap m_props
Definition: KEY2StyleContext.h:35
libetonyek::IWORKPropertyMap
Represents a (hierarchical) property map.
Definition: IWORKPropertyMap.h:24
libetonyek::IWORKToken::first
@ first
Definition: IWORKToken.h:524
libetonyek::IWORKToken::parent_ident
@ parent_ident
Definition: IWORKToken.h:589
libetonyek::IWORKToken::NS_URI_SF
@ NS_URI_SF
Definition: IWORKToken.h:688
libetonyek::KEY2StyleContext::element
IWORKXMLContextPtr_t element(int name) override
Definition: KEY2StyleContext.cpp:269
libetonyek::IWORKToken::direction
@ direction
Definition: IWORKToken.h:518
libetonyek::KEY1Token::NS_URI_KEY
@ NS_URI_KEY
Definition: KEY1Token.h:248
IWORKToken.h
libetonyek::KEY2StyleContext::KEY2StyleContext
KEY2StyleContext(KEY2ParserState &state, IWORKStyleMap_t *styleMap, const char *defaultParent=nullptr, bool nested=false)
Definition: KEY2StyleContext.cpp:242
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
libetonyek::KEY2StyleContext::attribute
void attribute(int name, const char *value) override
Definition: KEY2StyleContext.cpp:251
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
libetonyek::IWORKStyleContext
Definition: IWORKStyleContext.h:24
IWORKStyle.h
libetonyek_xml.h
KEYTypes.h
libetonyek::IWORKXMLContextBase< Base, KEY2ParserState, KEYCollector >::getState
KEY2ParserState & getState()
Definition: IWORKXMLContextBase.h:43