KEYParser.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 KEYPARSER_H_INCLUDED
11 #define KEYPARSER_H_INCLUDED
12 
13 #include "libetonyek_utils.h"
14 #include "KEYXMLReader.h"
15 
16 namespace libetonyek
17 {
18 
19 class KEYCollector;
20 class KEYDefaults;
21 
22 class KEYParser
23 {
24  // -Weffc++
25  KEYParser(const KEYParser &);
26  KEYParser &operator=(const KEYParser &);
27 
28 public:
29  KEYParser(const WPXInputStreamPtr_t &input, KEYCollector *collector, const KEYDefaults &defaults);
30  virtual ~KEYParser() = 0;
31  bool parse();
32 
33  KEYCollector *getCollector() const;
34  const KEYDefaults &getDefaults() const;
35 
36 private:
37  virtual void processXmlNode(const KEYXMLReader &reader) = 0;
39 
40  bool processXmlDocument(const KEYXMLReader &reader);
41 
42 private:
46 };
47 
48 } // namespace libetonyek
49 
50 #endif // KEYPARSER_H_INCLUDED
51 
52 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
KEYCollector * getCollector() const
Definition: KEYParser.cpp:35
virtual ~KEYParser()=0
Definition: KEYParser.cpp:25
KEYCollector * m_collector
Definition: KEYParser.h:44
virtual KEYXMLReader::TokenizerFunction_t getTokenizer() const =0
KEYParser & operator=(const KEYParser &)
boost::shared_ptr< WPXInputStream > WPXInputStreamPtr_t
Definition: libetonyek_utils.h:88
const KEYDefaults & getDefaults() const
Definition: KEYParser.cpp:40
bool processXmlDocument(const KEYXMLReader &reader)
Definition: KEYParser.cpp:45
KEYParser(const KEYParser &)
virtual void processXmlNode(const KEYXMLReader &reader)=0
bool parse()
Definition: KEYParser.cpp:29
Definition: KEYParser.h:22
Definition: KEYXMLReader.h:20
WPXInputStreamPtr_t m_input
Definition: KEYParser.h:43
const KEYDefaults & m_defaults
Definition: KEYParser.h:45
Definition: KEYCollector.h:28
A representation of default values for various parts of the format.
Definition: KEYDefaults.h:30
boost::function< int(const char *)> TokenizerFunction_t
Definition: KEYXMLReader.h:126

Generated for libetonyek by doxygen 1.8.5