SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RORDLoader_SUMOBase.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // The base class for SUMO-native route handlers
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef RORDLoader_SUMOBase_h
23 #define RORDLoader_SUMOBase_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <string>
36 #include "ROTypedXMLRoutesLoader.h"
38 #include <utils/common/RGBColor.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class SUMOVTypeParameter;
46 class RORouteDef;
47 class MsgHandler;
48 class RORouteDef_Alternatives;
49 class RORouteDef_Complete;
50 class RORoute;
51 
52 
53 // ===========================================================================
54 // class definitions
55 // ===========================================================================
65  public ROTypedXMLRoutesLoader {
66 public:
68  RORDLoader_SUMOBase(RONet& net, SUMOTime begin, SUMOTime end,
69  const bool tryRepair, const bool withTaz,
70  const std::string& file = "");
71 
74 
75 
76 protected:
78 
79 
87  virtual void myStartElement(int element,
88  const SUMOSAXAttributes& attrs);
89 
90 
97  virtual void myEndElement(int element);
99 
101  void startAlternative(const SUMOSAXAttributes& attrs);
102 
104  void startRoute(const SUMOSAXAttributes& attrs);
105 
106  bool closeVehicle();
107 
113  void parseRoute(const std::string& chars);
114 
115 
116 
117 protected:
120 
123 
126 
129 
132 
135 
138 
141 
143  const bool myWithTaz;
144 
147 
149  std::string myCurrentRouteName;
150 
153 
154 
155 private:
158 
161 
162 };
163 
164 
165 #endif
166 
167 /****************************************************************************/
168