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

- File List
- File Members

KEY2StyleParser.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 KEY2STYLEPARSER_H_INCLUDED
11 #define KEY2STYLEPARSER_H_INCLUDED
12
13 #include "KEY2ParserUtils.h"
14 #include "KEYPropertyMap.h"
15 #include "KEYTypes_fwd.h"
16
17 namespace libetonyek
18 {
19
20 class KEYCollector;
21 class KEYDefaults;
22 class KEYXMLReader;
23
24 class KEY2StyleParser : private KEY2ParserUtils
25 {
26 // disable copying
27 KEY2StyleParser(const KEY2StyleParser &other);
28 KEY2StyleParser &operator=(const KEY2StyleParser &other);
29
30 public:
31 KEY2StyleParser(int nameId, int nsId, KEYCollector *collector, const KEYDefaults &defaults, bool nested = false);
32
33 void parse(const KEYXMLReader &reader);
34
35 private:
36 void parseProperty(const KEYXMLReader &reader, const char *key = 0);
37
47 bool parsePropertyImpl(const KEYXMLReader &reader, const int propertyId, const char *key);
48
49 void parsePropertyMap(const KEYXMLReader &reader);
50
51 KEYGeometryPtr_t readGeometry(const KEYXMLReader &reader);
52
53 private:
54 const int m_nameId;
55 const int m_nsId;
56 const bool m_nested;
57 KEYCollector *const m_collector;
58 const KEYDefaults &m_defaults;
59 KEYPropertyMap m_props;
60 };
61
62 }
63
64 #endif // KEY2STYLEPARSER_H_INCLUDED
65
66 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
KEY2ParserUtils.h
libetonyek::KEY2StyleParser::parseProperty
void parseProperty(const KEYXMLReader &reader, const char *key=0)
Definition: KEY2StyleParser.cpp:207
KEYTypes_fwd.h
libetonyek::KEYPropertyMap
Represents a (hierarchical) property map.
Definition: KEYPropertyMap.h:21
libetonyek::KEY2StyleParser::m_defaults
const KEYDefaults & m_defaults
Definition: KEY2StyleParser.h:58
libetonyek::KEY2StyleParser::m_nested
const bool m_nested
Definition: KEY2StyleParser.h:56
libetonyek::KEY2StyleParser::m_props
KEYPropertyMap m_props
Definition: KEY2StyleParser.h:59
KEYPropertyMap.h
libetonyek::KEY2StyleParser::KEY2StyleParser
KEY2StyleParser(const KEY2StyleParser &other)
libetonyek::KEY2StyleParser::parsePropertyMap
void parsePropertyMap(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:481
libetonyek::KEY2ParserUtils
A "mixin" containing a set of helper functions used in parser classes.
Definition: KEY2ParserUtils.h:28
libetonyek::KEY2StyleParser::m_collector
KEYCollector *const m_collector
Definition: KEY2StyleParser.h:57
libetonyek::KEY2StyleParser::parse
void parse(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:121
libetonyek::KEYXMLReader
Definition: KEYXMLReader.h:20
libetonyek::KEY2StyleParser::operator=
KEY2StyleParser & operator=(const KEY2StyleParser &other)
libetonyek::KEY2StyleParser
Definition: KEY2StyleParser.h:24
libetonyek::KEY2StyleParser::m_nsId
const int m_nsId
Definition: KEY2StyleParser.h:55
libetonyek::KEYGeometryPtr_t
boost::shared_ptr< KEYGeometry > KEYGeometryPtr_t
Definition: KEYTypes_fwd.h:25
libetonyek::KEYCollector
Definition: KEYCollector.h:29
libetonyek::KEY2StyleParser::m_nameId
const int m_nameId
Definition: KEY2StyleParser.h:54
libetonyek::KEY2StyleParser::readGeometry
KEYGeometryPtr_t readGeometry(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:577
libetonyek::KEY2StyleParser::parsePropertyImpl
bool parsePropertyImpl(const KEYXMLReader &reader, const int propertyId, const char *key)
Parse the value of property propertyId.
Definition: KEY2StyleParser.cpp:227
libetonyek::KEY1Token::key
Definition: KEY1Token.h:121
libetonyek::KEYDefaults
A representation of default values for various parts of the format.
Definition: KEYDefaults.h:30