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 
25 {
26  // disable copying
27  KEY2StyleParser(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 
52 
53 private:
54  const int m_nameId;
55  const int m_nsId;
56  const bool m_nested;
60 };
61 
62 }
63 
64 #endif // KEY2STYLEPARSER_H_INCLUDED
65 
66 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
void parseProperty(const KEYXMLReader &reader, const char *key=0)
Definition: KEY2StyleParser.cpp:207
Represents a (hierarchical) property map.
Definition: KEYPropertyMap.h:21
const KEYDefaults & m_defaults
Definition: KEY2StyleParser.h:58
const bool m_nested
Definition: KEY2StyleParser.h:56
KEYPropertyMap m_props
Definition: KEY2StyleParser.h:59
KEY2StyleParser(const KEY2StyleParser &other)
void parsePropertyMap(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:481
A "mixin" containing a set of helper functions used in parser classes.
Definition: KEY2ParserUtils.h:28
KEYCollector *const m_collector
Definition: KEY2StyleParser.h:57
void parse(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:121
Definition: KEYXMLReader.h:20
KEY2StyleParser & operator=(const KEY2StyleParser &other)
Definition: KEY2StyleParser.h:24
const int m_nsId
Definition: KEY2StyleParser.h:55
boost::shared_ptr< KEYGeometry > KEYGeometryPtr_t
Definition: KEYTypes_fwd.h:25
Definition: KEYCollector.h:29
const int m_nameId
Definition: KEY2StyleParser.h:54
KEYGeometryPtr_t readGeometry(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:577
bool parsePropertyImpl(const KEYXMLReader &reader, const int propertyId, const char *key)
Parse the value of property propertyId.
Definition: KEY2StyleParser.cpp:227
Definition: KEY1Token.h:121
A representation of default values for various parts of the format.
Definition: KEYDefaults.h:30

Generated for libetonyek by doxygen 1.8.7