Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
LIBSUMO_NAMESPACE::POI Class Reference

#include <POI.h>

Collaboration diagram for LIBSUMO_NAMESPACE::POI:
[legend]

Static Public Member Functions

static bool add (const std::string &poiID, double x, double y, const libsumo::TraCIColor &color, const std::string &poiType="", int layer=0, const std::string &imgFile="", double width=1, double height=1, double angle=0, const std::string &icon="")
static void cleanup ()
static double getAngle (const std::string &poiID)
static libsumo::TraCIColor getColor (const std::string &poiID)
static double getHeight (const std::string &poiID)
static std::string getImageFile (const std::string &poiID)
static libsumo::TraCIPosition getPosition (const std::string &poiID, const bool includeZ=false)
static NamedRTreegetTree ()
 Returns a tree filled with PoI instances.
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, tcpip::Storage *paramData)
static void highlight (const std::string &poiID, const libsumo::TraCIColor &col=libsumo::TraCIColor(255, 0, 0, 255), double size=-1, const int alphaMax=-1, const double duration=-1, const int type=0)
static std::shared_ptr< VariableWrapper > makeWrapper ()
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 libsumo::TraCIColor &color)
static void setHeight (const std::string &poiID, double height)
static void setImageFile (const std::string &poiID, const std::string &imageFile)
static void setPosition (const std::string &poiID, double x, double y)
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setType (const std::string &poiID, const std::string &poiType)
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.

Private Member Functions

 POI ()=delete
 invalidated standard constructor

Static Private Member Functions

static PointOfInterestgetPoI (const std::string &id)

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
static SubscriptionResults mySubscriptionResults
static NamedRTreemyTree

Detailed Description

Definition at line 46 of file POI.h.

Constructor & Destructor Documentation

◆ POI()

LIBSUMO_NAMESPACE::POI::POI ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ add()

bool POI::add ( const std::string & poiID,
double x,
double y,
const libsumo::TraCIColor & color,
const std::string & poiType = "",
int layer = 0,
const std::string & imgFile = "",
double width = 1,
double height = 1,
double angle = 0,
const std::string & icon = "" )
static

Definition at line 158 of file libsumo/POI.cpp.

References add(), ShapeContainer::addPOI(), NamedObjectCont< T >::get(), MSNet::getInstance(), ShapeContainer::getPOIs(), MSNet::getShapeContainer(), libsumo::Helper::makeRGBColor(), myTree, Position::x(), and Position::y().

Referenced by add().

Here is the caller graph for this function:

◆ cleanup()

void POI::cleanup ( )
static

Definition at line 277 of file libsumo/POI.cpp.

References cleanup(), and myTree.

Referenced by cleanup().

Here is the caller graph for this function:

◆ getAngle()

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

Definition at line 93 of file libsumo/POI.cpp.

References getAngle(), and getPoI().

Referenced by getAngle(), and handleVariable().

Here is the caller graph for this function:

◆ getColor()

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

Definition at line 69 of file libsumo/POI.cpp.

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

Referenced by getColor(), and handleVariable().

Here is the caller graph for this function:

◆ getHeight()

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

Definition at line 87 of file libsumo/POI.cpp.

References getHeight(), and getPoI().

Referenced by getHeight(), and handleVariable().

Here is the caller graph for this function:

◆ getImageFile()

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

Definition at line 99 of file libsumo/POI.cpp.

References getImageFile(), and getPoI().

Referenced by getImageFile(), and handleVariable().

Here is the caller graph for this function:

◆ getPoI()

PointOfInterest * POI::getPoI ( const std::string & id)
staticprivate

Definition at line 253 of file libsumo/POI.cpp.

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

Referenced by getAngle(), getColor(), getHeight(), getImageFile(), getPoI(), getPosition(), getType(), getWidth(), highlight(), setAngle(), setColor(), setHeight(), setImageFile(), setPosition(), setType(), setWidth(), and storeShape().

Here is the caller graph for this function:

