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  bool parsePropertyImpl(const KEYXMLReader &reader, const char *key);
38  void parsePropertyMap(const KEYXMLReader &reader);
39 
41 
42 private:
43  const int m_nameId;
44  const int m_nsId;
45  const bool m_nested;
49 };
50 
51 }
52 
53 #endif // KEY2STYLEPARSER_H_INCLUDED
54 
55 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
void parseProperty(const KEYXMLReader &reader, const char *key=0)
Definition: KEY2StyleParser.cpp:127
Represents a (hierarchical) property map.
Definition: KEYPropertyMap.h:21
const KEYDefaults & m_defaults
Definition: KEY2StyleParser.h:47
const bool m_nested
Definition: KEY2StyleParser.h:45
bool parsePropertyImpl(const KEYXMLReader &reader, const char *key)
Definition: KEY2StyleParser.cpp:145
KEYPropertyMap m_props
Definition: KEY2StyleParser.h:48
KEY2StyleParser(const KEY2StyleParser &other)
void parsePropertyMap(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:228
A "mixin" containing a set of helper functions used in parser classes.
Definition: KEY2ParserUtils.h:28
KEYCollector *const m_collector
Definition: KEY2StyleParser.h:46
void parse(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:41
Definition: KEYXMLReader.h:20
KEY2StyleParser & operator=(const KEY2StyleParser &other)
Definition: KEY2StyleParser.h:24
const int m_nsId
Definition: KEY2StyleParser.h:44
boost::shared_ptr< KEYGeometry > KEYGeometryPtr_t
Definition: KEYTypes_fwd.h:25
Definition: KEYCollector.h:28
const int m_nameId
Definition: KEY2StyleParser.h:43
KEYGeometryPtr_t readGeometry(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:284
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.5