![]() |
SUMO - Simulation of Urban MObility
|
Scope for interaction with polygons. More...
#include <TraCIAPI.h>
Public Member Functions | |
void | add (const std::string &polygonID, const libsumo::TraCIPositionVector &shape, const libsumo::TraCIColor &c, bool fill, const std::string &type, int layer) const |
void | clearSubscriptionResults () |
const libsumo::ContextSubscriptionResults | getAllContextSubscriptionResults () const |
const libsumo::SubscriptionResults | getAllSubscriptionResults () const |
libsumo::TraCIColor | getColor (const std::string &polygonID) const |
const libsumo::SubscriptionResults | getContextSubscriptionResults (const std::string &objID) const |
int | getIDCount () const |
std::vector< std::string > | getIDList () const |
double | getLineWidth (const std::string &polygonID) const |
libsumo::SubscriptionResults & | getModifiableContextSubscriptionResults (const std::string &objID) |
libsumo::SubscriptionResults & | getModifiableSubscriptionResults () |
std::string | getParameter (const std::string &objectID, const std::string &key) const |
retrieve generic paramter More... | |
libsumo::TraCIPositionVector | getShape (const std::string &polygonID) const |
const libsumo::TraCIResults | getSubscriptionResults (const std::string &objID) 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 libsumo::TraCIColor &c) const |
void | setLineWidth (const std::string &polygonID, const double lineWidth) const |
void | setParameter (const std::string &objectID, const std::string &key, const std::string &value) const |
set generic paramter More... | |
void | setShape (const std::string &polygonID, const libsumo::TraCIPositionVector &shape) const |
void | setType (const std::string &polygonID, const std::string &setType) const |
void | subscribe (const std::string &objID, const std::vector< int > &vars, double beginTime, double endTime) const |
void | subscribeContext (const std::string &objID, int domain, double range, const std::vector< int > &vars, double beginTime, double endTime) const |
virtual | ~PolygonScope () |
Protected Attributes | |
int | myCmdGetID |
int | myCmdSetID |
int | myContextSubscribeID |
libsumo::ContextSubscriptionResults | myContextSubscriptionResults |
TraCIAPI & | myParent |
The parent TraCI client which offers the connection. More... | |
int | mySubscribeID |
libsumo::SubscriptionResults | mySubscriptionResults |
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 439 of file TraCIAPI.h.
|
inline |
Definition at line 441 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 442 of file TraCIAPI.h.
References TraCIAPI::getColor(), and TraCIAPI::TraCIScopeWrapper::operator=().
|
private |
invalidated copy constructor
void TraCIAPI::PolygonScope::add | ( | const std::string & | polygonID, |
const libsumo::TraCIPositionVector & | shape, | ||
const libsumo::TraCIColor & | c, | ||
bool | fill, | ||
const std::string & | type, | ||
int | layer | ||
) | const |
Definition at line 1455 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, ADD, libsumo::TraCIColor::b, CMD_SET_POLYGON_VARIABLE, libsumo::TraCIColor::g, libsumo::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().
|
inherited |
Definition at line 3313 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3297 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3281 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
libsumo::TraCIColor TraCIAPI::PolygonScope::getColor | ( | const std::string & | polygonID | ) | const |
Definition at line 1396 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and VAR_COLOR.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3303 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
int TraCIAPI::PolygonScope::getIDCount | ( | ) | const |
Definition at line 1376 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::PolygonScope::getIDList | ( | ) | const |
Definition at line 1371 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::PolygonScope::getLineWidth | ( | const std::string & | polygonID | ) | const |
Definition at line 1381 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and VAR_WIDTH.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3326 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3320 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
retrieve generic paramter
Definition at line 3235 of file TraCIAPI.cpp.
References TYPE_STRING, VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
libsumo::TraCIPositionVector TraCIAPI::PolygonScope::getShape | ( | const std::string & | polygonID | ) | const |
Definition at line 1391 of file TraCIAPI.cpp.
References CMD_GET_POLYGON_VARIABLE, and VAR_SHAPE.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3287 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
std::string TraCIAPI::PolygonScope::getType | ( | const std::string & | polygonID | ) | const |
Definition at line 1386 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 1483 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 libsumo::TraCIColor & | c | ||
) | const |
Definition at line 1442 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, CMD_SET_POLYGON_VARIABLE, libsumo::TraCIColor::g, libsumo::TraCIColor::r, TYPE_COLOR, VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::PolygonScope::setLineWidth | ( | const std::string & | polygonID, |
const double | lineWidth | ||
) | const |
Definition at line 1401 of file TraCIAPI.cpp.
References CMD_SET_POLYGON_VARIABLE, TYPE_DOUBLE, VAR_WIDTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3244 of file TraCIAPI.cpp.
References TYPE_COMPOUND, TYPE_STRING, VAR_PARAMETER, tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
void TraCIAPI::PolygonScope::setShape | ( | const std::string & | polygonID, |
const libsumo::TraCIPositionVector & | shape | ||
) | const |
Definition at line 1422 of file TraCIAPI.cpp.
References CMD_SET_POLYGON_VARIABLE, TYPE_POLYGON, VAR_SHAPE, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
void TraCIAPI::PolygonScope::setType | ( | const std::string & | polygonID, |
const std::string & | setType | ||
) | const |
Definition at line 1411 of file TraCIAPI.cpp.
References CMD_SET_POLYGON_VARIABLE, TYPE_STRING, VAR_TYPE, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
Definition at line 3259 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3271 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
protectedinherited |
Definition at line 146 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 147 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 149 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 151 of file TraCIAPI.h.
|
protectedinherited |
The parent TraCI client which offers the connection.
Definition at line 145 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 148 of file TraCIAPI.h.
|
protectedinherited |
Definition at line 150 of file TraCIAPI.h.