SUMOVTypeParameter.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Structure representing possible vehicle parameter
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 SUMOVTypeParameter_h
00020 #define SUMOVTypeParameter_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 <map>
00034 #include "SUMOVehicleClass.h"
00035 #include "RGBColor.h"
00036 #include "SUMOTime.h"
00037 
00038 
00039 // ===========================================================================
00040 // class declarations
00041 // ===========================================================================
00042 class OutputDevice;
00043 class OptionsCont;
00044 
00045 // ===========================================================================
00046 // value definitions
00047 // ===========================================================================
00048 const int VTYPEPARS_LENGTH_SET = 1;
00049 const int VTYPEPARS_MAXSPEED_SET = 2;
00050 const int VTYPEPARS_PROBABILITY_SET = 4;
00051 const int VTYPEPARS_SPEEDFACTOR_SET = 8;
00052 const int VTYPEPARS_SPEEDDEVIATION_SET = 16;
00053 const int VTYPEPARS_EMISSIONCLASS_SET = 32;
00054 const int VTYPEPARS_COLOR_SET = 64;
00055 const int VTYPEPARS_VEHICLECLASS_SET = 128;
00056 const int VTYPEPARS_WIDTH_SET = 256;
00057 const int VTYPEPARS_OFFSET_SET = 512;
00058 const int VTYPEPARS_SHAPE_SET = 1024;
00059 
00060 
00061 // ===========================================================================
00062 // struct definitions
00063 // ===========================================================================
00068 class SUMOVTypeParameter {
00069 public:
00074     SUMOVTypeParameter() throw();
00075 
00076 
00081     bool wasSet(int what) const throw() {
00082         return (setParameter&what)!=0;
00083     }
00084 
00085 
00091     void write(OutputDevice &dev) const throw(IOError);
00092 
00095     void validateCFParameter() const throw();
00096 
00097 
00099     std::string id;
00100 
00102     SUMOReal length;
00104     SUMOReal maxSpeed;
00106     SUMOReal defaultProbability;
00108     SUMOReal speedFactor;
00110     SUMOReal speedDev;
00112     SUMOEmissionClass emissionClass;
00114     RGBColor color;
00116     SUMOVehicleClass vehicleClass;
00117 
00118 
00121 
00123     SUMOReal width;
00124 
00126     SUMOReal offset;
00127 
00129     SUMOVehicleShape shape;
00131 
00132 
00134     int cfModel;
00136     std::map<std::string, SUMOReal> cfParameter;
00137 
00139     std::string lcModel;
00140 
00142     int setParameter;
00143 
00144 
00146     mutable bool saved;
00147 
00149     mutable bool onlyReferenced;
00150 
00151 };
00152 
00153 #endif
00154 
00155 /****************************************************************************/
00156 

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