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
17namespace libetonyek
18{
19
20class KEYCollector;
21class KEYDefaults;
22class KEYXMLReader;
23
25{
26 // disable copying
29
30public:
31 KEY2StyleParser(int nameId, int nsId, KEYCollector *collector, const KEYDefaults &defaults, bool nested = false);
32
33 void parse(const KEYXMLReader &reader);
34
35private:
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
53private:
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: */
A "mixin" containing a set of helper functions used in parser classes.
Definition: KEY2ParserUtils.h:29
Definition: KEY2StyleParser.h:25
const int m_nsId
Definition: KEY2StyleParser.h:55
KEY2StyleParser(const KEY2StyleParser &other)
KEY2StyleParser & operator=(const KEY2StyleParser &other)
bool parsePropertyImpl(const KEYXMLReader &reader, const int propertyId, const char *key)
Parse the value of property propertyId.
Definition: KEY2StyleParser.cpp:227
const bool m_nested
Definition: KEY2StyleParser.h:56
void parse(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:121
void parsePropertyMap(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:481
const KEYDefaults & m_defaults
Definition: KEY2StyleParser.h:58
KEYGeometryPtr_t readGeometry(const KEYXMLReader &reader)
Definition: KEY2StyleParser.cpp:577
KEYCollector *const m_collector
Definition: KEY2StyleParser.h:57
KEYPropertyMap m_props
Definition: KEY2StyleParser.h:59
const int m_nameId
Definition: KEY2StyleParser.h:54
void parseProperty(const KEYXMLReader &reader, const char *key=0)
Definition: KEY2StyleParser.cpp:207
Definition: KEYCollector.h:30
A representation of default values for various parts of the format.
Definition: KEYDefaults.h:31
Represents a (hierarchical) property map.
Definition: KEYPropertyMap.h:22
Definition: KEYXMLReader.h:21
@ key
Definition: KEY1Token.h:121
Definition: EtonyekDocument.cpp:41
boost::shared_ptr< KEYGeometry > KEYGeometryPtr_t
Definition: KEYTypes_fwd.h:25

Generated for libetonyek by doxygen 1.9.3