KEYStyleContext.h Source File documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

KEYStyleContext.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 KEYSTYLECONTEXT_H_INCLUDED
11 #define KEYSTYLECONTEXT_H_INCLUDED
12
13 #include <deque>
14
15 #include <boost/any.hpp>
16
17 #include "KEYStyle.h"
18
19 namespace libetonyek
20 {
21
34 class KEYStyleContext
35 {
41 typedef std::deque<KEYStylePtr_t> Stack_t;
42
43 public:
46 KEYStyleContext();
47
54 void push(const KEYStylePtr_t &style);
55
58 void pop();
59
73 boost::any find(const std::string &property, bool lookInParent = false) const;
74
75 private:
76 Stack_t m_stack;
77 };
78
79 }
80
81 #endif // KEYSTYLECONTEXT_H_INCLUDED
82
83 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::KEYStyleContext::KEYStyleContext
KEYStyleContext()
Construct an empty context.
Definition: KEYStyleContext.cpp:16
libetonyek
Definition: EtonyekDocument.cpp:40
libetonyek::KEYStyleContext::m_stack
Stack_t m_stack
Definition: KEYStyleContext.h:76
libetonyek::KEYStyleContext::push
void push(const KEYStylePtr_t &style)
Push a style onto the active styles stack.
Definition: KEYStyleContext.cpp:21
libetonyek::KEYStylePtr_t
boost::shared_ptr< KEYStyle > KEYStylePtr_t
Definition: KEYStyle.h:49
libetonyek::KEYStyleContext::pop
void pop()
Pop a style from the active styles stack.
Definition: KEYStyleContext.cpp:26
libetonyek::KEY2Token::style
Definition: KEY2Token.h:796
libetonyek::KEYStyleContext::Stack_t
std::deque< KEYStylePtr_t > Stack_t
The internal type of style stack.
Definition: KEYStyleContext.h:41
libetonyek::PAGToken::property
Definition: PAGToken.h:938
KEYStyle.h
libetonyek::KEYStyleContext::find
boost::any find(const std::string &property, bool lookInParent=false) const
Find the current value of property property.
Definition: KEYStyleContext.cpp:31
libetonyek::KEY1Token::string
Definition: KEY1Token.h:75
libetonyek::KEYStyleContext
Representation of a dynamic inheritance of styles.
Definition: KEYStyleContext.h:34