ROVehicle.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // A vehicle as used by router
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 ROVehicle_h
00020 #define ROVehicle_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/SUMOTime.h>
00035 #include <utils/common/RGBColor.h>
00036 #include <utils/common/SUMOVehicleParameter.h>
00037 #include <utils/common/UtilExceptions.h>
00038 #include <utils/common/SUMOAbstractRouter.h>
00039 
00040 
00041 // ===========================================================================
00042 // class declarations
00043 // ===========================================================================
00044 class SUMOVTypeParameter;
00045 class RORouteDef;
00046 class OutputDevice;
00047 class ROEdge;
00048 
00049 
00050 // ===========================================================================
00051 // class definitions
00052 // ===========================================================================
00057 class ROVehicle {
00058 public:
00067     ROVehicle(const SUMOVehicleParameter &pars,
00068               RORouteDef *route, SUMOVTypeParameter *type) throw();
00069 
00070 
00072     virtual ~ROVehicle() throw();
00073 
00074 
00081     RORouteDef * const getRouteDefinition() const throw() {
00082         return myRoute;
00083     }
00084 
00085 
00092     const SUMOVTypeParameter * const getType() const throw() {
00093         return myType;
00094     }
00095 
00096 
00101     const std::string &getID() const throw() {
00102         return myParameter.id;
00103     }
00104 
00105 
00110     SUMOTime getDepartureTime() const throw() {
00111         return myParameter.depart;
00112     }
00113 
00114 
00127     void saveAllAsXML(SUMOAbstractRouter<ROEdge,ROVehicle> &router,
00128                       OutputDevice &os, OutputDevice * const altos, bool withExitTimes) const throw(IOError);
00129 
00130 
00140     virtual ROVehicle *copy(const std::string &id, unsigned int depTime, RORouteDef *newRoute) throw();
00141 
00142 
00143 protected:
00145     SUMOVehicleParameter myParameter;
00146 
00148     SUMOVTypeParameter *myType;
00149 
00151     RORouteDef *myRoute;
00152 
00153 
00154 private:
00156     ROVehicle(const ROVehicle &src);
00157 
00159     ROVehicle &operator=(const ROVehicle &src);
00160 
00161 };
00162 
00163 
00164 #endif
00165 
00166 /****************************************************************************/
00167 

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