SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SUMOSAXReader.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // SAX-reader encapsulation containing binary reader
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef SUMOSAXReader_h
21 #define SUMOSAXReader_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <xercesc/sax2/SAX2XMLReader.hpp>
34 
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class GenericSAXHandler;
40 class BinaryInputDevice;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
55 public:
61  SUMOSAXReader(GenericSAXHandler& handler, const bool enableValidation = false);
62 
65 
71  void setHandler(GenericSAXHandler& handler);
72 
73  void parse(std::string systemID);
74 
75  void parseString(std::string content);
76 
77  bool parseFirst(std::string systemID);
78 
79  bool parseNext();
80 
81 private:
92  XERCES_CPP_NAMESPACE::SAX2XMLReader* getSAXReader();
93 
94 
95 private:
97 
99  const bool myEnableValidation;
100 
101  XERCES_CPP_NAMESPACE::XMLPScanToken myToken;
102 
103  XERCES_CPP_NAMESPACE::SAX2XMLReader* myXMLReader;
104 
106 
107 private:
109  SUMOSAXReader(const SUMOSAXReader& s);
110 
112  const SUMOSAXReader& operator=(const SUMOSAXReader& s);
113 
114 };
115 
116 
117 #endif
118 
119 /****************************************************************************/