SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROTypedXMLRoutesLoader.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Base class for loading routes from XML-files
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef ROTypedXMLRoutesLoader_h
22 #define ROTypedXMLRoutesLoader_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <xercesc/sax2/SAX2XMLReader.hpp>
36 #include <xercesc/framework/XMLPScanToken.hpp>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class RONet;
44 class Options;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
61 public:
72  SUMOTime begin, SUMOTime end, const std::string& file = "") ;
73 
74 
76  virtual ~ROTypedXMLRoutesLoader() ;
77 
78 
86  virtual bool readRoutesAtLeastUntil(SUMOTime time);
87 
88 
94  return myCurrentDepart;
95  }
96 
97 
102  bool ended() const {
103  return myEnded;
104  }
105 
106 
111  void endDocument();
112 
113 
114 protected:
117 
120 
123 
125  SAX2XMLReader* myParser;
126 
128  XMLPScanToken myToken;
129 
132 
135 
137  bool myEnded;
138 
139 
140 private:
143 
146 
147 };
148 
149 
150 #endif
151 
152 /****************************************************************************/
153