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 2001-2010 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(SumoXMLTag 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 
00161     void parseDistrict(const SUMOSAXAttributes &attrs) throw(ProcessError);
00162 
00163 
00175     void parseDistrictEdge(const SUMOSAXAttributes &attrs, bool isSource);
00176 
00178 
00179 
00180 protected:
00182     RONet &myNet;
00183 
00185     std::string myCurrentName;
00186 
00188     ROEdge *myCurrentEdge;
00189 
00191     bool myProcess;
00192 
00194     ROAbstractEdgeBuilder &myEdgeBuilder;
00195 
00197     bool myHaveWarnedAboutDeprecatedVClass;
00198 
00199 
00200 private:
00202     RONetHandler(const RONetHandler &src);
00203 
00205     RONetHandler &operator=(const RONetHandler &src);
00206 
00207 };
00208 
00209 
00210 #endif
00211 
00212 /****************************************************************************/
00213 

Generated on Wed May 5 00:06:36 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6