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 struct KEYDictionary;
25 
27 {
28 public:
29  KEY2StyleContext(KEY2ParserState &state, int id, bool nested = false);
30 
31 private:
32  virtual void attribute(int name, const char *value);
33  virtual IWORKXMLContextPtr_t element(int name);
34  virtual void endOfElement();
35 
37 
38 private:
41  const int m_id;
42  const bool m_nested;
43  boost::optional<std::string> m_ident;
44  boost::optional<std::string> m_parentIdent;
45 };
46 
47 }
48 
49 #endif // KEY2STYLECONTEXT_H_INCLUDED
50 
51 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: IWORKStyleContext.h:25
Represents a (hierarchical) property map.
Definition: IWORKPropertyMap.h:23
virtual void endOfElement()
Definition: KEY2StyleContext.cpp:97
KEYDictionary & getDictionary()
Definition: KEY2StyleContext.cpp:126
virtual void attribute(int name, const char *value)
Definition: KEY2StyleContext.cpp:68
boost::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
const int m_id
Definition: KEY2StyleContext.h:41
IWORKPropertyMap m_props
Definition: KEY2StyleContext.h:39
KEY2StyleContext(KEY2ParserState &state, int id, bool nested=false)
Definition: KEY2StyleContext.cpp:59
const char * name
Definition: IWORKToken.cpp:43
Definition: KEY2ParserState.h:22
boost::optional< std::string > m_parentIdent
Definition: KEY2StyleContext.h:44
Definition: KEY2XMLContextBase.h:22
A dictionary of all referenceable entities in the presentation.
Definition: KEYDictionary.h:33
IWORKStyleContext m_base
Definition: KEY2StyleContext.h:40
const bool m_nested
Definition: KEY2StyleContext.h:42
virtual IWORKXMLContextPtr_t element(int name)
Definition: KEY2StyleContext.cpp:86
boost::optional< std::string > m_ident
Definition: KEY2StyleContext.h:43
Definition: KEY2StyleContext.h:26

Generated for libetonyek by doxygen 1.8.5