SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TraCIServerAPI_Polygon Class Reference

APIs for getting/setting polygon values via TraCI. More...

#include <TraCIServerAPI_Polygon.h>

Static Public Member Functions

static bool getShape (const std::string &id, PositionVector &shape)
 Returns the named polygons's shape. More...
 
static TraCIRTreegetTree ()
 Returns a tree filled with inductive loop instances. More...
 
static bool processGet (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a get value command (Command 0xa8: Get Polygon Variable) More...
 
static bool processSet (traci::TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a set value command (Command 0xc8: Change Polygon State) More...
 

Private Member Functions

TraCIServerAPI_Polygonoperator= (const TraCIServerAPI_Polygon &s)
 invalidated assignment operator More...
 
 TraCIServerAPI_Polygon (const TraCIServerAPI_Polygon &s)
 invalidated copy constructor More...
 

Static Private Member Functions

static PolygongetPolygon (const std::string &id, int &layer)
 Returns the named polygon. More...
 

Detailed Description

APIs for getting/setting polygon values via TraCI.

Definition at line 48 of file TraCIServerAPI_Polygon.h.

Constructor & Destructor Documentation

TraCIServerAPI_Polygon::TraCIServerAPI_Polygon ( const TraCIServerAPI_Polygon s)
private

invalidated copy constructor

Member Function Documentation

Polygon * TraCIServerAPI_Polygon::getPolygon ( const std::string &  id,
int layer 
)
staticprivate

Returns the named polygon.

Parameters
[in]idThe id of the searched polygon
[out]layerThe layer the polygon is located in
Returns
The named polygon, or 0 if it is not known

Definition at line 288 of file TraCIServerAPI_Polygon.cpp.

References NamedObjectCont< T >::get(), MSNet::getInstance(), ShapeContainer::getPolygons(), and MSNet::getShapeContainer().

bool TraCIServerAPI_Polygon::getShape ( const std::string &  id,
PositionVector shape 
)
static

Returns the named polygons's shape.

Parameters
[in]idThe id of the searched polygon
[out]shapeThe shape, if the polygon is known
Returns
Whether the polygon is known

Definition at line 276 of file TraCIServerAPI_Polygon.cpp.

References SUMO::Polygon::getShape(), and PositionVector::push_back().

Referenced by traci::TraCIServer::findObjectShape().

TraCIRTree * TraCIServerAPI_Polygon::getTree ( )
static

Returns a tree filled with inductive loop instances.

Returns
The rtree of inductive loop

Definition at line 295 of file TraCIServerAPI_Polygon.cpp.

References TraCIRTree::addObject(), MSNet::getInstance(), NamedObjectCont< T >::getMyMap(), ShapeContainer::getPolygons(), and MSNet::getShapeContainer().

Referenced by traci::TraCIServer::collectObjectsInRange().

TraCIServerAPI_Polygon& TraCIServerAPI_Polygon::operator= ( const TraCIServerAPI_Polygon s)
private

invalidated assignment operator

bool TraCIServerAPI_Polygon::processSet ( traci::TraCIServer server,
tcpip::Storage inputStorage,
tcpip::Storage outputStorage 
)
static

The documentation for this class was generated from the following files: