KEYStyle.h Source File documentation

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

- File List
- File Members

KEYStyle.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 KEYSTYLE_H_INCLUDED
11 #define KEYSTYLE_H_INCLUDED
12
13 #include <boost/shared_ptr.hpp>
14 #include <boost/unordered_map.hpp>
15
16 #include "KEYStylesheet.h"
17 #include "KEYTypes_fwd.h"
18
19 namespace libetonyek
20 {
21
22 class KEYPropertyMap;
23
26 class KEYStyle
27 {
28 public:
29 virtual ~KEYStyle() = 0;
30
36 virtual bool link(const KEYStylesheetPtr_t &stylesheet) = 0;
37
42 virtual void flatten() = 0;
43
46 virtual const KEYPropertyMap &getPropertyMap() const = 0;
47 };
48
49 typedef boost::shared_ptr<KEYStyle> KEYStylePtr_t;
50 typedef boost::unordered_map<ID_t, KEYStylePtr_t> KEYStyleMap_t;
51
52 }
53
54 #endif // KEYSTYLE_H_INCLUDED
55
56 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek
Definition: EtonyekDocument.cpp:40
KEYStylesheet.h
KEYTypes_fwd.h
libetonyek::KEYPropertyMap
Represents a (hierarchical) property map.
Definition: KEYPropertyMap.h:21
libetonyek::KEYStyleMap_t
boost::unordered_map< ID_t, KEYStylePtr_t > KEYStyleMap_t
Definition: KEYStyle.h:50
libetonyek::KEYStylePtr_t
boost::shared_ptr< KEYStyle > KEYStylePtr_t
Definition: KEYStyle.h:49
libetonyek::KEY2Token::stylesheet
Definition: KEY2Token.h:800
libetonyek::KEYStyle::link
virtual bool link(const KEYStylesheetPtr_t &stylesheet)=0
Find the parent style by its ID.
libetonyek::KEYStyle::flatten
virtual void flatten()=0
Copy attributes from parent style (recursively).
libetonyek::KEYStyle::getPropertyMap
virtual const KEYPropertyMap & getPropertyMap() const =0
Get the style's property map.
libetonyek::KEYStyle
Represents a hierarchical style.
Definition: KEYStyle.h:26
libetonyek::KEYStyle::~KEYStyle
virtual ~KEYStyle()=0
Definition: KEYStyle.cpp:15
libetonyek::KEYStylesheetPtr_t
boost::shared_ptr< KEYStylesheet > KEYStylesheetPtr_t
Definition: KEYStylesheet.h:19