SUMO - Simulation of Urban MObility

RORouteDef_OrigDest.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // A route where only the origin and the destination edges are 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_OrigDest_h
00020 #define RORouteDef_OrigDest_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 
00043 
00044 // ===========================================================================
00045 // class definitions
00046 // ===========================================================================
00051 class RORouteDef_OrigDest
00052         : public RORouteDef {
00053 public:
00055     RORouteDef_OrigDest(const std::string& id, const RGBColor* const color,
00056                         const ROEdge* from, const ROEdge* to, bool removeFirst=false) throw();
00057 
00059     virtual ~RORouteDef_OrigDest() throw();
00060 
00062     RORoute* buildCurrentRoute(SUMOAbstractRouter<ROEdge,ROVehicle> &router, SUMOTime begin,
00063                                const ROVehicle& veh) const;
00064 
00068     void addAlternative(SUMOAbstractRouter<ROEdge,ROVehicle> &router,
00069                         const ROVehicle* const, RORoute* current, SUMOTime begin);
00070 
00072     RORouteDef* copy(const std::string& id) const;
00073 
00074     virtual OutputDevice& writeXMLDefinition(SUMOAbstractRouter<ROEdge,ROVehicle> &router,
00075             OutputDevice& dev, const ROVehicle* const veh, bool asAlternatives, bool withExitTimes) const;
00076 
00077 protected:
00079     const ROEdge* myFrom, *myTo;
00080 
00082     RORoute* myCurrent;
00083 
00085     SUMOTime myStartTime;
00086 
00089     bool myRemoveFirst;
00090 
00091 
00092 private:
00094     RORouteDef_OrigDest(const RORouteDef_OrigDest& src);
00095 
00097     RORouteDef_OrigDest& operator=(const RORouteDef_OrigDest& src);
00098 
00099 };
00100 
00101 
00102 #endif
00103 
00104 /****************************************************************************/
00105 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines