SUMO - Simulation of Urban MObility

ROVehicle.h

Go to the documentation of this file.
00001 /****************************************************************************/
00008 // A vehicle as used by router
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 ROVehicle_h
00022 #define ROVehicle_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 <iostream>
00036 #include <utils/common/SUMOTime.h>
00037 #include <utils/common/RGBColor.h>
00038 #include <utils/common/SUMOVehicleParameter.h>
00039 #include <utils/common/UtilExceptions.h>
00040 #include <utils/common/SUMOAbstractRouter.h>
00041 
00042 
00043 // ===========================================================================
00044 // class declarations
00045 // ===========================================================================
00046 class SUMOVTypeParameter;
00047 class RORouteDef;
00048 class OutputDevice;
00049 class ROEdge;
00050 
00051 
00052 // ===========================================================================
00053 // class definitions
00054 // ===========================================================================
00059 class ROVehicle {
00060 public:
00069     ROVehicle(const SUMOVehicleParameter& pars,
00070               RORouteDef* route, SUMOVTypeParameter* type) ;
00071 
00072 
00074     virtual ~ROVehicle() ;
00075 
00076 
00083     RORouteDef* getRouteDefinition() const {
00084         return myRoute;
00085     }
00086 
00087 
00094     const SUMOVTypeParameter* getType() const {
00095         return myType;
00096     }
00097 
00098 
00103     const std::string& getID() const {
00104         return myParameter.id;
00105     }
00106 
00107 
00112     SUMOTime getDepartureTime() const {
00113         return myParameter.depart;
00114     }
00115 
00116 
00129     void saveAllAsXML(SUMOAbstractRouter<ROEdge, ROVehicle> &router,
00130                       OutputDevice& os, OutputDevice* const altos, bool withExitTimes) const;
00131 
00132 
00142     virtual ROVehicle* copy(const std::string& id, unsigned int depTime, RORouteDef* newRoute) ;
00143 
00144 
00145 protected:
00147     SUMOVehicleParameter myParameter;
00148 
00150     SUMOVTypeParameter* myType;
00151 
00153     RORouteDef* myRoute;
00154 
00155 
00156 private:
00158     ROVehicle(const ROVehicle& src);
00159 
00161     ROVehicle& operator=(const ROVehicle& src);
00162 
00163 };
00164 
00165 
00166 #endif
00167 
00168 /****************************************************************************/
00169 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines