SUMO - Simulation of Urban MObility
libsumo::Polygon Class Reference

#include <Polygon.h>

Collaboration diagram for libsumo::Polygon:
Collaboration graph

Static Public Member Functions

static void add (const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &c, bool fill, const std::string &type, int layer)
 
static TraCIColor getColor (const std::string &polygonID)
 
static bool getFilled (const std::string &polygonID)
 
static std::vector< std::string > getIDList ()
 
static std::string getParameter (const std::string &polygonID, const std::string &paramName)
 
static TraCIPositionVector getShape (const std::string &polygonID)
 
static NamedRTreegetTree ()
 Returns a tree filled with polygon instances. More...
 
static std::string getType (const std::string &polygonID)
 
static void remove (const std::string &polygonID, int layer=0)
 
static void setColor (const std::string &polygonID, const TraCIColor &c)
 
static void setFilled (std::string polygonID, bool filled)
 
static void setParameter (std::string &name, std::string &value, std::string &string)
 
static void setShape (const std::string &polygonID, const TraCIPositionVector &shape)
 
static void setType (const std::string &polygonID, const std::string &setType)
 
static void subscribe (const std::string &objID, SUMOTime beginTime, SUMOTime endTime, const std::vector< int > &vars)
 
static void subscribeContext (const std::string &objID, SUMOTime beginTime, SUMOTime endTime, int domain, double range, const std::vector< int > &vars)
 

Private Member Functions

Polygonoperator= (const Polygon &src)
 invalidated assignment operator More...
 
 Polygon ()
 invalidated standard constructor More...
 
 Polygon (const Polygon &src)
 invalidated copy constructor More...
 

Static Private Member Functions

static SUMOPolygongetPolygon (const std::string &id)
 

Detailed Description

Definition at line 47 of file Polygon.h.

Constructor & Destructor Documentation

◆ Polygon() [1/2]

libsumo::Polygon::Polygon ( )
private

invalidated standard constructor

◆ Polygon() [2/2]

libsumo::Polygon::Polygon ( const Polygon src)
private

invalidated copy constructor

Member Function Documentation

◆ add()

void Polygon::add ( const std::string &  polygonID,
const TraCIPositionVector shape,
const TraCIColor c,
bool  fill,
const std::string &  type,
int  layer 
)
static

◆ getColor()

TraCIColor Polygon::getColor ( const std::string &  polygonID)
static

◆ getFilled()

bool Polygon::getFilled ( const std::string &  polygonID)
static

Definition at line 55 of file Polygon.cpp.

References SUMOPolygon::getFill(), and getPolygon().

Referenced by TraCIServerAPI_Polygon::processGet().

◆ getIDList()

std::vector< std::string > Polygon::getIDList ( )
static

◆ getParameter()

std::string Polygon::getParameter ( const std::string &  polygonID,
const std::string &  paramName 
)
static

Definition at line 66 of file Polygon.cpp.

References Parameterised::getParameter(), and getPolygon().

Referenced by TraCIServerAPI_Polygon::processGet().

◆ getPolygon()

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

◆ getShape()

TraCIPositionVector Polygon::getShape ( const std::string &  polygonID)
static

◆ getTree()

NamedRTree * Polygon::getTree ( )
static

Returns a tree filled with polygon instances.

Returns
The rtree of polygons

Definition at line 134 of file Polygon.cpp.

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

◆ getType()

std::string Polygon::getType ( const std::string &  polygonID)
static

Definition at line 44 of file Polygon.cpp.

References getPolygon(), and Shape::getType().

Referenced by TraCIServerAPI_Polygon::processGet().

◆ operator=()

Polygon& libsumo::Polygon::operator= ( const Polygon src)
private

invalidated assignment operator

◆ remove()

void Polygon::remove ( const std::string &  polygonID,
int  layer = 0 
)
static

◆ setColor()

void Polygon::setColor ( const std::string &  polygonID,
const TraCIColor c 
)
static

◆ setFilled()

void Polygon::setFilled ( std::string  polygonID,
bool  filled 
)
static

Definition at line 111 of file Polygon.cpp.

References getPolygon(), and SUMOPolygon::setFill().

Referenced by TraCIServerAPI_Polygon::processSet().

◆ setParameter()

void Polygon::setParameter ( std::string &  name,
std::string &  value,
std::string &  string 
)
static

Definition at line 128 of file Polygon.cpp.

References getPolygon(), and Parameterised::setParameter().

Referenced by TraCIServerAPI_Polygon::processSet().

◆ setShape()

void Polygon::setShape ( const std::string &  polygonID,
const TraCIPositionVector shape 
)
static

◆ setType()

void Polygon::setType ( const std::string &  polygonID,
const std::string &  setType 
)
static

Definition at line 71 of file Polygon.cpp.

References getPolygon(), and Shape::setType().

Referenced by TraCIServerAPI_Polygon::processSet().

◆ subscribe()

static void libsumo::Polygon::subscribe ( const std::string &  objID,
SUMOTime  beginTime,
SUMOTime  endTime,
const std::vector< int > &  vars 
)
static

◆ subscribeContext()

static void libsumo::Polygon::subscribeContext ( const std::string &  objID,
SUMOTime  beginTime,
SUMOTime  endTime,
int  domain,
double  range,
const std::vector< int > &  vars 
)
static

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