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 00020 00021 // =========================================================================== 00022 // included modules 00023 // =========================================================================== 00024 #ifdef _MSC_VER 00025 #include <windows_config.h> 00026 #else 00027 #include <config.h> 00028 #endif 00029 00030 #include <string> 00031 #include <utils/common/TplConvert.h> 00032 #include <utils/common/ToString.h> 00033 #include <utils/common/Named.h> 00034 #include <utils/common/StringUtils.h> 00035 #include <utils/common/MsgHandler.h> 00036 #include <utils/options/OptionsCont.h> 00037 #include "ROEdge.h" 00038 #include "RORoute.h" 00039 #include <utils/common/SUMOAbstractRouter.h> 00040 #include "ReferencedItem.h" 00041 #include "RORouteDef.h" 00042 #include "ROVehicle.h" 00043 00044 #ifdef CHECK_MEMORY_LEAKS 00045 #include <foreign/nvwa/debug_new.h> 00046 #endif // CHECK_MEMORY_LEAKS 00047 00048 00049 // =========================================================================== 00050 // method definitions 00051 // =========================================================================== 00052 RORouteDef::RORouteDef(const std::string &id, const RGBColor * const color) throw() 00053 : ReferencedItem(), Named(StringUtils::convertUmlaute(id)), 00054 myColor(color) {} 00055 00056 00057 RORouteDef::~RORouteDef() throw() { 00058 delete myColor; 00059 } 00060 00061 00062 const RGBColor * const 00063 RORouteDef::copyColorIfGiven() const throw() { 00064 if (myColor==0) { 00065 return 0; 00066 } 00067 return new RGBColor(*myColor); 00068 } 00069 00070 /****************************************************************************/ 00071
1.5.6