◆ getPosition()

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

Definition at line 75 of file libsumo/POI.cpp.

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

Referenced by getPosition(), and handleVariable().

Here is the caller graph for this function:

◆ getTree()

NamedRTree * POI::getTree ( )
static

Returns a tree filled with PoI instances.

Returns
The rtree of PoIs

Definition at line 263 of file libsumo/POI.cpp.

References MSNet::getInstance(), ShapeContainer::getPOIs(), MSNet::getShapeContainer(), getTree(), and myTree.

Referenced by getTree().

Here is the caller graph for this function:

◆ getType()

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

Definition at line 63 of file libsumo/POI.cpp.

References getPoI(), and getType().

Referenced by getType(), and handleVariable().

Here is the caller graph for this function:

◆ getWidth()

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

Definition at line 81 of file libsumo/POI.cpp.

References getPoI(), and getWidth().

Referenced by getWidth(), and handleVariable().

Here is the caller graph for this function:

◆ handleVariable()

bool POI::handleVariable ( const std::string & objID,
const int variable,
VariableWrapper * wrapper,
tcpip::Storage * paramData )
static

◆ highlight()

void POI::highlight ( const std::string & poiID,
const libsumo::TraCIColor & col = libsumo::TraCIColor(255, 0, 0, 255),
double size = -1,
const int alphaMax = -1,
const double duration = -1,
const int type = 0 )
static

◆ makeWrapper()

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

Definition at line 290 of file libsumo/POI.cpp.

References handleVariable(), makeWrapper(), myContextSubscriptionResults, and mySubscriptionResults.

Referenced by makeWrapper().

Here is the caller graph for this function:

◆ remove()

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

Definition at line 175 of file libsumo/POI.cpp.

References NamedObjectCont< T >::get(), MSNet::getInstance(), ShapeContainer::getPOIs(), MSNet::getShapeContainer(), myTree, remove(), ShapeContainer::removePOI(), Position::x(), and Position::y().

Referenced by remove().

Here is the caller graph for this function:

◆ setAngle()

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

Definition at line 146 of file libsumo/POI.cpp.

References getPoI(), and setAngle().

Referenced by setAngle().

Here is the caller graph for this function:

◆ setColor()

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

Definition at line 128 of file libsumo/POI.cpp.

References getPoI(), libsumo::Helper::makeRGBColor(), and setColor().

Referenced by setColor().

Here is the caller graph for this function:

◆ setHeight()

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

Definition at line 140 of file libsumo/POI.cpp.

References getPoI(), and setHeight().

Referenced by setHeight().

Here is the caller graph for this function:

◆ setImageFile()

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

Definition at line 152 of file libsumo/POI.cpp.

References getPoI(), and setImageFile().

Referenced by setImageFile().

Here is the caller graph for this function:

◆ setPosition()

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

Definition at line 120 of file libsumo/POI.cpp.

References MSNet::getInstance(), getPoI(), MSNet::getShapeContainer(), ShapeContainer::movePOI(), and setPosition().

Referenced by setPosition().

Here is the caller graph for this function:

◆ setType()

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

Definition at line 114 of file libsumo/POI.cpp.

References getPoI(), and setType().

Referenced by setType().

Here is the caller graph for this function:

◆ setWidth()

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

Definition at line 134 of file libsumo/POI.cpp.

References getPoI(), and setWidth().

Referenced by setWidth().

Here is the caller graph for this function:

◆ 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 284 of file libsumo/POI.cpp.

References getPoI(), and storeShape().

Referenced by storeShape().

Here is the caller graph for this function:

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults POI::myContextSubscriptionResults
staticprivate

Definition at line 98 of file POI.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults POI::mySubscriptionResults
staticprivate

Definition at line 97 of file POI.h.

Referenced by makeWrapper().

◆ myTree

NamedRTree * POI::myTree
staticprivate

Definition at line 99 of file POI.h.

Referenced by add(), cleanup(), getTree(), and remove().


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