![]() |
Eclipse 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 449 of file TraCIAPI.h.
|
inline |
Definition at line 451 of file TraCIAPI.h.
|
inlinevirtual |
Definition at line 452 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 1563 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::ADD, libsumo::TraCIColor::b, libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::TraCIColor::g, libsumo::TraCIColor::r, libsumo::TYPE_COLOR, libsumo::TYPE_COMPOUND, libsumo::TYPE_INTEGER, libsumo::TYPE_POLYGON, libsumo::TYPE_STRING, libsumo::TYPE_UBYTE, tcpip::Storage::writeDouble(), tcpip::Storage::writeInt(), tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
Definition at line 3667 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3651 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3635 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
libsumo::TraCIColor TraCIAPI::PolygonScope::getColor | ( | const std::string & | polygonID | ) | const |
Definition at line 1508 of file TraCIAPI.cpp.
References libsumo::CMD_GET_POLYGON_VARIABLE, and libsumo::VAR_COLOR.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3657 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
int TraCIAPI::PolygonScope::getIDCount | ( | ) | const |
Definition at line 1488 of file TraCIAPI.cpp.
References libsumo::CMD_GET_POLYGON_VARIABLE, and libsumo::ID_COUNT.
Referenced by TraCITestClient::testAPI().
std::vector< std::string > TraCIAPI::PolygonScope::getIDList | ( | ) | const |
Definition at line 1483 of file TraCIAPI.cpp.
References libsumo::CMD_GET_POLYGON_VARIABLE, and libsumo::TRACI_ID_LIST.
Referenced by TraCITestClient::testAPI().
double TraCIAPI::PolygonScope::getLineWidth | ( | const std::string & | polygonID | ) | const |
Definition at line 1493 of file TraCIAPI.cpp.
References libsumo::CMD_GET_POLYGON_VARIABLE, and libsumo::VAR_WIDTH.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3680 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3674 of file TraCIAPI.cpp.
Referenced by TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
retrieve generic paramter
Definition at line 3590 of file TraCIAPI.cpp.
References libsumo::TYPE_STRING, libsumo::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 1503 of file TraCIAPI.cpp.
References libsumo::CMD_GET_POLYGON_VARIABLE, and libsumo::VAR_SHAPE.
Referenced by TraCITestClient::testAPI().
|
inherited |
Definition at line 3641 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 1498 of file TraCIAPI.cpp.
References libsumo::CMD_GET_POLYGON_VARIABLE, and libsumo::VAR_TYPE.
|
private |
invalidated assignment operator
void TraCIAPI::PolygonScope::remove | ( | const std::string & | polygonID, |
int | layer = 0 |
||
) | const |
Definition at line 1590 of file TraCIAPI.cpp.
References libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::REMOVE, libsumo::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 1551 of file TraCIAPI.cpp.
References libsumo::TraCIColor::a, libsumo::TraCIColor::b, libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::TraCIColor::g, libsumo::TraCIColor::r, libsumo::TYPE_COLOR, libsumo::VAR_COLOR, and tcpip::Storage::writeUnsignedByte().
void TraCIAPI::PolygonScope::setLineWidth | ( | const std::string & | polygonID, |
const double | lineWidth | ||
) | const |
Definition at line 1513 of file TraCIAPI.cpp.
References libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::TYPE_DOUBLE, libsumo::VAR_WIDTH, tcpip::Storage::writeDouble(), and tcpip::Storage::writeUnsignedByte().
Referenced by TraCITestClient::testAPI().
|
inherited |
set generic paramter
Definition at line 3599 of file TraCIAPI.cpp.
References libsumo::TYPE_COMPOUND, libsumo::TYPE_STRING, libsumo::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 1532 of file TraCIAPI.cpp.
References libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::TYPE_POLYGON, libsumo::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 1522 of file TraCIAPI.cpp.
References libsumo::CMD_SET_POLYGON_VARIABLE, libsumo::TYPE_STRING, libsumo::VAR_TYPE, tcpip::Storage::writeString(), and tcpip::Storage::writeUnsignedByte().
|
inherited |
Definition at line 3613 of file TraCIAPI.cpp.
Referenced by TraCITestClient::testAPI(), and TraCIAPI::TraCIScopeWrapper::~TraCIScopeWrapper().
|
inherited |
Definition at line 3625 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.