KEY1StylesContext.h Source File documentation

KEY1StylesContext.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 KEY1STYLESCONTEXT_H_INCLUDED
11 #define KEY1STYLESCONTEXT_H_INCLUDED
12
13 #include <boost/optional.hpp>
14
15 #include "KEY1XMLContextBase.h"
16
17 #include "IWORKPropertyMap.h"
18 #include "IWORKStyle_fwd.h"
19 #include "IWORKTypes.h"
20
21 namespace libetonyek
22 {
23
24 class KEY1StylesContext : public KEY1XMLElementContextBase
25 {
26 public:
27 KEY1StylesContext(KEY1ParserState &state, IWORKStylePtr_t &style, IWORKStylePtr_t parentStyle);
28
29 private:
30 IWORKXMLContextPtr_t element(int name) override;
31 void endOfElement() override;
32
33 private:
34 IWORKStylePtr_t &m_style;
35 IWORKPropertyMap m_propMap;
36 IWORKStylePtr_t m_parentStyle;
37
38 boost::optional<IWORKFill> m_fill;
39 boost::optional<IWORKMarker> m_lineHead;
40 boost::optional<IWORKMarker> m_lineTail;
41 boost::optional<IWORKPattern> m_pattern;
42 boost::optional<IWORKShadow> m_shadow;
43 };
44 }
45
46 #endif // KEY1STYLESCONTEXT_H_INCLUDED
47
48 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::double_cast
double double_cast(const char *value)
Definition: libetonyek_xml.cpp:79
libetonyek::IWORKToken::double_
@ double_
Definition: IWORKToken.h:655
m_style
IWORKStylePtr_t m_style
Definition: IWORKPropertyMapElement.cpp:172
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::none
@ none
Definition: IWORKToken.h:666
libetonyek::IWORKStroke
Definition: IWORKTypes.h:277
KEY1Token.h
libetonyek::KEY1Token::line_tail_style
@ line_tail_style
Definition: KEY1Token.h:66
IWORKTokenizer.h
IWORKPropertyMap.h
IWORKProperties.h
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
KEY1Dictionary.h
KEY1FillElement.h
libetonyek::KEY1Token::fill_style
@ fill_style
Definition: KEY1Token.h:55
libetonyek::KEY1StylesContext::KEY1StylesContext
KEY1StylesContext(KEY1ParserState &state, IWORKStylePtr_t &style, IWORKStylePtr_t parentStyle)
Definition: KEY1StylesContext.cpp:232
libetonyek::KEY1StylesContext::endOfElement
void endOfElement() override
Definition: KEY1StylesContext.cpp:266
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
m_propMap
IWORKPropertyMap & m_propMap
Definition: IWORKPropertyMapElement.cpp:756
libetonyek::IWORK_STROKE_TYPE_SOLID
@ IWORK_STROKE_TYPE_SOLID
Definition: IWORKEnum.h:121
KEY1StylesContext.h
libetonyek::KEY1Token::is_filled
@ is_filled
Definition: KEY1Token.h:152
libetonyek::IWORK_STROKE_TYPE_NONE
@ IWORK_STROKE_TYPE_NONE
Definition: IWORKEnum.h:120
libetonyek::IWORKToken::path
@ path
Definition: IWORKToken.h:358
KEY1ParserState.h
libetonyek::KEY1Token::line_head_style
@ line_head_style
Definition: KEY1Token.h:65
libetonyek::IWORKToken::id
@ id
Definition: IWORKToken.h:259
libetonyek::IWORKToken::pattern
@ pattern
Definition: IWORKToken.h:359
libetonyek::KEY1XMLContextBase
Definition: KEY1XMLContextBase.h:22
libetonyek::bool_cast
bool bool_cast(const char *value)
Convert string value to bool.
Definition: libetonyek_xml.cpp:56
libetonyek::KEY1StylesContext
Definition: KEY1StylesContext.h:24
libetonyek::IWORKToken::val
@ val
Definition: IWORKToken.h:623
m_shadow
boost::optional< IWORKShadow > & m_shadow
Definition: KEY1StylesContext.cpp:177
libetonyek::KEY1Token::dash_style
@ dash_style
Definition: KEY1Token.h:48
libetonyek::KEY1Token::shadow_style
@ shadow_style
Definition: KEY1Token.h:89
libetonyek::IWORKPropertyMap::put
void put(const typename IWORKPropertyInfo< Property >::ValueType &value)
Insert a new value for key key.
Definition: IWORKPropertyMap.h:134
KEY1XMLContextBase.h
libetonyek::IWORKToken::element
@ element
Definition: IWORKToken.h:188
libetonyek::KEY1ParserState
Definition: KEY1ParserState.h:44
libetonyek::KEY1StylesContext::m_lineTail
boost::optional< IWORKMarker > m_lineTail
Definition: KEY1StylesContext.h:40
libetonyek::IWORKToken::color
@ color
Definition: IWORKToken.h:151
libetonyek::KEY1XMLElementContextBase
KEY1XMLContextBase< IWORKXMLContextElement > KEY1XMLElementContextBase
Definition: KEY1XMLContextBase.h:39
libetonyek::IWORK_STROKE_TYPE_DASHED
@ IWORK_STROKE_TYPE_DASHED
Definition: IWORKEnum.h:122
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:411
libetonyek::KEY1StylesContext::m_parentStyle
IWORKStylePtr_t m_parentStyle
Definition: KEY1StylesContext.h:36
libetonyek::KEY1StylesContext::m_style
IWORKStylePtr_t & m_style
Definition: KEY1StylesContext.h:34
libetonyek::KEY1StylesContext::m_lineHead
boost::optional< IWORKMarker > m_lineHead
Definition: KEY1StylesContext.h:39
libetonyek::IWORKToken::angle
@ angle
Definition: IWORKToken.h:505
libetonyek::KEY1StylesContext::element
IWORKXMLContextPtr_t element(int name) override
Definition: KEY1StylesContext.cpp:245
libetonyek::IWORKToken::style
@ style
Definition: IWORKToken.h:414
m_marker
boost::optional< IWORKMarker > & m_marker
Definition: KEY1StylesContext.cpp:41
IWORKTypes.h
libetonyek::KEY1Token::match_point
@ match_point
Definition: KEY1Token.h:167
libetonyek::KEY1StylesContext::m_pattern
boost::optional< IWORKPattern > m_pattern
Definition: KEY1StylesContext.h:41
libetonyek::KEY1StylesContext::m_propMap
IWORKPropertyMap m_propMap
Definition: KEY1StylesContext.h:35
KEY1StringConverter.h
libetonyek::IWORKPropertyMap
Represents a (hierarchical) property map.
Definition: IWORKPropertyMap.h:24
libetonyek::IWORKToken::stroke
@ stroke
Definition: IWORKToken.h:412
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::IWORKToken::solid
@ solid
Definition: IWORKToken.h:671
libetonyek::IWORKToken::offset
@ offset
Definition: IWORKToken.h:587
libetonyek::IWORKToken::end
@ end
Definition: IWORKToken.h:189
libetonyek::KEY1Token::NS_URI_KEY
@ NS_URI_KEY
Definition: KEY1Token.h:248
libetonyek::KEY1StylesContext::m_shadow
boost::optional< IWORKShadow > m_shadow
Definition: KEY1StylesContext.h:42
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
IWORKStyle_fwd.h
libetonyek::KEY1Token::radius
@ radius
Definition: KEY1Token.h:185
m_pattern
boost::optional< IWORKPattern > & m_pattern
Definition: KEY1StylesContext.cpp:99
libetonyek::IWORKToken::getTokenizer
const IWORKTokenizer & getTokenizer()
Definition: IWORKToken.cpp:57
libetonyek::KEY1StylesContext::m_fill
boost::optional< IWORKFill > m_fill
Definition: KEY1StylesContext.h:38
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
libetonyek::IWORKToken::opacity
@ opacity
Definition: IWORKToken.h:588
libetonyek_xml.h
libetonyek::IWORKXMLContextBase< Base, KEY1ParserState, KEYCollector >::getState
KEY1ParserState & getState()
Definition: IWORKXMLContextBase.h:43