RORouteDef.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Base class for a vehicle's route definition
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 RORouteDef_h
00020 #define RORouteDef_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 <iostream>
00034 #include <utils/common/Named.h>
00035 #include "ReferencedItem.h"
00036 #include <utils/common/SUMOAbstractRouter.h>
00037 #include <utils/common/RGBColor.h>
00038 
00039 
00040 // ===========================================================================
00041 // class declarations
00042 // ===========================================================================
00043 class ROEdge;
00044 class RORoute;
00045 class OptionsCont;
00046 class ROVehicle;
00047 class OutputDevice;
00048 
00049 
00050 // ===========================================================================
00051 // class definitions
00052 // ===========================================================================
00062 class RORouteDef : public ReferencedItem, public Named {
00063 public:
00069     RORouteDef(const std::string &id, const RGBColor * const color) throw();
00070 
00071 
00073     virtual ~RORouteDef() throw();
00074 
00075 
00079     virtual RORoute *buildCurrentRoute(SUMOAbstractRouter<ROEdge,ROVehicle> &router, SUMOTime begin,
00080                                        const ROVehicle &veh) const = 0;
00081 
00085     virtual void addAlternative(SUMOAbstractRouter<ROEdge,ROVehicle> &router,
00086                                 const ROVehicle *const, RORoute *current, SUMOTime begin) = 0;
00087 
00089     virtual RORouteDef *copy(const std::string &id) const = 0;
00090 
00092     const RGBColor * const getColor() const {
00093         return myColor;
00094     }
00095 
00096 
00105     virtual OutputDevice &writeXMLDefinition(SUMOAbstractRouter<ROEdge,ROVehicle> &router,
00106             OutputDevice &dev, const ROVehicle * const veh,
00107             bool asAlternatives, bool withExitTimes) const = 0;
00108 
00109 protected:
00110     const RGBColor * const copyColorIfGiven() const throw();
00111 
00112 protected:
00114     const RGBColor * const myColor;
00115 
00116 
00117 private:
00119     RORouteDef(const RORouteDef &src);
00120 
00122     RORouteDef &operator=(const RORouteDef &src);
00123 
00124 };
00125 
00126 
00127 #endif
00128 
00129 /****************************************************************************/
00130 

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