|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // Storage for geometrical objects extended by mutexes 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2011 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 GUIShapeContainer_h 00020 #define GUIShapeContainer_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 <utils/shapes/ShapeContainer.h> 00033 #include <utils/gui/globjects/GUIGlObject.h> 00034 #include <utils/foxtools/MFXMutex.h> 00035 00036 00037 // =========================================================================== 00038 // class declarations 00039 // =========================================================================== 00040 class SUMORTree; 00041 class Position; 00042 00043 00044 // =========================================================================== 00045 // class definitions 00046 // =========================================================================== 00052 class GUIShapeContainer : public ShapeContainer { 00053 public: 00055 GUIShapeContainer(SUMORTree& vis) throw(); 00056 00057 00059 virtual ~GUIShapeContainer() throw(); 00060 00061 00062 00072 virtual bool addPoI(const std::string& name, int layer, const std::string& type, 00073 const RGBColor& c, const Position& pos) throw(); 00074 00075 00085 virtual bool addPolygon(const std::string& name, int layer, 00086 const std::string& type, const RGBColor& c, bool filled, const PositionVector& shape) throw(); 00087 00088 00089 00096 bool removePolygon(int layer, const std::string& id) throw(); 00097 00098 00105 bool removePoI(int layer, const std::string& id) throw(); 00106 00107 00108 00115 void movePoI(int layer, const std::string& id, const Position& pos) throw(); 00116 00117 00123 void reshapePolygon(int layer, const std::string& id, const PositionVector& shape) throw(); 00124 00125 00127 std::vector<GUIGlID> getShapeIDs() const; 00128 00129 00130 private: 00132 MFXMutex myLock; 00133 00135 SUMORTree& myVis; 00136 00137 }; 00138 00139 00140 #endif 00141 00142 /****************************************************************************/ 00143