SUMO - Simulation of Urban MObility
TraCIServerAPI_Polygon Class Reference

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

#include <TraCIServerAPI_Polygon.h>

Collaboration diagram for TraCIServerAPI_Polygon:
Collaboration graph

Static Public Member Functions

static bool getShape (const std::string &id, PositionVector &shape)
 Returns the named polygons's shape. More...
 
static NamedRTreegetTree ()
 Returns a tree filled with polygon instances. More...
 
static bool processGet (TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
 Processes a get value command (Command 0xa8: Get Polygon Variable) More...
 
static bool processSet (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 SUMO::PolygongetPolygon (const std::string &id)
 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::TraCIServerAPI_Polygon ( const TraCIServerAPI_Polygon s)
private

invalidated copy constructor

Member Function Documentation

◆ getPolygon()

SUMO::Polygon * TraCIServerAPI_Polygon::getPolygon ( const std::string &  id)
staticprivate

Returns the named polygon.

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

Definition at line 259 of file TraCIServerAPI_Polygon.cpp.

References MSNet::getInstance(), ShapeContainer::getPolygons(), and MSNet::getShapeContainer().

Referenced by getShape().

◆ getShape()

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 249 of file TraCIServerAPI_Polygon.cpp.

References getPolygon(), and SUMO::Polygon::getShape().

Referenced by TraCIServer::findObjectShape().

◆ getTree()

NamedRTree * TraCIServerAPI_Polygon::getTree ( )
static

Returns a tree filled with polygon instances.

Returns
The rtree of polygons

Definition at line 264 of file TraCIServerAPI_Polygon.cpp.

References MSNet::getInstance(), ShapeContainer::getPolygons(), MSNet::getShapeContainer(), NamedRTree::Insert(), Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by TraCIServer::collectObjectsInRange().

◆ operator=()

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

invalidated assignment operator

◆ processGet()

◆ processSet()


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