SUMO - Simulation of Urban MObility
RORouteDef_OrigDest.h
Go to the documentation of this file.
00001 /****************************************************************************/
00008 // A route where only the origin and the destination edges are known
00009 /****************************************************************************/
00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00012 /****************************************************************************/
00013 //
00014 //   This file is part of SUMO.
00015 //   SUMO is free software: you can redistribute it and/or modify
00016 //   it under the terms of the GNU General Public License as published by
00017 //   the Free Software Foundation, either version 3 of the License, or
00018 //   (at your option) any later version.
00019 //
00020 /****************************************************************************/
00021 #ifndef RORouteDef_OrigDest_h
00022 #define RORouteDef_OrigDest_h
00023 
00024 
00025 // ===========================================================================
00026 // included modules
00027 // ===========================================================================
00028 #ifdef _MSC_VER
00029 #include <windows_config.h>
00030 #else
00031 #include <config.h>
00032 #endif
00033 
00034 #include <string>
00035 #include "RORouteDef.h"
00036 #include <utils/common/RGBColor.h>
00037 
00038 
00039 // ===========================================================================
00040 // class declarations
00041 // ===========================================================================
00042 class ROEdge;
00043 class RORoute;
00044 
00045 
00046 // ===========================================================================
00047 // class definitions
00048 // ===========================================================================
00053 class RORouteDef_OrigDest
00054         : public RORouteDef {
00055 public:
00057     RORouteDef_OrigDest(const std::string& id, const RGBColor* const color,
00058                         const ROEdge* from, const ROEdge* to, bool removeFirst = false) ;
00059 
00061     virtual ~RORouteDef_OrigDest() ;
00062 
00064     void preComputeCurrentRoute(SUMOAbstractRouter<ROEdge, ROVehicle> &router, SUMOTime begin,
00065                                const ROVehicle& veh) const;
00066 
00070     void addAlternative(SUMOAbstractRouter<ROEdge, ROVehicle> &router,
00071                         const ROVehicle* const, RORoute* current, SUMOTime begin);
00072 
00074     RORouteDef* copy(const std::string& id) const;
00075 
00076     virtual OutputDevice& writeXMLDefinition(SUMOAbstractRouter<ROEdge, ROVehicle> &router,
00077             OutputDevice& dev, const ROVehicle* const veh, bool asAlternatives, bool withExitTimes) const;
00078 
00079 
00080     /* @brief Returns destination of this route definition */
00081     const ROEdge* getDestination() const;
00082 
00083 protected:
00085     const ROEdge* myFrom, *myTo;
00086 
00088     RORoute* myCurrent;
00089 
00091     SUMOTime myStartTime;
00092 
00095     bool myRemoveFirst;
00096 
00097 
00098 private:
00100     RORouteDef_OrigDest(const RORouteDef_OrigDest& src);
00101 
00103     RORouteDef_OrigDest& operator=(const RORouteDef_OrigDest& src);
00104 
00105 };
00106 
00107 
00108 #endif
00109 
00110 /****************************************************************************/
00111 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines