Eclipse SUMO - Simulation of Urban MObility
GNENetHelper::AttributeCarriers Class Reference

struct used for saving all attribute carriers of net, in different formats More...

#include <GNENetHelper.h>

Inheritance diagram for GNENetHelper::AttributeCarriers:
Collaboration diagram for GNENetHelper::AttributeCarriers:

Public Member Functions

 AttributeCarriers (GNENet *net)
 constructor More...
 
void remapJunctionAndEdgeIds ()
 remap junction and edge IDs More...
 
void updateID (GNEAttributeCarrier *AC, const std::string newID)
 update ID More...
 
 ~AttributeCarriers ()
 destructor More...
 
function for junctions

registers a junction in GNENet containers

GNEJunctionregisterJunction (GNEJunction *junction)
 
const std::map< std::string, GNEJunction * > & getJunctions () const
 map with the ID and pointer to junctions of net More...
 
void clearJunctions ()
 clear junctions More...
 
function for edgeTypes

registers a edge in GNENet containers

GNEEdgeTyperegisterEdgeType (GNEEdgeType *edgeType)
 
const std::map< std::string, GNEEdgeType * > & getEdgeTypes () const
 map with the ID and pointer to edgeTypes of net More...
 
void clearEdgeTypes ()
 clear edgeTypes More...
 
function for edges

registers an edge with GNENet containers

GNEEdgeregisterEdge (GNEEdge *edge)
 
const std::map< std::string, GNEEdge * > & getEdges () const
 map with the ID and pointer to edges of net More...
 
void clearEdges ()
 clear edges More...
 
inherited from ShapeHandler
bool addPolygon (const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath, const PositionVector &shape, bool geo, bool fill, double lineWidth, bool ignorePruning=false)
 Builds a polygon using the given values and adds it to the container. More...
 
bool addPOI (const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, double posLat, double layer, double angle, const std::string &imgFile, bool relativePath, double width, double height, bool ignorePruning=false)
 Builds a POI using the given values and adds it to the container. More...
 
function for additionals

get additionals

const std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > & getAdditionals () const
 
void clearAdditionals ()
 clear additionals More...
 
function for shapes

get shapes

const std::map< SumoXMLTag, std::map< std::string, GNEShape * > > & getShapes () const
 
void clearShapes ()
 clear shapes More...
 
function for TAZElements

get TAZElements

const std::map< SumoXMLTag, std::map< std::string, GNETAZElement * > > & getTAZElements () const
 
void clearTAZElements ()
 clear TAZElements More...
 
function for demand elements

get demand elements

const std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > & getDemandElements () const
 
void clearDemandElements ()
 clear demand elements More...
 
void addDefaultVTypes ()
 add default VTypes More...
 
const std::map< std::string, GNEDataSet * > & getDataSets () const
 
void clearDataSets ()
 clear demand elements More...
 
function for data Sets

retrieve generic datas within the given interval

std::vector< GNEGenericData * > retrieveGenericDatas (const SumoXMLTag genericDataTag, const double begin, const double end)
 

Protected Member Functions

Insertion and erasing of GNEJunctions

inserts a single junction into the net and into the underlying netbuild-container

void insertJunction (GNEJunction *junction)
 
void deleteSingleJunction (GNEJunction *junction)
 deletes a single junction More...
 
void updateJunctionID (GNEAttributeCarrier *AC, const std::string &newID)
 update junction ID in container More...
 
Insertion and erasing of GNEEdgeTypes

return true if given edgeType exist

bool edgeTypeExist (const GNEEdgeType *edgeType) const
 
void insertEdgeType (GNEEdgeType *edgeType)
 inserts a single edgeType into the net and into the underlying netbuild-container More...
 
void deleteEdgeType (GNEEdgeType *edgeType)
 deletes edgeType More...
 
void updateEdgeTypeID (GNEAttributeCarrier *AC, const std::string &newID)
 update edgeType ID in container More...
 
Insertion and erasing of GNEEdges

inserts a single edge into the net and into the underlying netbuild-container

void insertEdge (GNEEdge *edge)
 
void deleteSingleEdge (GNEEdge *edge)
 deletes a single edge More...
 
void updateEdgeID (GNEAttributeCarrier *AC, const std::string &newID)
 update edge ID in container More...
 
Insertion and erasing of GNEAdditionals items
bool additionalExist (const GNEAdditional *additional) const
 return true if given additional exist More...
 
void insertAdditional (GNEAdditional *additional)
 Insert a additional element int GNENet container. More...
 
void deleteAdditional (GNEAdditional *additional)
 delete additional element of GNENet container More...
 
void updateAdditionalID (GNEAttributeCarrier *AC, const std::string &newID)
 update additional ID in container More...
 
Insertion and erasing of GNEShapes items
bool shapeExist (const GNEShape *shape) const
 return true if given shape exist More...
 
void insertShape (GNEShape *shape)
 Insert a shape element int GNENet container. More...
 
void deleteShape (GNEShape *shape)
 delete shape element of GNENet container More...
 
void updateShapeID (GNEAttributeCarrier *AC, const std::string &newID)
 update shape ID in container More...
 
Insertion and erasing of GNETAZElements items
bool TAZElementExist (const GNETAZElement *TAZElement) const
 return true if given TAZElement exist More...
 
void insertTAZElement (GNETAZElement *TAZElement)
 Insert a TAZElement element int GNENet container. More...
 
void deleteTAZElement (GNETAZElement *TAZElement)
 delete TAZElement element of GNENet container More...
 
void updateTAZElementID (GNEAttributeCarrier *AC, const std::string &newID)
 update TAZElement ID in container More...
 
Insertion and erasing of GNEDemandElements items
bool demandElementExist (const GNEDemandElement *demandElement) const
 return true if given demand element exist More...
 
void insertDemandElement (GNEDemandElement *demandElement)
 Insert a demand element element int GNENet container. More...
 
void deleteDemandElement (GNEDemandElement *demandElement)
 delete demand element element of GNENet container More...
 
void updateDemandElementID (GNEAttributeCarrier *AC, const std::string &newID)
 update demand element ID in container More...
 
Insertion and erasing of GNEDataSets items
bool dataSetExist (const GNEDataSet *dataSet) const
 return true if given demand element exist More...
 
void insertDataSet (GNEDataSet *dataSet)
 Insert a demand element element int GNENet container. More...
 
void deleteDataSet (GNEDataSet *dataSet)
 delete demand element element of GNENet container More...
 
void updateDataSetID (GNEAttributeCarrier *AC, const std::string &newID)
 update data element ID in container More...
 

Private Types

typedef NamedObjectCont< PointOfInterest * > POIs
 
typedef NamedObjectCont< SUMOPolygon * > Polygons
 containers More...
 

Private Member Functions

virtual bool add (PointOfInterest *poi, bool ignorePruning=false)
 add poi More...
 
virtual bool add (SUMOPolygon *poly, bool ignorePruning=false)
 add polygon More...
 
virtual PolygonDynamicsaddPolygonDynamics (double simtime, std::string polyID, SUMOTrafficObject *trackedObject, const std::vector< double > &timeSpan, const std::vector< double > &alphaSpan, bool looped, bool rotate)
 Adds dynamics (animation / tracking) to the given polygon. More...
 
virtual void addPolygonUpdateCommand (std::string polyID, ParametrisedWrappingCommand< ShapeContainer, PolygonDynamics * > *cmd)
 Register update command (for descheduling at removal) More...
 
 AttributeCarriers (const AttributeCarriers &)=delete
 Invalidated copy constructor. More...
 
virtual void cleanupPolygonDynamics (const std::string &id)
 Unschedules the removal and update commands of the given polygon. More...
 
const POIsgetPOIs () const
 Returns all pois. More...
 
const PolygonsgetPolygons () const
 Returns all polygons. More...
 
virtual void movePOI (const std::string &id, const Position &pos)
 Assigns a new position to the named PoI. More...
 
AttributeCarriersoperator= (const AttributeCarriers &)=delete
 Invalidated assignment operator. More...
 
virtual SUMOTime polygonDynamicsUpdate (SUMOTime t, PolygonDynamics *pd)
 Regular update event for updating polygon dynamics. More...
 
virtual void registerHighlight (const std::string &objectID, const int type, const std::string &polygonID)
 register highlight of the specified type if the given id More...
 
virtual bool removePOI (const std::string &id)
 Removes a PoI from the container. More...
 
virtual bool removePolygon (const std::string &id, bool useLock=true)
 Removes a polygon from the container. More...
 
virtual bool removePolygonDynamics (const std::string &polyID)
 Remove dynamics (animation / tracking) for the given polygon. More...
 
virtual void removeTrackers (std::string objectID)
 Remove all tracking polygons for the given object. More...
 
virtual void reshapePolygon (const std::string &id, const PositionVector &shape)
 Assigns a shape to the named polygon. More...
 
Management of highlights. For each type, only one highlight can be active,

Remove any previously added highlight polygon of the specified type

See also
myHighlightPolygons, myHighlightedObjects
Parameters
[out]toRemovewill hold the id of any polygon that was highlighting the given object
virtual void clearHighlight (const std::string &objectID, const int type, std::string &toRemove)
 
virtual void clearHighlights (const std::string &objectID, SUMOPolygon *p)
 Clears all highlight information from the maps when the object leaves the net (Highlight polygons and dynamics are removed via removeTrackers()) More...
 

Private Attributes

std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > myAdditionals
 map with the ID and pointer to additional elements of net More...
 
bool myAllowUndoShapes
 flag used to indicate if created shape can be undo More...
 
std::map< std::string, GNEDataSet * > myDataSets
 map with the ID and pointer to data sets of net More...
 
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > myDemandElements
 map with the ID and pointer to demand elements of net More...
 
std::map< std::string, GNEEdge * > myEdges
 map with the ID and pointer to edges of net More...
 
std::map< std::string, GNEEdgeType * > myEdgeTypes
 map with the ID and pointer to edgeTypes of net More...
 
std::map< std::string, std::string > myHighlightedObjects
 inverse map to myHighlightPolygons saves the highlighted object for each polygon More...
 
std::map< std::string, std::map< int, std::string > > myHighlightPolygons
 maps objects to a map of highlight types to highlighting polygons More...
 
std::map< std::string, GNEJunction * > myJunctions
 map with the ID and pointer to junctions of net More...
 
GNENetmyNet
 pointer to net More...
 
POIs myPOIs
 stored POIs More...
 
std::map< std::string, PolygonDynamics * > myPolygonDynamics
 stored PolygonDynamics More...
 
Polygons myPolygons
 stored Polygons More...
 
std::map< const std::string, ParametrisedWrappingCommand< ShapeContainer, PolygonDynamics * > * > myPolygonUpdateCommands
 Command pointers for scheduled polygon update. Maps PolyID->Command. More...
 
std::map< SumoXMLTag, std::map< std::string, GNEShape * > > myShapes
 map with the ID and pointer to shape elements of net More...
 
std::map< SumoXMLTag, std::map< std::string, GNETAZElement * > > myTAZElements
 map with the ID and pointer to TAZElement elements of net More...
 
std::map< const std::string, std::set< const SUMOPolygon * > > myTrackingPolygons
 Information about tracked objects. More...
 

Friends

class GNEAdditionalHandler
 declare friend class More...
 
class GNEChange_Additional
 
class GNEChange_DataInterval
 
class GNEChange_DataSet
 
class GNEChange_DemandElement
 
class GNEChange_Edge
 
class GNEChange_EdgeType
 
class GNEChange_GenericData
 
class GNEChange_Junction
 
class GNEChange_LaneType
 
class GNEChange_Shape
 
class GNEChange_TAZElement
 
class GNERouteHandler
 

Detailed Description

struct used for saving all attribute carriers of net, in different formats

Definition at line 74 of file GNENetHelper.h.

Member Typedef Documentation

◆ POIs

Definition at line 52 of file ShapeContainer.h.

◆ Polygons

containers

Definition at line 51 of file ShapeContainer.h.

Constructor & Destructor Documentation

◆ AttributeCarriers() [1/2]

GNENetHelper::AttributeCarriers::AttributeCarriers ( GNENet net)

◆ ~AttributeCarriers()

GNENetHelper::AttributeCarriers::~AttributeCarriers ( )

destructor

Definition at line 76 of file GNENetHelper.cpp.

References WRITE_DEBUG.

◆ AttributeCarriers() [2/2]

GNENetHelper::AttributeCarriers::AttributeCarriers ( const AttributeCarriers )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ add() [1/2]

bool ShapeContainer::add ( PointOfInterest poi,
bool  ignorePruning = false 
)
protectedvirtualinherited

add poi

Reimplemented in PCPolyContainer.

Definition at line 196 of file ShapeContainer.cpp.

References NamedObjectCont< T >::add(), Named::getID(), and ShapeContainer::myPOIs.

◆ add() [2/2]

bool ShapeContainer::add ( SUMOPolygon poly,
bool  ignorePruning = false 
)
protectedvirtualinherited

add polygon

Reimplemented in PCPolyContainer.

Definition at line 186 of file ShapeContainer.cpp.

References NamedObjectCont< T >::add(), Named::getID(), and ShapeContainer::myPolygons.

Referenced by PCPolyContainer::add(), ShapeContainer::addPOI(), and ShapeContainer::addPolygon().

Here is the caller graph for this function:

◆ addDefaultVTypes()

void GNENetHelper::AttributeCarriers::addDefaultVTypes ( )

◆ additionalExist()

bool GNENetHelper::AttributeCarriers::additionalExist ( const GNEAdditional additional) const
protected

return true if given additional exist

Definition at line 629 of file GNENetHelper.cpp.

References GNEAdditional::getID(), GNETagProperties::getTag(), and GNEAttributeCarrier::getTagProperty().

Referenced by GNEChange_Additional::~GNEChange_Additional().

Here is the caller graph for this function:

◆ addPOI()

bool GNENetHelper::AttributeCarriers::addPOI ( const std::string &  id,
const std::string &  type,
const RGBColor color,
const Position pos,
bool  geo,
const std::string &  lane,
double  posOverLane,
double  posLat,
double  layer,
double  angle,
const std::string &  imgFile,
bool  relativePath,
double  width,
double  height,
bool  ignorePruning = false 
)
virtual

Builds a POI using the given values and adds it to the container.

Parameters
[in]idThe name of the POI
[in]typeThe (abstract) type of the POI
[in]colorThe color of the POI
[in]posThe position of the POI
[in[geo use GEO coordinates (lon/lat)
[in]laneThe Lane in which this POI is placed
[in]posOverLaneThe position over Lane
[in]posLatThe position lateral over Lane
[in]layerThe layer of the POI
[in]angleThe rotation of the POI
[in]imgFileThe raster image of the POI
[in]relativePathset image file as relative path
[in]widthThe width of the POI image
[in]heightThe height of the POI image
Returns
whether the poi could be added

Reimplemented from ShapeContainer.

Definition at line 276 of file GNENetHelper.cpp.

References GNEHierarchicalElement::addChildElement(), GNEAttributeCarrier::getTagStr(), GNEReferenceCounter::incRef(), SUMO_TAG_POI, and WRITE_ERROR.

Referenced by GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEViewNet::onCmdTransformPOI(), and GNEAdditionalHandler::parseAndBuildPOI().

Here is the caller graph for this function:

◆ addPolygon()

bool GNENetHelper::AttributeCarriers::addPolygon ( const std::string &  id,
const std::string &  type,
const RGBColor color,
double  layer,
double  angle,
const std::string &  imgFile,
bool  relativePath,
const PositionVector shape,
bool  geo,
bool  fill,
double  lineWidth,
bool  ignorePruning = false 
)
virtual

Builds a polygon using the given values and adds it to the container.

Parameters
[in]idThe name of the polygon
[in]typeThe (abstract) type of the polygon
[in]colorThe color of the polygon
[in]layerThe layer of the polygon
[in]angleThe rotation of the polygon
[in]imgFileThe raster image of the polygon
[in]relativePathset image file as relative path
[in]shapeThe shape of the polygon
[in]geospecify if shape was loaded as GEO coordinate
[in]fillWhether the polygon shall be filled
[in]lineWidthThe widht for drawing unfiled polygon
Returns
whether the polygon could be added

Reimplemented from ShapeContainer.

Definition at line 253 of file GNENetHelper.cpp.

References GNEReferenceCounter::incRef(), SUMO_TAG_POLY, and toString().

Referenced by GNEPolygonFrame::addPolygon(), and GNEAdditionalHandler::parseAndBuildPoly().

Here is the caller graph for this function:

◆ addPolygonDynamics()

PolygonDynamics * ShapeContainer::addPolygonDynamics ( double  simtime,
std::string  polyID,
SUMOTrafficObject trackedObject,
const std::vector< double > &  timeSpan,
const std::vector< double > &  alphaSpan,
bool  looped,
bool  rotate 
)
virtualinherited

Adds dynamics (animation / tracking) to the given polygon.

Parameters
polyIDID of the polygon which should become dynamic
Returns
true if the operation was successful, false if not.
See also
PolygonDynamics()

Reimplemented in GUIShapeContainer.

Definition at line 72 of file ShapeContainer.cpp.

References NamedObjectCont< T >::get(), PolygonDynamics::getTrackedObjectID(), ShapeContainer::myPolygonDynamics, ShapeContainer::myPolygons, ShapeContainer::myTrackingPolygons, and ShapeContainer::removePolygonDynamics().

Referenced by libsumo::Polygon::addDynamics(), and GUIShapeContainer::addPolygonDynamics().

Here is the caller graph for this function:

◆ addPolygonUpdateCommand()

void ShapeContainer::addPolygonUpdateCommand ( std::string  polyID,
ParametrisedWrappingCommand< ShapeContainer, PolygonDynamics * > *  cmd 
)
virtualinherited

Register update command (for descheduling at removal)

Definition at line 279 of file ShapeContainer.cpp.

References ShapeContainer::myPolygonUpdateCommands.

Referenced by libsumo::Polygon::addDynamics().

Here is the caller graph for this function:

◆ cleanupPolygonDynamics()

void ShapeContainer::cleanupPolygonDynamics ( const std::string &  id)
protectedvirtualinherited

Unschedules the removal and update commands of the given polygon.

Parameters
[in]idThe id of the polygon

Definition at line 206 of file ShapeContainer.cpp.

References ShapeContainer::myPolygonUpdateCommands.

Referenced by ShapeContainer::removePolygonDynamics().

Here is the caller graph for this function:

◆ clearAdditionals()

void GNENetHelper::AttributeCarriers::clearAdditionals ( )

clear additionals

Definition at line 328 of file GNENetHelper.cpp.

Referenced by GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ clearDataSets()

void GNENetHelper::AttributeCarriers::clearDataSets ( )

clear demand elements

Definition at line 431 of file GNENetHelper.cpp.

◆ clearDemandElements()

void GNENetHelper::AttributeCarriers::clearDemandElements ( )

clear demand elements

Definition at line 391 of file GNENetHelper.cpp.

Referenced by GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ clearEdges()

void GNENetHelper::AttributeCarriers::clearEdges ( )

clear edges

Definition at line 247 of file GNENetHelper.cpp.

Referenced by GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ clearEdgeTypes()

void GNENetHelper::AttributeCarriers::clearEdgeTypes ( )

clear edgeTypes

Definition at line 219 of file GNENetHelper.cpp.

◆ clearHighlight()

void ShapeContainer::clearHighlight ( const std::string &  objectID,
const int  type,
std::string &  toRemove 
)
protectedvirtualinherited

Definition at line 244 of file ShapeContainer.cpp.

References ShapeContainer::myHighlightedObjects, and ShapeContainer::myHighlightPolygons.

Referenced by ShapeContainer::registerHighlight().

Here is the caller graph for this function:

◆ clearHighlights()

void ShapeContainer::clearHighlights ( const std::string &  objectID,
SUMOPolygon p 
)
protectedvirtualinherited

Clears all highlight information from the maps when the object leaves the net (Highlight polygons and dynamics are removed via removeTrackers())

Definition at line 260 of file ShapeContainer.cpp.

References Named::getID(), and ShapeContainer::myHighlightPolygons.

Referenced by ShapeContainer::removePolygonDynamics().

Here is the caller graph for this function:

◆ clearJunctions()

void GNENetHelper::AttributeCarriers::clearJunctions ( )

clear junctions

Definition at line 198 of file GNENetHelper.cpp.

Referenced by GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ clearShapes()

void GNENetHelper::AttributeCarriers::clearShapes ( )

clear shapes

Definition at line 349 of file GNENetHelper.cpp.

Referenced by GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ clearTAZElements()

void GNENetHelper::AttributeCarriers::clearTAZElements ( )

clear TAZElements

Definition at line 370 of file GNENetHelper.cpp.

Referenced by GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ dataSetExist()

bool GNENetHelper::AttributeCarriers::dataSetExist ( const GNEDataSet dataSet) const
protected

return true if given demand element exist

Definition at line 959 of file GNENetHelper.cpp.

Referenced by GNEChange_DataInterval::~GNEChange_DataInterval(), GNEChange_DataSet::~GNEChange_DataSet(), and GNEChange_GenericData::~GNEChange_GenericData().

Here is the caller graph for this function:

◆ deleteAdditional()

void GNENetHelper::AttributeCarriers::deleteAdditional ( GNEAdditional additional)
protected

delete additional element of GNENet container

Exceptions
processErrorif additional wasn't previously inserted

Definition at line 666 of file GNENetHelper.cpp.

References GNEAdditional::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), GNETagProperties::isPlacedInRTree(), and GNETagProperties::isSlave().

Referenced by GNEChange_Additional::redo(), GNEChange_Additional::undo(), and GNEChange_Additional::~GNEChange_Additional().

Here is the caller graph for this function:

◆ deleteDataSet()

void GNENetHelper::AttributeCarriers::deleteDataSet ( GNEDataSet dataSet)
protected

delete demand element element of GNENet container

Exceptions
processErrorif demand element wasn't previously inserted

Definition at line 991 of file GNENetHelper.cpp.

References GNEDataSet::getID().

Referenced by GNEChange_DataSet::redo(), GNEChange_DataSet::undo(), and GNEChange_DataSet::~GNEChange_DataSet().

Here is the caller graph for this function:

◆ deleteDemandElement()

void GNENetHelper::AttributeCarriers::deleteDemandElement ( GNEDemandElement demandElement)
protected

delete demand element element of GNENet container

Exceptions
processErrorif demand element wasn't previously inserted

Definition at line 900 of file GNENetHelper.cpp.

References GNEDemandElement::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), and GNETagProperties::isSlave().

Referenced by GNEChange_DemandElement::redo(), GNEChange_DemandElement::undo(), and GNEChange_DemandElement::~GNEChange_DemandElement().

Here is the caller graph for this function:

◆ deleteEdgeType()

void GNENetHelper::AttributeCarriers::deleteEdgeType ( GNEEdgeType edgeType)
protected

deletes edgeType

Definition at line 531 of file GNENetHelper.cpp.

References GUIGlObject::getMicrosimID().

Referenced by GNEChange_EdgeType::redo(), GNEChange_EdgeType::undo(), and GNEChange_EdgeType::~GNEChange_EdgeType().

Here is the caller graph for this function:

◆ deleteShape()

void GNENetHelper::AttributeCarriers::deleteShape ( GNEShape shape)
protected

delete shape element of GNENet container

Exceptions
processErrorif shape wasn't previously inserted

Definition at line 746 of file GNENetHelper.cpp.

References GNEShape::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), SUMO_TAG_POI, and SUMO_TAG_POILANE.

Referenced by GNEChange_Shape::redo(), GNEChange_Shape::undo(), and GNEChange_Shape::~GNEChange_Shape().

Here is the caller graph for this function:

◆ deleteSingleEdge()

void GNENetHelper::AttributeCarriers::deleteSingleEdge ( GNEEdge edge)
protected

deletes a single edge

Definition at line 584 of file GNENetHelper.cpp.

References GNEReferenceCounter::decRef(), GUIGlObject::getMicrosimID(), GNEEdge::getNBEdge(), GNEHierarchicalElement::getParentJunctions(), and GNEEdge::setResponsible().

Referenced by GNEChange_Edge::redo(), and GNEChange_Edge::undo().

Here is the caller graph for this function:

◆ deleteSingleJunction()

void GNENetHelper::AttributeCarriers::deleteSingleJunction ( GNEJunction junction)
protected

deletes a single junction

Definition at line 475 of file GNENetHelper.cpp.

References GNEReferenceCounter::decRef(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), and GNEJunction::setResponsible().

Referenced by GNEChange_Junction::redo(), and GNEChange_Junction::undo().

Here is the caller graph for this function:

◆ deleteTAZElement()

void GNENetHelper::AttributeCarriers::deleteTAZElement ( GNETAZElement TAZElement)
protected

delete TAZElement element of GNENet container

Exceptions
processErrorif TAZElement wasn't previously inserted

Definition at line 823 of file GNENetHelper.cpp.

References GNETAZElement::getID(), GNETagProperties::getTag(), and GNEAttributeCarrier::getTagProperty().

Referenced by GNEChange_TAZElement::redo(), GNEChange_TAZElement::undo(), and GNEChange_TAZElement::~GNEChange_TAZElement().

Here is the caller graph for this function:

◆ demandElementExist()

bool GNENetHelper::AttributeCarriers::demandElementExist ( const GNEDemandElement demandElement) const
protected

return true if given demand element exist

Definition at line 864 of file GNENetHelper.cpp.

References GNEDemandElement::getID(), GNETagProperties::getTag(), and GNEAttributeCarrier::getTagProperty().

Referenced by GNEChange_DemandElement::~GNEChange_DemandElement().

Here is the caller graph for this function:

◆ edgeTypeExist()

bool GNENetHelper::AttributeCarriers::edgeTypeExist ( const GNEEdgeType edgeType) const
protected

Definition at line 514 of file GNENetHelper.cpp.

References GNENetworkElement::getID().

Referenced by GNEChange_EdgeType::~GNEChange_EdgeType().

Here is the caller graph for this function:

◆ getAdditionals()

◆ getDataSets()

◆ getDemandElements()

◆ getEdges()

◆ getEdgeTypes()

const std::map< std::string, GNEEdgeType * > & GNENetHelper::AttributeCarriers::getEdgeTypes ( ) const

map with the ID and pointer to edgeTypes of net

Definition at line 214 of file GNENetHelper.cpp.

Referenced by GNENet::generateEdgeTypeID(), GNENet::retrieveEdgeType(), GNENet::save(), and GNENet::saveEdgeTypes().

Here is the caller graph for this function:

◆ getJunctions()

◆ getPOIs()

const POIs& ShapeContainer::getPOIs ( ) const
inlineinherited

Returns all pois.

Definition at line 152 of file ShapeContainer.h.

References ShapeContainer::myPOIs.

Referenced by libsumo::POI::add(), ShapeHandler::addPOI(), libsumo::POI::getPoI(), GUIShapeContainer::getPOIIds(), libsumo::POI::getTree(), and libsumo::POI::remove().

Here is the caller graph for this function:

◆ getPolygons()

◆ getShapes()

◆ getTAZElements()

const std::map< SumoXMLTag, std::map< std::string, GNETAZElement * > > & GNENetHelper::AttributeCarriers::getTAZElements ( ) const

◆ insertAdditional()

◆ insertDataSet()

void GNENetHelper::AttributeCarriers::insertDataSet ( GNEDataSet dataSet)
protected

Insert a demand element element int GNENet container.

