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

#include <POI.h>

Collaboration diagram for libsumo::POI:

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, const std::string &imgFile=Shape::DEFAULT_IMG_FILE, double width=Shape::DEFAULT_IMG_WIDTH, double height=Shape::DEFAULT_IMG_HEIGHT, double angle=Shape::DEFAULT_ANGLE)
 
static double getAngle (const std::string &poiID)
 
static TraCIColor getColor (const std::string &poiID)
 
static double getHeight (const std::string &poiID)
 
static int getIDCount ()
 
static std::vector< std::string > getIDList ()
 
static std::string getImageFile (const std::string &poiID)
 
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 double getWidth (const std::string &poiID)
 
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper)
 
static void highlight (const std::string &poiID, const TraCIColor &col, double size, const int alphaMax, const double duration, const int type)
 
static std::shared_ptr< VariableWrappermakeWrapper ()
 
static bool remove (const std::string &poiID, int layer=0)
 
static void setAngle (const std::string &poiID, double angle)
 
static void setColor (const std::string &poiID, const TraCIColor &c)
 
static void setHeight (const std::string &poiID, double height)
 
static void setImageFile (const std::string &poiID, const std::string &imageFile)
 
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 setWidth (const std::string &poiID, double width)
 
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,
const std::string &  imgFile = Shape::DEFAULT_IMG_FILE,
double  width = Shape::DEFAULT_IMG_WIDTH,
double  height = Shape::DEFAULT_IMG_HEIGHT,
double  angle = Shape::DEFAULT_ANGLE 
)
static

◆ getAngle()

double POI::getAngle ( const std::string &  poiID)
static

Definition at line 94 of file POI.cpp.

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

Referenced by handleVariable().

◆ getColor()

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

Definition at line 70 of file POI.cpp.

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

Referenced by handleVariable().

◆ getHeight()

double POI::getHeight ( const std::string &  poiID)
static

Definition at line 88 of file POI.cpp.

References PointOfInterest::getHeight(), and getPoI().

Referenced by handleVariable().

◆ getIDCount()

int POI::getIDCount ( )
static

Definition at line 58 of file POI.cpp.

References getIDList().

Referenced by handleVariable().

◆ getIDList()

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

◆ getImageFile()

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

Definition at line 100 of file POI.cpp.

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

Referenced by handleVariable().

◆ getParameter()

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

Definition at line 106 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 76 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 250 of file POI.cpp.

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

Referenced by libsumo::Helper::collectObjectsInRange().

◆ getType()

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

Definition at line 64 of file POI.cpp.

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

Referenced by handleVariable().

◆ getWidth()

double POI::getWidth ( const std::string &  poiID)
static

Definition at line 82 of file POI.cpp.

References getPoI(), and PointOfInterest::getWidth().

Referenced by handleVariable().

◆ handleVariable()

◆ highlight()

void POI::highlight ( const std::string &  poiID,
const TraCIColor col,
double  size,
const int  alphaMax,
const double  duration,
const int  type 
)
static

◆ makeWrapper()

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

◆ remove()

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

◆ setAngle()

void POI::setAngle ( const std::string &  poiID,
double  angle 
)
static

Definition at line 144 of file POI.cpp.

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

Referenced by TraCIServerAPI_POI::processSet().

◆ setColor()

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

◆ setHeight()

void POI::setHeight ( const std::string &  poiID,
double  height 
)
static

Definition at line 138 of file POI.cpp.

References getPoI(), and PointOfInterest::setHeight().

Referenced by TraCIServerAPI_POI::processSet().

◆ setImageFile()

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

Definition at line 150 of file POI.cpp.

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

Referenced by TraCIServerAPI_POI::processSet().

◆ setParameter()

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

Definition at line 229 of file POI.cpp.

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

Referenced by TraCIServerAPI_POI::processSet().

◆ 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 112 of file POI.cpp.

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

Referenced by TraCIServerAPI_POI::processSet().

◆ setWidth()

void POI::setWidth ( const std::string &  poiID,
double  width 
)
static

Definition at line 132 of file POI.cpp.

References getPoI(), and PointOfInterest::setWidth().

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 263 of file POI.cpp.

References getPoI().

Referenced by libsumo::Helper::findObjectShape().

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults POI::myContextSubscriptionResults
staticprivate

Definition at line 100 of file POI.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults POI::mySubscriptionResults
staticprivate

Definition at line 99 of file POI.h.

Referenced by makeWrapper().


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