00001 /****************************************************************************/ 00007 // Storage for geometrical objects extended by mutexes 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 "GUIShapeContainer.h" 00031 00032 #ifdef _WIN32 00033 #include <windows.h> 00034 #endif 00035 00036 #ifdef CHECK_MEMORY_LEAKS 00037 #include <foreign/nvwa/debug_new.h> 00038 #endif // CHECK_MEMORY_LEAKS 00039 00040 00041 // =========================================================================== 00042 // method definitions 00043 // =========================================================================== 00044 GUIShapeContainer::GUIShapeContainer() throw() {} 00045 00046 00047 GUIShapeContainer::~GUIShapeContainer() throw() {} 00048 00049 00050 bool 00051 GUIShapeContainer::add(int layer, Polygon2D *p) throw() { 00052 myLock.lock(); 00053 bool ret = ShapeContainer::add(layer, p); 00054 myLock.unlock(); 00055 return ret; 00056 } 00057 00058 00059 bool 00060 GUIShapeContainer::add(int layer, PointOfInterest *p) throw() { 00061 myLock.lock(); 00062 bool ret = ShapeContainer::add(layer, p); 00063 myLock.unlock(); 00064 return ret; 00065 } 00066 00067 00068 bool 00069 GUIShapeContainer::removePolygon(int layer, const std::string &id) throw() { 00070 myLock.lock(); 00071 bool ret = ShapeContainer::removePolygon(layer, id); 00072 myLock.unlock(); 00073 return ret; 00074 } 00075 00076 00077 bool 00078 GUIShapeContainer::removePOI(int layer, const std::string &id) throw() { 00079 myLock.lock(); 00080 bool ret = ShapeContainer::removePOI(layer, id); 00081 myLock.unlock(); 00082 return ret; 00083 } 00084 00085 00086 00087 /****************************************************************************/ 00088
1.5.6