Exceptions
processErrorif route was already inserted

Definition at line 975 of file GNENetHelper.cpp.

References GNEDataSet::getID(), and GNEAttributeCarrier::getTagStr().

Referenced by GNEChange_DataSet::redo(), and GNEChange_DataSet::undo().

Here is the caller graph for this function:

◆ insertDemandElement()

◆ insertEdge()

void GNENetHelper::AttributeCarriers::insertEdge ( GNEEdge edge)
protected

Definition at line 573 of file GNENetHelper.cpp.

References NBNode::addIncomingEdge(), NBNode::addOutgoingEdge(), NBEdge::getFromNode(), GNEEdge::getNBEdge(), and NBEdge::getToNode().

Referenced by GNEChange_Edge::redo(), and GNEChange_Edge::undo().

Here is the caller graph for this function:

◆ insertEdgeType()

void GNENetHelper::AttributeCarriers::insertEdgeType ( GNEEdgeType edgeType)
protected

inserts a single edgeType into the net and into the underlying netbuild-container

Definition at line 520 of file GNENetHelper.cpp.

References GUIGlObject::getMicrosimID().

Referenced by GNEChange_EdgeType::redo(), and GNEChange_EdgeType::undo().

Here is the caller graph for this function:

◆ insertJunction()

void GNENetHelper::AttributeCarriers::insertJunction ( GNEJunction junction)
protected

Definition at line 468 of file GNENetHelper.cpp.

References GNEJunction::getNBNode().

Referenced by GNEChange_Junction::redo(), and GNEChange_Junction::undo().

Here is the caller graph for this function:

◆ insertShape()

void GNENetHelper::AttributeCarriers::insertShape ( GNEShape shape)
protected

Insert a shape element int GNENet container.

Exceptions
processErrorif route was already inserted

Definition at line 725 of file GNENetHelper.cpp.

References GNEShape::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), GNEAttributeCarrier::getTagStr(), SUMO_TAG_POI, SUMO_TAG_POILANE, and GNEShape::updateGeometry().

Referenced by GNEChange_Shape::redo(), and GNEChange_Shape::undo().

Here is the caller graph for this function:

◆ insertTAZElement()

void GNENetHelper::AttributeCarriers::insertTAZElement ( GNETAZElement TAZElement)
protected

Insert a TAZElement element int GNENet container.

Exceptions
processErrorif route was already inserted

Definition at line 804 of file GNENetHelper.cpp.

References GNETAZElement::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), GNEAttributeCarrier::getTagStr(), and GNETAZElement::updateGeometry().

Referenced by GNEAdditionalHandler::buildTAZ(), GNEAdditionalHandler::buildTAZSink(), GNEAdditionalHandler::buildTAZSource(), GNEChange_TAZElement::redo(), and GNEChange_TAZElement::undo().

Here is the caller graph for this function:

◆ movePOI()

void ShapeContainer::movePOI ( const std::string &  id,
const Position pos 
)
virtualinherited

Assigns a new position to the named PoI.

Parameters
[in]idThe id of the PoI to move
[in]posThe PoI's new position

Reimplemented in GUIShapeContainer.

Definition at line 168 of file ShapeContainer.cpp.

References NamedObjectCont< T >::get(), and ShapeContainer::myPOIs.

Referenced by libsumo::POI::setPosition().

Here is the caller graph for this function:

◆ operator=()

AttributeCarriers& GNENetHelper::AttributeCarriers::operator= ( const AttributeCarriers )
privatedelete

Invalidated assignment operator.

◆ polygonDynamicsUpdate()

SUMOTime ShapeContainer::polygonDynamicsUpdate ( SUMOTime  t,
PolygonDynamics pd 
)
virtualinherited

Regular update event for updating polygon dynamics.

Parameters
[in]tThe time at which the update is called
[in]pdThe dynamics to be updated
Returns
zero If dynamics has expired, next update time otherwise

Reimplemented in GUIShapeContainer.

Definition at line 216 of file ShapeContainer.cpp.

References PolygonDynamics::getPolygonID(), ShapeContainer::myPolygonUpdateCommands, ShapeContainer::removePolygon(), and PolygonDynamics::update().

Referenced by libsumo::Polygon::addDynamics(), and GUIShapeContainer::polygonDynamicsUpdate().

Here is the caller graph for this function:

◆ registerEdge()

GNEEdge * GNENetHelper::AttributeCarriers::registerEdge ( GNEEdge edge)

◆ registerEdgeType()

GNEEdgeType * GNENetHelper::AttributeCarriers::registerEdgeType ( GNEEdgeType edgeType)

Definition at line 204 of file GNENetHelper.cpp.

References GUIGlObject::getMicrosimID(), and GNEReferenceCounter::incRef().

Referenced by GNENet::initJunctionsAndEdges().

Here is the caller graph for this function:

◆ registerHighlight()

void ShapeContainer::registerHighlight ( const std::string &  objectID,
const int  type,
const std::string &  polygonID 
)
virtualinherited

register highlight of the specified type if the given id

Definition at line 228 of file ShapeContainer.cpp.

References ShapeContainer::clearHighlight(), ShapeContainer::myHighlightedObjects, ShapeContainer::myHighlightPolygons, and ShapeContainer::removePolygon().

Referenced by libsumo::Polygon::addHighlightPolygon().

Here is the caller graph for this function:

◆ registerJunction()

GNEJunction * GNENetHelper::AttributeCarriers::registerJunction ( GNEJunction junction)

◆ remapJunctionAndEdgeIds()

void GNENetHelper::AttributeCarriers::remapJunctionAndEdgeIds ( )

remap junction and edge IDs

