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

#include <POI.h>

Collaboration diagram for libsumo::POI:
Collaboration graph

Static Public Member Functions

static bool add (const std::string &poiID, double x, double y, const TraCIColor &color, const std::string &poiType="", int layer=0)
 
static TraCIColor getColor (const std::string &poiID)
 
static int getIDCount ()
 
static std::vector< std::string > getIDList ()
 
static std::string getParameter (const std::string &poiID, const std::string &key)
 
static TraCIPosition getPosition (const std::string &poiID, const bool includeZ=false)
 
static LIBSUMO_SUBSCRIPTION_API NamedRTreegetTree ()
 Returns a tree filled with PoI instances. More...
 
static std::string getType (const std::string &poiID)
 
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper)
 
static std::shared_ptr< VariableWrappermakeWrapper ()
 
static bool remove (const std::string &poiID, int layer=0)
 
static void setColor (const std::string &poiID, const TraCIColor &c)
 
static void setParameter (const std::string &poiID, const std::string &key, const std::string &value)
 
static void setPosition (const std::string &poiID, double x, double y)
 
static void setType (const std::string &poiID, const std::string &setType)
 
static void storeShape (const std::string &id, PositionVector &shape)
 Saves the shape of the requested object in the given container. More...
 

Private Member Functions

 POI ()=delete
 invalidated standard constructor More...
 

Static Private Member Functions

static PointOfInterestgetPoI (const std::string &id)
 

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
 
static SubscriptionResults mySubscriptionResults
 

Detailed Description

Definition at line 52 of file POI.h.

Constructor & Destructor Documentation

◆ POI()

libsumo::POI::POI ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ add()

bool POI::add ( const std::string &  poiID,
double  x,
double  y,
const TraCIColor color,
const std::string &  poiType = "",
int  layer = 0 
)
static

◆ getColor()

TraCIColor POI::getColor ( const std::string &  poiID)
static

Definition at line 69 of file POI.cpp.

References getPoI(), and libsumo::Helper::makeTraCIColor().

Referenced by handleVariable().

◆ getIDCount()

int POI::getIDCount ( )
static

Definition at line 57 of file POI.cpp.

References getIDList().

Referenced by handleVariable().

◆ getIDList()

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

◆ getParameter()

std::string POI::getParameter ( const std::string &  poiID,
const std::string &  key 
)
static

Definition at line 81 of file POI.cpp.

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

Referenced by TraCIServerAPI_POI::processGet().

◆ getPoI()

◆ getPosition()

TraCIPosition POI::getPosition ( const std::string &  poiID,
const bool  includeZ = false 
)
static

Definition at line 75 of file POI.cpp.

References getPoI(), and libsumo::Helper::makeTraCIPosition().

Referenced by handleVariable().

◆ getTree()

NamedRTree * POI::getTree ( )
static

Returns a tree filled with PoI instances.

Returns
The rtree of PoIs

Definition at line 146 of file POI.cpp.

References MSNet::getInstance(), ShapeContainer::getPOIs(), MSNet::getShapeContainer(), and NamedRTree::Insert().

◆ getType()

std::string POI::getType ( const std::string &  poiID)
static

Definition at line 63 of file POI.cpp.

References getPoI(), and Shape::getShapeType().

Referenced by handleVariable().

◆ handleVariable()

◆ makeWrapper()

std::shared_ptr< VariableWrapper > POI::makeWrapper ( )
static

Definition at line 165 of file POI.cpp.

References handleVariable(), myContextSubscriptionResults, and mySubscriptionResults.

◆ remove()

bool POI::remove ( const std::string &  poiID,
int  layer = 0 
)
static

◆ setColor()

void POI::setColor ( const std::string &  poiID,
const TraCIColor c 
)
static

◆ setParameter()

void POI::setParameter ( const std::string &  poiID,
const std::string &  key,
const std::string &  value 
)
static

◆ setPosition()

void POI::setPosition ( const std::string &  poiID,
double  x,
double  y 
)
static

◆ setType()

void POI::setType ( const std::string &  poiID,
const std::string &  setType 
)
static

Definition at line 87 of file POI.cpp.

References getPoI(), and Shape::setShapeType().

Referenced by TraCIServerAPI_POI::processSet().

◆ storeShape()

void POI::storeShape ( const std::string &  id,
PositionVector shape 
)
static

Saves the shape of the requested object in the given container.

Parameters
idThe id of the poi to retrieve
shapeThe container to fill

Definition at line 159 of file POI.cpp.

References getPoI().

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults POI::myContextSubscriptionResults
staticprivate

Definition at line 91 of file POI.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults POI::mySubscriptionResults
staticprivate

Definition at line 90 of file POI.h.

Referenced by makeWrapper().


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