|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // A complete route definition (with all passed edges being known) 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 RORouteDef_Complete_h 00020 #define RORouteDef_Complete_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 "RORouteDef.h" 00034 #include <utils/common/RGBColor.h> 00035 00036 00037 // =========================================================================== 00038 // class declarations 00039 // =========================================================================== 00040 class ROEdge; 00041 class RORoute; 00042 class ROVehicle; 00043 class OutputDevice; 00044 00045 00046 // =========================================================================== 00047 // class definitions 00048 // =========================================================================== 00053 class RORouteDef_Complete : 00054 public RORouteDef { 00055 public: 00057 RORouteDef_Complete(const std::string& id, const RGBColor* const color, 00058 const std::vector<const ROEdge*> &edges, 00059 bool tryRepair) throw(); 00060 00062 virtual ~RORouteDef_Complete() throw(); 00063 00065 RORoute* buildCurrentRoute(SUMOAbstractRouter<ROEdge,ROVehicle> &router, SUMOTime begin, 00066 const ROVehicle& veh) const; 00067 00072 void addAlternative(SUMOAbstractRouter<ROEdge,ROVehicle> &router, 00073 const ROVehicle* const, RORoute* current, SUMOTime begin); 00074 00076 RORouteDef* copy(const std::string& id) const; 00077 00078 virtual OutputDevice& writeXMLDefinition(SUMOAbstractRouter<ROEdge,ROVehicle> &router, 00079 OutputDevice& dev, const ROVehicle* const veh, bool asAlternatives, bool withExitTimes) const; 00080 00081 protected: 00083 mutable std::vector<const ROEdge*> myEdges; 00084 00086 SUMOTime myStartTime; 00087 00088 bool myTryRepair; 00089 00090 00091 private: 00093 RORouteDef_Complete(const RORouteDef_Complete& src); 00094 00096 RORouteDef_Complete& operator=(const RORouteDef_Complete& src); 00097 00098 }; 00099 00100 00101 #endif 00102 00103 /****************************************************************************/ 00104