Definition at line 156 of file GNENetHelper.cpp.

Referenced by GNENet::computeAndUpdate().

Here is the caller graph for this function:

◆ removePOI()

bool ShapeContainer::removePOI ( const std::string &  id)
virtualinherited

Removes a PoI from the container.

Parameters
[in]idThe id of the PoI
Returns
Whether the poi could be removed

Reimplemented in GUIShapeContainer.

Definition at line 162 of file ShapeContainer.cpp.

References ShapeContainer::myPOIs, and NamedObjectCont< T >::remove().

Referenced by libsumo::POI::remove().

Here is the caller graph for this function:

◆ removePolygon()

bool ShapeContainer::removePolygon ( const std::string &  id,
bool  useLock = true 
)
virtualinherited

Removes a polygon from the container.

Parameters
[in]idThe id of the polygon
Returns
Whether the polygon could be removed

Reimplemented in GUIShapeContainer.

Definition at line 152 of file ShapeContainer.cpp.

References ShapeContainer::myPolygons, NamedObjectCont< T >::remove(), and ShapeContainer::removePolygonDynamics().

Referenced by ShapeContainer::polygonDynamicsUpdate(), ShapeContainer::registerHighlight(), libsumo::Polygon::remove(), GUIShapeContainer::removePolygon(), and ShapeContainer::removeTrackers().

Here is the caller graph for this function:

◆ removePolygonDynamics()

bool ShapeContainer::removePolygonDynamics ( const std::string &  polyID)
virtualinherited

Remove dynamics (animation / tracking) for the given polygon.

Parameters
polyIDID of the polygon for which dynamics shall be removed
Returns
true if the operation was successful (dynamics existed for the polygon), false if not.

Definition at line 112 of file ShapeContainer.cpp.

References ShapeContainer::cleanupPolygonDynamics(), ShapeContainer::clearHighlights(), NamedObjectCont< T >::get(), ShapeContainer::myPolygonDynamics, ShapeContainer::myPolygons, and ShapeContainer::myTrackingPolygons.

Referenced by ShapeContainer::addPolygonDynamics(), and ShapeContainer::removePolygon().

Here is the caller graph for this function:

◆ removeTrackers()

void ShapeContainer::removeTrackers ( std::string  objectID)
virtualinherited

Remove all tracking polygons for the given object.

Definition at line 285 of file ShapeContainer.cpp.

References ShapeContainer::myTrackingPolygons, and ShapeContainer::removePolygon().

Referenced by MSDynamicShapeUpdater::vehicleStateChanged().

Here is the caller graph for this function:

◆ reshapePolygon()

void ShapeContainer::reshapePolygon ( const std::string &  id,
const PositionVector shape 
)
virtualinherited

Assigns a shape to the named polygon.

Parameters
[in]idThe id of the polygon to reshape
[in]shapeThe polygon's new shape

Reimplemented in GUIShapeContainer.

Definition at line 177 of file ShapeContainer.cpp.

References NamedObjectCont< T >::get(), ShapeContainer::myPolygons, and SUMOPolygon::setShape().

Referenced by libsumo::Polygon::setShape().

Here is the caller graph for this function:

◆ retrieveGenericDatas()

std::vector< GNEGenericData * > GNENetHelper::AttributeCarriers::retrieveGenericDatas ( const SumoXMLTag  genericDataTag,
const double  begin,
const double  end 
)

Definition at line 446 of file GNENetHelper.cpp.

References SUMO_ATTR_BEGIN, and SUMO_ATTR_END.

◆ shapeExist()

bool GNENetHelper::AttributeCarriers::shapeExist ( const GNEShape shape) const
protected

return true if given shape exist

Definition at line 712 of file GNENetHelper.cpp.

References GNEShape::getID(), GNETagProperties::getTag(), GNEAttributeCarrier::getTagProperty(), SUMO_TAG_POI, and SUMO_TAG_POILANE.

◆ TAZElementExist()

bool GNENetHelper::AttributeCarriers::TAZElementExist ( const GNETAZElement TAZElement) const
protected

return true if given TAZElement exist

Definition at line 792 of file GNENetHelper.cpp.

References GNETAZElement::getID(), GNETagProperties::getTag(), and GNEAttributeCarrier::getTagProperty().

◆ updateAdditionalID()

void GNENetHelper::AttributeCarriers::updateAdditionalID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

◆ updateDataSetID()

void GNENetHelper::AttributeCarriers::updateDataSetID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

update data element ID in container

Definition at line 1010 of file GNENetHelper.cpp.

References GNEDataSet::getID(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), and GNEDataSet::setDataSetID().

◆ updateDemandElementID()

void GNENetHelper::AttributeCarriers::updateDemandElementID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

◆ updateEdgeID()

void GNENetHelper::AttributeCarriers::updateEdgeID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

◆ updateEdgeTypeID()

void GNENetHelper::AttributeCarriers::updateEdgeTypeID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

◆ updateID()

void GNENetHelper::AttributeCarriers::updateID ( GNEAttributeCarrier AC,
const std::string  newID 
)

◆ updateJunctionID()

void GNENetHelper::AttributeCarriers::updateJunctionID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

◆ updateShapeID()

void GNENetHelper::AttributeCarriers::updateShapeID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

◆ updateTAZElementID()

void GNENetHelper::AttributeCarriers::updateTAZElementID ( GNEAttributeCarrier AC,
const std::string &  newID 
)
protected

Friends And Related Function Documentation

◆ GNEAdditionalHandler

friend class GNEAdditionalHandler
friend

declare friend class

Definition at line 77 of file GNENetHelper.h.

◆ GNEChange_Additional

