SUMO - Simulation of Urban MObility
|
Scope for interaction with polygons. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | add (const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &c, bool fill, const std::string &type, int layer) const |
TraCIColor | getColor (const std::string &polygonID) const |
std::vector< std::string > | getIDList () const |
TraCIPositionVector | getShape (const std::string &polygonID) const |
std::string | getType (const std::string &polygonID) const |
PolygonScope (TraCIAPI &parent) | |
void | remove (const std::string &polygonID, int layer=0) const |
void | setColor (const std::string &polygonID, const TraCIColor &c) const |
void | setShape (const std::string &polygonID, const TraCIPositionVector &shape) const |
void | setType (const std::string &polygonID, const std::string &setType) const |
virtual | ~PolygonScope () |
Protected Attributes | |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
Private Member Functions | |
PolygonScope & | operator= (const PolygonScope &src) |
invalidated assignment operator More... | |
PolygonScope (const PolygonScope &src) | |
invalidated copy constructor More... | |
Scope for interaction with polygons.
Definition at line 449 of file TraCIAPI.h.
|
inline |
Definition at line 451 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 452 of file TraCIAPI.h.
|
private |
invalidated copy constructor
void TraCIAPI::PolygonScope::add | ( | const std::string & | polygonID, |
const TraCIPositionVector & | shape, | ||
const TraCIColor & | c, | ||
bool | fill, | ||
const std::string & | type, | ||
int | layer | ||
) | const |
Definition at line 1031 of file TraCIAPI.cpp.
References TraCIAPI::TraCIColor::a, ADD, TraCIAPI::TraCIColor::b, CMD_SET_POLYGON_VARIABLE, TraCIAPI::TraCIColor::g, TraCIAPI::TraCIColor::r, TYPE_COLOR, TYPE_COMPOUND, TYPE_INTEGER, TYPE_POLYGON, TYPE_STRING, TYPE_UBYTE, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
TraCIAPI::TraCIColor TraCIAPI::PolygonScope::getColor | ( | const std::string & | polygonID | ) | const |
Definition at line 994 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and VAR_COLOR.
std::vector< std::string > TraCIAPI::PolygonScope::getIDList | ( | ) | const |
Definition at line 979 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and ID_LIST.
TraCIAPI::TraCIPositionVector TraCIAPI::PolygonScope::getShape | ( | const std::string & | polygonID | ) | const |
Definition at line 989 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and VAR_SHAPE.
std::string TraCIAPI::PolygonScope::getType | ( | const std::string & | polygonID | ) | const |
Definition at line 984 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and VAR_TYPE.
|
private |
invalidated assignment operator
void TraCIAPI::PolygonScope::remove | ( | const std::string & | polygonID, |
int | layer = 0 |
||
) | const |
Definition at line 1057 of file TraCIAPI.cpp.
References CMD_SET_POLYGON_VARIABLE, REMOVE, TYPE_INTEGER, tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::PolygonScope::setColor | ( | const std::string & | polygonID, |
const TraCIColor & | c | ||
) | const |
Definition at line 1020 of file TraCIAPI.cpp.
References TraCIAPI::TraCIColor::a, TraCIAPI::TraCIColor::b, CMD_SET_POLYGON_VARIABLE, TraCIAPI::TraCIColor::g, TraCIAPI::TraCIColor::r, TYPE_COLOR, VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::PolygonScope::setShape | ( | const std::string & | polygonID, |
const TraCIPositionVector & | shape | ||
) | const |
Definition at line 1008 of file TraCIAPI.cpp.
References CMD_SET_POLYGON_VARIABLE, TYPE_POLYGON, VAR_POSITION, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::PolygonScope::setType | ( | const std::string & | polygonID, |
const std::string & | setType | ||
) | const |
Definition at line 1000 of file TraCIAPI.cpp.
References CMD_SET_POLYGON_VARIABLE, TYPE_STRING, VAR_TYPE, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 188 of file TraCIAPI.h.
Referenced by TraCIAPI::EdgeScope::getIDList().