SUMO - Simulation of Urban MObility

RONetHandler.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // The handler that parses a SUMO-network for its usage in a router
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef RONetHandler_h
00020 #define RONetHandler_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <string>
00033 #include <utils/xml/SUMOSAXHandler.h>
00034 #include <utils/common/SUMOVehicleClass.h>
00035 #include <utils/common/UtilExceptions.h>
00036 
00037 
00038 // ===========================================================================
00039 // class declarations
00040 // ===========================================================================
00041 class RONet;
00042 class OptionsCont;
00043 class ROEdge;
00044 class ROAbstractEdgeBuilder;
00045 
00046 
00047 // ===========================================================================
00048 // class definitions
00049 // ===========================================================================
00057 class RONetHandler : public SUMOSAXHandler {
00058 public:
00064     RONetHandler(RONet& net, ROAbstractEdgeBuilder& eb);
00065 
00066 
00068     virtual ~RONetHandler() throw();
00069 
00070 
00071 protected:
00073 
00074 
00082     virtual void myStartElement(int element,
00083                                 const SUMOSAXAttributes& attrs) throw(ProcessError);
00085 
00086 protected:
00088 
00089 
00101     void parseEdge(const SUMOSAXAttributes& attrs);
00102 
00103 
00112     virtual void parseLane(const SUMOSAXAttributes& attrs);
00113 
00114 
00123     void parseJunction(const SUMOSAXAttributes& attrs);
00124 
00125 
00136     void parseConnectingEdge(const SUMOSAXAttributes& attrs) throw(ProcessError);
00137 
00138 
00149     void parseConnectedEdge(const SUMOSAXAttributes& attrs);
00150 
00151 
00156     void parseConnection(const SUMOSAXAttributes& attrs);
00157 
00158 
00168     void parseDistrict(const SUMOSAXAttributes& attrs) throw(ProcessError);
00169 
00170 
00182     void parseDistrictEdge(const SUMOSAXAttributes& attrs, bool isSource);
00183 
00185 
00186 
00187 protected:
00189     RONet& myNet;
00190 
00192     std::string myCurrentName;
00193 
00195     ROEdge* myCurrentEdge;
00196 
00198     bool myProcess;
00199 
00201     ROAbstractEdgeBuilder& myEdgeBuilder;
00202 
00203     bool myHaveWarnedAboutDeprecatedDistrict, myHaveWarnedAboutDeprecatedDSource, myHaveWarnedAboutDeprecatedDSink;
00204 
00205 
00206 private:
00208     RONetHandler(const RONetHandler& src);
00209 
00211     RONetHandler& operator=(const RONetHandler& src);
00212 
00213 };
00214 
00215 
00216 #endif
00217 
00218 /****************************************************************************/
00219 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines