SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // The basic class for loading trip definitions 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef RORDLoader_TripDefs_h 00023 #define RORDLoader_TripDefs_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 #include <utils/options/OptionsCont.h> 00037 #include <utils/common/IDSupplier.h> 00038 #include <utils/xml/SUMOXMLDefinitions.h> 00039 #include "ROTypedXMLRoutesLoader.h" 00040 #include "RONet.h" 00041 #include <utils/common/SUMOVehicleParameter.h> 00042 00043 00044 // =========================================================================== 00045 // class definitions 00046 // =========================================================================== 00053 class RORDLoader_TripDefs : public ROTypedXMLRoutesLoader { 00054 public: 00056 RORDLoader_TripDefs(RONet& net, SUMOTime begin, SUMOTime end, 00057 bool emptyDestinationsAllowed, bool withTaz, 00058 const std::string& file = "") ; 00059 00061 ~RORDLoader_TripDefs() ; 00062 00063 00064 protected: 00066 00067 00075 void myStartElement(int element, 00076 const SUMOSAXAttributes& attrs) ; 00077 00078 00085 void myEndElement(int element) ; 00087 00088 00089 00090 protected: 00092 std::string getVehicleID(const SUMOSAXAttributes& attrs); 00093 00095 ROEdge* getEdge(const SUMOSAXAttributes& attrs, const std::string& purpose, 00096 SumoXMLAttr which, const std::string& id, bool emptyAllowed); 00097 00098 protected: 00100 IDSupplier myIdSupplier; 00101 00103 ROEdge* myBeginEdge; 00104 00106 ROEdge* myEndEdge; 00107 00111 const bool myEmptyDestinationsAllowed; 00112 00114 const bool myWithTaz; 00115 00117 SUMOVTypeParameter* myCurrentVehicleType; 00118 00119 SUMOVehicleParameter* myParameter; 00120 00121 bool myHaveWarnedAboutDeprecatedTripDef; 00122 00123 private: 00125 RORDLoader_TripDefs(const RORDLoader_TripDefs& src); 00126 00128 RORDLoader_TripDefs& operator=(const RORDLoader_TripDefs& src); 00129 00130 }; 00131 00132 00133 #endif 00134 00135 /****************************************************************************/ 00136