friend class GNEChange_Additional
friend

Definition at line 83 of file GNENetHelper.h.

◆ GNEChange_DataInterval

friend class GNEChange_DataInterval
friend

Definition at line 88 of file GNENetHelper.h.

◆ GNEChange_DataSet

friend class GNEChange_DataSet
friend

Definition at line 87 of file GNENetHelper.h.

◆ GNEChange_DemandElement

friend class GNEChange_DemandElement
friend

Definition at line 86 of file GNENetHelper.h.

◆ GNEChange_Edge

friend class GNEChange_Edge
friend

Definition at line 82 of file GNENetHelper.h.

◆ GNEChange_EdgeType

friend class GNEChange_EdgeType
friend

Definition at line 80 of file GNENetHelper.h.

◆ GNEChange_GenericData

friend class GNEChange_GenericData
friend

Definition at line 89 of file GNENetHelper.h.

◆ GNEChange_Junction

friend class GNEChange_Junction
friend

Definition at line 79 of file GNENetHelper.h.

◆ GNEChange_LaneType

friend class GNEChange_LaneType
friend

Definition at line 81 of file GNENetHelper.h.

◆ GNEChange_Shape

friend class GNEChange_Shape
friend

Definition at line 84 of file GNENetHelper.h.

◆ GNEChange_TAZElement

friend class GNEChange_TAZElement
friend

Definition at line 85 of file GNENetHelper.h.

◆ GNERouteHandler

friend class GNERouteHandler
friend

Definition at line 78 of file GNENetHelper.h.

Field Documentation

◆ myAdditionals

std::map<SumoXMLTag, std::map<std::string, GNEAdditional*> > GNENetHelper::AttributeCarriers::myAdditionals
private

map with the ID and pointer to additional elements of net

Definition at line 403 of file GNENetHelper.h.

Referenced by AttributeCarriers().

◆ myAllowUndoShapes

bool GNENetHelper::AttributeCarriers::myAllowUndoShapes
private

flag used to indicate if created shape can be undo

Definition at line 421 of file GNENetHelper.h.

◆ myDataSets

std::map<std::string, GNEDataSet*> GNENetHelper::AttributeCarriers::myDataSets
private

map with the ID and pointer to data sets of net

Definition at line 415 of file GNENetHelper.h.

◆ myDemandElements

std::map<SumoXMLTag, std::map<std::string, GNEDemandElement*> > GNENetHelper::AttributeCarriers::myDemandElements
private

map with the ID and pointer to demand elements of net

Definition at line 412 of file GNENetHelper.h.

Referenced by AttributeCarriers().

◆ myEdges

std::map<std::string, GNEEdge*> GNENetHelper::AttributeCarriers::myEdges
private

map with the ID and pointer to edges of net

Definition at line 400 of file GNENetHelper.h.

◆ myEdgeTypes

std::map<std::string, GNEEdgeType*> GNENetHelper::AttributeCarriers::myEdgeTypes
private

map with the ID and pointer to edgeTypes of net

Definition at line 397 of file GNENetHelper.h.

◆ myHighlightedObjects

std::map<std::string, std::string> ShapeContainer::myHighlightedObjects
protectedinherited

inverse map to myHighlightPolygons saves the highlighted object for each polygon

Definition at line 205 of file ShapeContainer.h.

Referenced by ShapeContainer::clearHighlight(), and ShapeContainer::registerHighlight().

◆ myHighlightPolygons

std::map<std::string, std::map<int, std::string> > ShapeContainer::myHighlightPolygons
protectedinherited

maps objects to a map of highlight types to highlighting polygons

Definition at line 203 of file ShapeContainer.h.

Referenced by ShapeContainer::clearHighlight(), ShapeContainer::clearHighlights(), and ShapeContainer::registerHighlight().

◆ myJunctions

std::map<std::string, GNEJunction*> GNENetHelper::AttributeCarriers::myJunctions
private

map with the ID and pointer to junctions of net

Definition at line 394 of file GNENetHelper.h.

◆ myNet

GNENet* GNENetHelper::AttributeCarriers::myNet
private

pointer to net

Definition at line 418 of file GNENetHelper.h.

◆ myPOIs

◆ myPolygonDynamics

std::map<std::string, PolygonDynamics*> ShapeContainer::myPolygonDynamics
protectedinherited

◆ myPolygons

◆ myPolygonUpdateCommands

std::map<const std::string, ParametrisedWrappingCommand<ShapeContainer, PolygonDynamics*>*> ShapeContainer::myPolygonUpdateCommands
privateinherited

◆ myShapes

std::map<SumoXMLTag, std::map<std::string, GNEShape*> > GNENetHelper::AttributeCarriers::myShapes
private

map with the ID and pointer to shape elements of net

Definition at line 406 of file GNENetHelper.h.

Referenced by AttributeCarriers().

◆ myTAZElements

std::map<SumoXMLTag, std::map<std::string, GNETAZElement*> > GNENetHelper::AttributeCarriers::myTAZElements
private

map with the ID and pointer to TAZElement elements of net

Definition at line 409 of file GNENetHelper.h.

Referenced by AttributeCarriers().

◆ myTrackingPolygons

std::map<const std::string, std::set<const SUMOPolygon*> > ShapeContainer::myTrackingPolygons
protectedinherited

Information about tracked objects.

Note
Maps tracked object IDs to set of polygons, which are tracking the object. Needed at object removal to cancel tacking (i.e. remove tracking poly).

Definition at line 210 of file ShapeContainer.h.

Referenced by ShapeContainer::addPolygonDynamics(), ShapeContainer::removePolygonDynamics(), and ShapeContainer::removeTrackers().


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