#include <Polygon2D.h>

Definition at line 47 of file Polygon2D.h.
Public Member Functions | |
| Polygon2D (const std::string &name, const std::string &type, const RGBColor &color, const Position2DVector &shape, bool fill) throw () | |
| Constructor. | |
| virtual | ~Polygon2D () throw () |
| Destructor. | |
Getter | |
| bool | fill () const throw () |
| Returns whether the polygon is filled. | |
| const RGBColor & | getColor () const throw () |
| Returns the color of the polygon. | |
| const std::string & | getID () const throw () |
| Returns the name of the polygon. | |
| const Position2DVector & | getShape () const throw () |
| Returns the shape of the polygon. | |
| const std::string & | getType () const throw () |
| Returns the (abstract) type of the polygon. | |
Setter | |
| void | setColor (const RGBColor &col) throw () |
| Sets a new color. | |
| void | setFill (bool fill) throw () |
| Sets whether the polygon shall be filled. | |
| void | setShape (const Position2DVector &shape) throw () |
| Sets a new shape. | |
| void | setType (const std::string &type) throw () |
| Sets a new type. | |
Protected Attributes | |
| RGBColor | myColor |
| The color of the polygon. | |
| bool | myFill |
| Information whether the polygon has to be filled. | |
| std::string | myName |
| The name of the polygon. | |
| Position2DVector | myShape |
| The positions of the polygon. | |
| std::string | myType |
| The type of the polygon. | |
| Polygon2D::Polygon2D | ( | const std::string & | name, | |
| const std::string & | type, | |||
| const RGBColor & | color, | |||
| const Position2DVector & | shape, | |||
| bool | fill | |||
| ) | throw () |
Constructor.
| [in] | name | The name of the polygon |
| [in] | type | The (abstract) type of the polygon |
| [in] | color | The color of the polygon |
| [in] | shape | The shape of the poslygon |
| [in] | fill | Whether the polygon shall be filled |
Definition at line 41 of file Polygon2D.cpp.
| Polygon2D::~Polygon2D | ( | ) | throw () [virtual] |
| bool Polygon2D::fill | ( | ) | const throw () [inline] |
Returns whether the polygon is filled.
Definition at line 103 of file Polygon2D.h.
References myFill.
Referenced by GUIPolygon2D::drawGL(), and TraCIServerAPI_Polygon::processGet().
00103 { 00104 return myFill; 00105 }
| const RGBColor& Polygon2D::getColor | ( | ) | const throw () [inline] |
Returns the color of the polygon.
Definition at line 87 of file Polygon2D.h.
References myColor.
Referenced by GUIPolygon2D::drawGL(), and TraCIServerAPI_Polygon::processGet().
00087 { 00088 return myColor; 00089 }
| const std::string& Polygon2D::getID | ( | ) | const throw () [inline] |
Returns the name of the polygon.
Definition at line 71 of file Polygon2D.h.
References myName.
Referenced by traci::TraCIServer::handlePolygonDomain().
00071 { 00072 return myName; 00073 }
| const Position2DVector& Polygon2D::getShape | ( | ) | const throw () [inline] |
Returns the shape of the polygon.
Definition at line 95 of file Polygon2D.h.
References myShape.
Referenced by traci::TraCIServer::handlePolygonDomain(), and TraCIServerAPI_Polygon::processGet().
00095 { 00096 return myShape; 00097 }
| const std::string& Polygon2D::getType | ( | ) | const throw () [inline] |
Returns the (abstract) type of the polygon.
Definition at line 79 of file Polygon2D.h.
References myType.
Referenced by traci::TraCIServer::handlePolygonDomain(), and TraCIServerAPI_Polygon::processGet().
00079 { 00080 return myType; 00081 }
| void Polygon2D::setColor | ( | const RGBColor & | col | ) | throw () [inline] |
Sets a new color.
| [in] | col | The new color to use |
Definition at line 124 of file Polygon2D.h.
References myColor.
Referenced by TraCIServerAPI_Polygon::processSet().
00124 { 00125 myColor = col; 00126 }
| void Polygon2D::setFill | ( | bool | fill | ) | throw () [inline] |
Sets whether the polygon shall be filled.
| [in] | fill | Whether the polygon shall be filled |
Definition at line 140 of file Polygon2D.h.
References myFill.
Referenced by TraCIServerAPI_Polygon::processSet().
00140 { 00141 myFill = fill; 00142 }
| void Polygon2D::setShape | ( | const Position2DVector & | shape | ) | throw () [inline] |
Sets a new shape.
| [in] | shape | The new shape to use |
Definition at line 132 of file Polygon2D.h.
References myShape.
Referenced by TraCIServerAPI_Polygon::processSet().
00132 { 00133 myShape = shape; 00134 }
| void Polygon2D::setType | ( | const std::string & | type | ) | throw () [inline] |
Sets a new type.
| [in] | type | The new type to use |
Definition at line 116 of file Polygon2D.h.
References myType.
Referenced by TraCIServerAPI_Polygon::processSet().
00116 { 00117 myType = type; 00118 }
RGBColor Polygon2D::myColor [protected] |
The color of the polygon.
Definition at line 154 of file Polygon2D.h.
Referenced by getColor(), and setColor().
bool Polygon2D::myFill [protected] |
std::string Polygon2D::myName [protected] |
The name of the polygon.
Definition at line 148 of file Polygon2D.h.
Referenced by getID(), and GUIPolygon2D::getMicrosimID().
Position2DVector Polygon2D::myShape [protected] |
The positions of the polygon.
Definition at line 157 of file Polygon2D.h.
Referenced by GUIPolygon2D::drawGL(), GUIPolygon2D::getCenteringBoundary(), getShape(), and setShape().
std::string Polygon2D::myType [protected] |
The type of the polygon.
Definition at line 151 of file Polygon2D.h.
Referenced by GUIPolygon2D::getPopUpMenu(), getType(), and setType().
1.5.6