IWORKStyleContext.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 IWORKSTYLECONTEXT_H_INCLUDED
11 #define IWORKSTYLECONTEXT_H_INCLUDED
12 
13 #include <string>
14 
15 #include <boost/optional.hpp>
16 
17 #include "IWORKPropertyMap.h"
18 #include "IWORKXMLContextBase.h"
19 
20 namespace libetonyek
21 {
22 
23 struct IWORKDictionary;
24 
26 {
27 public:
28  IWORKStyleContext(IWORKXMLParserState &state, int id, bool nested = false);
29  IWORKStyleContext(IWORKXMLParserState &state, int id, IWORKPropertyMap &props, bool nested = false);
30 
31  virtual void attribute(int name, const char *value);
32  virtual void endOfElement();
33 
34 private:
35  virtual IWORKXMLContextPtr_t element(int name);
36 
38 
39 private:
40  const int m_id;
41  const bool m_nested;
44  boost::optional<std::string> m_ident;
45  boost::optional<std::string> m_parentIdent;
46 };
47 
48 }
49 
50 #endif // IWORKSTYLECONTEXT_H_INCLUDED
51 
52 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
virtual void attribute(int name, const char *value)
Definition: IWORKStyleContext.cpp:40
Definition: IWORKStyleContext.h:25
Represents a (hierarchical) property map.
Definition: IWORKPropertyMap.h:23
A dictionary of all referenceable entities in the presentation.
Definition: IWORKDictionary.h:35
IWORKPropertyMap & m_props
Definition: IWORKStyleContext.h:43
virtual IWORKXMLContextPtr_t element(int name)
Definition: IWORKStyleContext.cpp:56
boost::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
boost::optional< std::string > m_ident
Definition: IWORKStyleContext.h:44
const char * name
Definition: IWORKToken.cpp:43
const bool m_nested
Definition: IWORKStyleContext.h:41
const int m_id
Definition: IWORKStyleContext.h:40
virtual void endOfElement()
Definition: IWORKStyleContext.cpp:67
Definition: IWORKXMLContextBase.h:27
Definition: IWORKXMLParserState.h:21
boost::optional< std::string > m_parentIdent
Definition: IWORKStyleContext.h:45
IWORKPropertyMap m_ownProps
Definition: IWORKStyleContext.h:42
IWORKStyleContext(IWORKXMLParserState &state, int id, bool nested=false)
Definition: IWORKStyleContext.cpp:22
IWORKDictionary & getDictionary()
Definition: IWORKStyleContext.cpp:118

Generated for libetonyek by doxygen 1.8.5