SUMO - Simulation of Urban MObility
GUIContainer Class Reference

#include <GUIContainer.h>

Inheritance diagram for GUIContainer:
Inheritance graph
Collaboration diagram for GUIContainer:
Collaboration graph

Data Structures

class  GUIContainerPopupMenu
 

Public Types

typedef std::vector< MSTransportable::Stage * > MSTransportablePlan
 the structure holding the plan of a transportable More...
 
enum  StageType { WAITING_FOR_DEPART = 0, WAITING = 1, MOVING_WITHOUT_VEHICLE = 2, DRIVING = 3 }
 

Public Member Functions

void appendStage (Stage *stage)
 Appends the given stage to the current plan. More...
 
void drawName (const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
 draw name of item More...
 
const MSEdgegetArrivalEdge () const
 returns the final arrival edge More...
 
double getArrivalPos () const
 returns the final arrival pos More...
 
MSTransportable::StagegetCurrentStage () const
 Return the current stage. More...
 
std::string getCurrentStageDescription () const
 Returns the current stage description as a string. More...
 
StageType getCurrentStageType () const
 the current stage type of the transportable More...
 
SUMOTime getDesiredDepart () const
 Returns the desired departure time. More...
 
const MSEdgegetDestination () const
 Returns the current destination. More...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
ConstMSEdgeVector getEdges (int next) const
 Return the edges of the nth next stage. More...
 
const MSEdgegetFromEdge () const
 Returns the departure edge. More...
 
const std::string & getID () const
 returns the id of the transportable More...
 
const MSEdgegetNextDestination () const
 Returns the destination after the current destination. More...
 
int getNumRemainingStages () const
 Return the number of remaining stages (including the current) More...
 
int getNumStages () const
 Return the total number stages in this persons plan. More...
 
const SUMOVehicleParametergetParameter () const
 
StageType getStageType (int next) const
 the stage type for the nth next stage More...
 
SUMOVehiclegetVehicle () const
 The vehicle associated with this transportable. More...
 
const MSVehicleTypegetVehicleType () const
 
 GUIContainer (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
 Constructor. More...
 
bool isWaiting4Vehicle () const
 Whether the transportable waits for a vehicle. More...
 
bool isWaitingFor (const std::string &line) const
 Whether the transportable waits for a vehicle of the line specified. More...
 
virtual bool proceed (MSNet *net, SUMOTime time)
 
void removeStage (int next)
 removes the nth next stage More...
 
void replaceVehicleType (MSVehicleType *type)
 replace myVType More...
 
virtual void routeOutput (OutputDevice &os) const
 Called on writing vehroute output. More...
 
void setDeparted (SUMOTime now)
 logs depart time of the current stage More...
 
void setPositionInVehicle (const Position &pos)
 
void setSpeed (double speed)
 sets the walking speed (ignored in other stages) More...
 
virtual void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output. More...
 
 ~GUIContainer ()
 destructor More...
 
inherited from GUIGlObject
GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu. More...
 
GUIParameterTableWindowgetParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own parameter window. More...
 
Boundary getCenteringBoundary () const
 Returns the boundary to which the view shall be centered in order to show the object. More...
 
void drawGL (const GUIVisualizationSettings &s) const
 Draws the object. More...
 
virtual void drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
 Draws additionally triggered visualisations. More...
 
inherited from MSContainer with added locking
double getEdgePos () const
 return the offset from the start of the current edge More...
 
Position getPosition () const
 return the Network coordinate of the container More...
 
double getAngle () const
 return the current angle of the container More...
 
double getWaitingSeconds () const
 the time this container spent waiting in seconds More...
 
double getSpeed () const
 the current speed of the container More...
 
Atomar getter methods

Returns the full name appearing in the tool tip

Returns
This object's typed id
const std::string & getFullName () const
 
virtual const std::string & getParentName () const
 Returns the name of the parent object (if any) More...
 
GUIGlID getGlID () const
 Returns the numerical id of the object. More...
 
interfaces to be implemented by derived classes
virtual GUIParameterTableWindowgetTypeParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own type parameter window (optional) More...
 
virtual const std::string & getMicrosimID () const
 Returns the id of the object as known to microsim. More...
 
virtual void setMicrosimID (const std::string &newID)
 Changes the microsimID of the object. More...
 
GUIGlObjectType getType () const
 Returns the type of the object as coded in GUIGlObjectType. More...
 
Parameter table window I/O

Lets this object know a parameter window showing the object's values was opened

Parameters
[in]wThe opened parameter window
void addParameterTable (GUIParameterTableWindow *w)
 
void removeParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was closed. More...
 

Data Fields

std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
 Enabled visualisations, per view. More...
 

Static Public Attributes

static const GUIGlID INVALID_ID = 0
 
static StringBijection< GUIGlObjectTypeTypeNames
 associates object types with strings More...
 

Protected Member Functions

void setPrefix (const std::string &prefix)
 usually names are prefixed by a type-specific string. this method can be used to change the default More...
 
helper methods for building popup-menus
void buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
 Builds the header. More...
 
void buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to center to the object. More...
 
void buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds entries which allow to copy the name / typed name into the clipboard. More...
 
void buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to (de)select the object. More...
 
void buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the parameter window. More...
 
void buildShowTypeParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the type parameter window. More...
 
void buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position. More...
 
void buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the manipulator window. More...
 

Protected Attributes

const SUMOVehicleParametermyParameter
 the plan of the transportable More...
 
MSTransportablePlanmyPlan
 the plan of the transportable More...
 
MSTransportablePlan::iterator myStep
 the iterator over the route More...
 
const MSVehicleTypemyVType
 This transportable's type. (mainly used for drawing related information Note sure if it is really necessary. More...
 
bool myWriteEvents
 Whether events shall be written. More...
 

Static Protected Attributes

static const double ROADSIDE_OFFSET
 the offset for computing positions when standing at an edge More...
 

Private Member Functions

double getColorValue (int activeScheme) const
 gets the color value according to the current scheme index More...
 
void setColor (const GUIVisualizationSettings &s) const
 sets the color according to the currente settings More...
 
bool setFunctionalColor (int activeScheme) const
 sets the color according to the current scheme index and some vehicle function More...
 
drawing helper methods
void drawAction_drawAsPoly (const GUIVisualizationSettings &s) const
 
void drawAction_drawAsImage (const GUIVisualizationSettings &s) const
 

Private Attributes

MFXMutex myLock
 The mutex used to avoid concurrent updates of the vehicle buffer. More...
 
Position myPositionInVehicle
 The position of a container while riding a vehicle. More...
 

Detailed Description

Definition at line 59 of file GUIContainer.h.

Member Typedef Documentation

◆ MSTransportablePlan

the structure holding the plan of a transportable

Definition at line 377 of file MSTransportable.h.

Member Enumeration Documentation

◆ StageType

Enumerator
WAITING_FOR_DEPART 
WAITING 
MOVING_WITHOUT_VEHICLE 
DRIVING 

Definition at line 62 of file MSTransportable.h.

Constructor & Destructor Documentation

◆ GUIContainer()

GUIContainer::GUIContainer ( const SUMOVehicleParameter pars,
const MSVehicleType vtype,
MSTransportable::MSTransportablePlan plan 
)

Constructor.

Definition at line 107 of file GUIContainer.cpp.

◆ ~GUIContainer()

GUIContainer::~GUIContainer ( )

destructor

Definition at line 113 of file GUIContainer.cpp.

Member Function Documentation

◆ addParameterTable()

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

◆ appendStage()

void MSTransportable::appendStage ( Stage stage)
inherited

Appends the given stage to the current plan.

Definition at line 412 of file MSTransportable.cpp.

References MSTransportable::myPlan, and MSTransportable::myStep.

Referenced by MSTransportable::getVehicle(), TraCIServerAPI_Person::processSet(), and MSTransportable::removeStage().

◆ buildCenterPopupEntry()

◆ buildNameCopyPopupEntry()

◆ buildPopupHeader()

◆ buildPositionCopyEntry()

◆ buildSelectionPopupEntry()

◆ buildShowManipulatorPopupEntry()

void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters

Definition at line 247 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.

Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().

◆ buildShowParamsPopupEntry()

◆ buildShowTypeParamsPopupEntry()

void GUIGlObject::buildShowTypeParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the type parameter window.

Parameters

Definition at line 226 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWTYPEPARS.

Referenced by GUIPerson::getPopUpMenu(), and GUIBaseVehicle::getPopUpMenu().

◆ drawAction_drawAsImage()

◆ drawAction_drawAsPoly()

void GUIContainer::drawAction_drawAsPoly ( const GUIVisualizationSettings s) const
private

◆ drawGL()

◆ drawGLAdditional()

void GUIContainer::drawGLAdditional ( GUISUMOAbstractView *const  parent,
const GUIVisualizationSettings s 
) const
virtual

Draws additionally triggered visualisations.

Parameters
[in]parentThe view
[in]sThe settings for the current view (may influence drawing)

Reimplemented from GUIGlObject.

Definition at line 198 of file GUIContainer.cpp.

References GUIGlObject::getGlID().

◆ drawName()

◆ getAngle()

double GUIContainer::getAngle ( ) const
virtual

return the current angle of the container

Reimplemented from MSTransportable.

Definition at line 339 of file GUIContainer.cpp.

References MSTransportable::getAngle(), and myLock.

Referenced by drawAction_drawAsPoly(), getParameterWindow(), setFunctionalColor(), and setPositionInVehicle().

◆ getArrivalEdge()

const MSEdge* MSTransportable::getArrivalEdge ( ) const
inlineinherited

returns the final arrival edge

Definition at line 520 of file MSTransportable.h.

References MSTransportable::myPlan, and MSTransportable::replaceVehicleType().

Referenced by TraCIServerAPI_Person::processSet().

◆ getArrivalPos()

double MSTransportable::getArrivalPos ( ) const
inlineinherited

returns the final arrival pos

Definition at line 515 of file MSTransportable.h.

References MSTransportable::myPlan.

Referenced by TraCIServerAPI_Person::processSet().

◆ getCenteringBoundary()

Boundary GUIContainer::getCenteringBoundary ( ) const
virtual

Returns the boundary to which the view shall be centered in order to show the object.

Returns
The boundary the object is within
See also
GUIGlObject::getCenteringBoundary

Implements GUIGlObject.

Definition at line 154 of file GUIContainer.cpp.

References Boundary::add(), getPosition(), and Boundary::grow().

◆ getColorValue()

double GUIContainer::getColorValue ( int  activeScheme) const
private

◆ getCurrentStage()

MSTransportable::Stage* MSTransportable::getCurrentStage ( ) const
inlineinherited

◆ getCurrentStageDescription()

std::string MSTransportable::getCurrentStageDescription ( ) const
inlineinherited

Returns the current stage description as a string.

Definition at line 454 of file MSTransportable.h.

Referenced by getParameterWindow(), GUIPerson::getParameterWindow(), and MSXMLRawOut::writeTransportable().

◆ getCurrentStageType()

StageType MSTransportable::getCurrentStageType ( ) const
inlineinherited

◆ getDesiredDepart()

SUMOTime MSTransportable::getDesiredDepart ( ) const
inherited

◆ getDestination()

const MSEdge& MSTransportable::getDestination ( ) const
inlineinherited

◆ getEdge()

const MSEdge* MSTransportable::getEdge ( ) const
inlineinherited

◆ getEdgePos()

double GUIContainer::getEdgePos ( ) const
virtual

return the offset from the start of the current edge

Reimplemented from MSTransportable.

Definition at line 320 of file GUIContainer.cpp.

References MSTransportable::getEdgePos(), and myLock.

Referenced by getParameterWindow(), getPosition(), and setPositionInVehicle().

◆ getEdges()

◆ getFromEdge()

◆ getFullName()

◆ getGlID()

GUIGlID GUIGlObject::getGlID ( ) const
inherited

Returns the numerical id of the object.

Returns
This object's gl-id

Definition at line 121 of file GUIGlObject.cpp.

References GUIGlObject::myGlID.

Referenced by GNENet::addReversedEdge(), GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), GNENet::deleteConnection(), GNENet::deleteCrossing(), GNENet::deleteEdge(), GNENet::deleteJunction(), GNENet::deleteLane(), GNENet::deleteSingleEdge(), GNENet::deleteSingleJunction(), GUIVehicle::drawAction_drawPersonsAndContainers(), GNEDetectorE1::drawGL(), GNEDetectorExit::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorE2::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEInternalLane::drawGL(), GNEJunction::drawGL(), GNECrossing::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GNEVaporizer::drawGL(), drawGL(), GNEVariableSpeedSign::drawGL(), GUIPolygon::drawGL(), GNERouteProbe::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GUIPerson::drawGL(), GNERerouter::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNEDetectorE3::drawGL(), GNELane::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GNEPoly::drawGL(), GUIBusStop::drawGL(), GNEConnection::drawGL(), GUIParkingArea::drawGL(), GUIEdge::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNECalibrator::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), drawGLAdditional(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUILane::drawLinkRule(), GUIBaseVehicle::drawOnPos(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), getColorValue(), GUIPerson::getColorValue(), GNELane::getColorValue(), GNEJunction::getColorValue(), GUILane::getColorValue(), GUIEdge::getIDs(), GNEEdge::getLaneGlIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIPerson::getPopUpMenu(), GNELane::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNECalibrator::GNECalibrator(), GNERouteProbe::GNERouteProbe(), GNEVaporizer::GNEVaporizer(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNESelectorFrame::handleIDs(), GNETLSEditorFrame::handleMultiChange(), GNEAdditional::isAdditionalSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GUIVehicle::isSelected(), GNEViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GNEViewNet::onCmdDuplicateLane(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GNEViewNet::onCmdRevertRestriction(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onLeftBtnPress(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GUIVehicle::selectBlockingFoes(), GNEJunction::setColor(), GUIMessageWindow::setCursorPos(), GUIBaseVehicle::~GUIBaseVehicle(), GUIGlObject::~GUIGlObject(), and GUIPerson::~GUIPerson().

◆ getID()

const std::string & MSTransportable::getID ( ) const
inherited

returns the id of the transportable

Definition at line 361 of file MSTransportable.cpp.

References SUMOVehicleParameter::id, and MSTransportable::myParameter.

Referenced by MSTransportableControl::abortWaiting(), MSVehicle::addContainer(), MSVehicle::addPerson(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSTransportableControl::erase(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), getParameterWindow(), GUIPerson::getParameterWindow(), TraCIServerAPI_Person::getSingularType(), MSPedestrianPushButton::isActiveForEdge(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), MSDevice_Transportable::notifyLeave(), MSPModel_Striping::by_xpos_sorter::operator()(), MSEdge::transportable_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPModel_Striping::PState::PState(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSPerson::routeOutput(), MSContainer::tripInfoOutput(), MSPerson::tripInfoOutput(), MSPModel_Striping::PState::walk(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().

◆ getMicrosimID()

const std::string & GUIGlObject::getMicrosimID ( ) const
virtualinherited

Returns the id of the object as known to microsim.

Definition at line 135 of file GUIGlObject.cpp.

References GUIGlObject::myMicrosimID.

Referenced by GNEAdditional::changeEdge(), GNEAdditional::changeLane(), GNETLSEditorFrame::controlsEdge(), GUIGlObject::createFullName(), GNENet::deleteSingleEdge(), GNENet::deleteSingleJunction(), GUIGlObject::drawName(), GNEAdditional::getAdditionalID(), GNEPOI::getAttribute(), GNECrossing::getAttribute(), GNEConnection::getAttribute(), GNEPoly::getAttribute(), GNEEdge::getAttribute(), GNEJunction::getAttribute(), GNELane::getAttribute(), GNENetElement::getParentName(), GNELane::getParentName(), GNEVaporizer::getParentName(), GNEVariableSpeedSign::getParentName(), GNERouteProbe::getParentName(), GNEStoppingPlace::getParentName(), GNERerouter::getParentName(), GNEDetector::getParentName(), GNEDetectorE3::getParentName(), GNECalibrator::getParentName(), GNEAdditional::getParentName(), GNEAdditional::getPopUpMenu(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNETLSEditorFrame::handleMultiChange(), GNEEdge::isValid(), GNEViewNet::mergeJunctions(), GNEPoly::moveGeometry(), GNEEdge::moveGeometry(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCopyName(), GNEViewNet::onCmdNodeShape(), GNEInspectorFrame::onUpdCopyTemplate(), GNENet::registerEdge(), GNENet::registerJunction(), GNENet::remapEdge(), GNEEdge::removeConnection(), GNENet::replaceJunctionByGeometry(), GNENet::retrieveAttributeCarriers(), GNEAdditional::setAdditionalID(), GNEEdge::setAttribute(), GNENet::splitEdge(), GNEConnectorFrame::updateDescription(), and GNEConnection::updateID().

◆ getNextDestination()

const MSEdge& MSTransportable::getNextDestination ( ) const
inlineinherited

Returns the destination after the current destination.

Definition at line 412 of file MSTransportable.h.

References MSTransportable::myStep.

◆ getNumRemainingStages()

int MSTransportable::getNumRemainingStages ( ) const
inherited

Return the number of remaining stages (including the current)

Definition at line 402 of file MSTransportable.cpp.

References MSTransportable::myPlan, and MSTransportable::myStep.

Referenced by MSTransportable::getEdges(), TraCIServerAPI_Person::processGet(), and TraCIServerAPI_Person::processSet().

◆ getNumStages()

int MSTransportable::getNumStages ( ) const
inherited

Return the total number stages in this persons plan.

Definition at line 407 of file MSTransportable.cpp.

References MSTransportable::myPlan.

Referenced by MSTransportable::getEdges(), and TraCIServerAPI_Person::processGet().

◆ getParameter()

◆ getParameterWindow()

GUIParameterTableWindow * GUIContainer::getParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window
See also
GUIGlObject::getParameterWindow

Implements GUIGlObject.

Definition at line 133 of file GUIContainer.cpp.

References GUIParameterTableWindow::closeBuilding(), getAngle(), MSTransportable::getCurrentStageDescription(), MSTransportable::getDestination(), MSTransportable::getEdge(), getEdgePos(), MSTransportable::getFromEdge(), MSTransportable::getID(), getSpeed(), getWaitingSeconds(), and GUIParameterTableWindow::mkItem().

◆ getParentName()

const std::string & GUIGlObject::getParentName ( ) const
virtualinherited

Returns the name of the parent object (if any)

Returns
This object's parent id

Reimplemented in GNEAdditional, GNECalibrator, GNEDetectorE3, GNEDetector, GNERerouter, GNEStoppingPlace, GNERouteProbe, GNEVariableSpeedSign, GNEVaporizer, GUILane, GNELane, and GNENetElement.

Definition at line 115 of file GUIGlObject.cpp.

References StringUtils::emptyString.

Referenced by GUIGLObjectPopupMenu::onCmdCopyEdgeName().

◆ getPopUpMenu()

GUIGLObjectPopupMenu * GUIContainer::getPopUpMenu ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own popup-menu.

Parameters
[in]appThe application needed to build the popup-menu
[in]parentThe parent window needed to build the popup-menu
Returns
The built popup-menu
See also
GUIGlObject::getPopUpMenu

Implements GUIGlObject.

Definition at line 118 of file GUIContainer.cpp.

References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildNameCopyPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), GUIGlObject::buildSelectionPopupEntry(), GUIGlObject::buildShowParamsPopupEntry(), and myAdditionalVisualizations.

◆ getPosition()

◆ getSpeed()

double GUIContainer::getSpeed ( ) const
virtual

the current speed of the container

Reimplemented from MSTransportable.

Definition at line 353 of file GUIContainer.cpp.

References MSTransportable::getSpeed(), and myLock.

Referenced by getColorValue(), getParameterWindow(), and setPositionInVehicle().

◆ getStageType()

StageType MSTransportable::getStageType ( int  next) const
inlineinherited

the stage type for the nth next stage

Definition at line 447 of file MSTransportable.h.

References MSTransportable::Stage::getStageType(), MSTransportable::myPlan, and MSTransportable::myStep.

Referenced by TraCIServerAPI_Person::processGet().

◆ getType()

GUIGlObjectType GUIGlObject::getType ( ) const
inherited

Returns the type of the object as coded in GUIGlObjectType.

See also
GUIGlObjectType

Definition at line 148 of file GUIGlObject.cpp.

References GUIGlObject::myGLObjectType.

Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawPersonsAndContainers(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawAction_drawWalkingareaPath(), GNEDetector::drawDetectorIcon(), GNEDetectorE1::drawGL(), GNEDetectorExit::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorE2::drawGL(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEJunction::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GNECrossing::drawGL(), drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSign::drawGL(), GNERouteProbe::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUICalibrator::drawGL(), GUIPerson::drawGL(), GNERerouter::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNEDetectorE3::drawGL(), GNELane::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNEConnection::drawGL(), GUIParkingArea::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNECalibrator::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GNEAdditional::drawLockIcon(), GUIBaseVehicle::drawOnPos(), GNEAdditional::drawParentAndChildrenConnections(), GNEJunction::getAttribute(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNELane::getColorValue(), GNEJunction::getColorValue(), GUILane::getColorValue(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getEdgesAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNESelectorFrame::handleIDs(), GNEAdditional::isAdditionalSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GNEViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases(), GNEConnectorFrame::onCmdClearSelectedConnections(), GUIGLObjectPopupMenu::onCmdCopyEdgeName(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideLFLinkItems(), GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFoes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowLFLinkItems(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases(), GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GUIPerson::GUIPersonPopupMenu::onCmdStopTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStopTrack(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic(), GNEViewNet::onLeftBtnPress(), LayeredRTree::selectLayer(), GNEJunction::setAttribute(), GNEJunction::setColor(), and GUISelectedStorage::toggleSelection().

◆ getTypeParameterWindow()

GUIParameterTableWindow * GUIGlObject::getTypeParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtualinherited

Returns an own type parameter window (optional)

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window

Reimplemented in GUIVehicle, GUIBaseVehicle, GUIMEVehicle, and GUIPerson.

Definition at line 127 of file GUIGlObject.cpp.

References UNUSED_PARAMETER.

Referenced by GUIGLObjectPopupMenu::onCmdShowTypePars().

◆ getVehicle()

SUMOVehicle* MSTransportable::getVehicle ( ) const
inlineinherited

The vehicle associated with this transportable.

Definition at line 501 of file MSTransportable.h.

References MSTransportable::appendStage(), MSTransportable::removeStage(), and MSTransportable::Stage::setSpeed().

Referenced by TraCIServerAPI_Person::processGet().

◆ getVehicleType()

◆ getWaitingSeconds()

double GUIContainer::getWaitingSeconds ( ) const
virtual

the time this container spent waiting in seconds

Reimplemented from MSTransportable.

Definition at line 346 of file GUIContainer.cpp.

References MSTransportable::getWaitingSeconds(), and myLock.

Referenced by getColorValue(), getParameterWindow(), and setPositionInVehicle().

◆ isWaiting4Vehicle()

bool MSTransportable::isWaiting4Vehicle ( ) const
inlineinherited

Whether the transportable waits for a vehicle.

Definition at line 496 of file MSTransportable.h.

Referenced by drawGL(), GUIPerson::drawGL(), getColorValue(), and GUIPerson::getColorValue().

◆ isWaitingFor()

bool MSTransportable::isWaitingFor ( const std::string &  line) const
inlineinherited

Whether the transportable waits for a vehicle of the line specified.

Definition at line 491 of file MSTransportable.h.

◆ proceed()

bool MSContainer::proceed ( MSNet net,
SUMOTime  time 
)
virtualinherited

◆ removeParameterTable()

void GUIGlObject::removeParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was closed.

Parameters
[in]wThe closed parameter window

Definition at line 262 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

◆ removeStage()

◆ replaceVehicleType()

void MSTransportable::replaceVehicleType ( MSVehicleType type)
inherited

◆ routeOutput()

void MSContainer::routeOutput ( OutputDevice os) const
virtualinherited

◆ setColor()

void GUIContainer::setColor ( const GUIVisualizationSettings s) const
private

◆ setDeparted()

void MSTransportable::setDeparted ( SUMOTime  now)
inherited

logs depart time of the current stage

Definition at line 371 of file MSTransportable.cpp.

◆ setFunctionalColor()

bool GUIContainer::setFunctionalColor ( int  activeScheme) const
private

sets the color according to the current scheme index and some vehicle function

Definition at line 261 of file GUIContainer.cpp.

References RGBColor::fromHSV(), getAngle(), MSTransportable::getParameter(), MSTransportable::getVehicleType(), GeomHelper::naviDegree(), GLHelper::setColor(), VEHPARS_COLOR_SET, and VTYPEPARS_COLOR_SET.

Referenced by setColor().

◆ setMicrosimID()

void GUIGlObject::setMicrosimID ( const std::string &  newID)
virtualinherited

Changes the microsimID of the object.

Note
happens in NETEDIT

Reimplemented in GNEEdge.

Definition at line 141 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.

Referenced by GNENet::renameJunction(), GNEAdditional::setAdditionalID(), GNELane::setIndex(), GNEEdge::setMicrosimID(), and GNEConnection::updateID().

◆ setPositionInVehicle()

void GUIContainer::setPositionInVehicle ( const Position pos)
inline

◆ setPrefix()

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited

usually names are prefixed by a type-specific string. this method can be used to change the default

Definition at line 271 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.

◆ setSpeed()

void MSTransportable::setSpeed ( double  speed)
inherited

sets the walking speed (ignored in other stages)

Definition at line 442 of file MSTransportable.cpp.

References MSTransportable::myPlan.

Referenced by TraCIServerAPI_Person::processSet().

◆ tripInfoOutput()

void MSContainer::tripInfoOutput ( OutputDevice os) const
virtualinherited

Called on writing tripinfo output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSTransportable.

Definition at line 262 of file MSContainer.cpp.

References OutputDevice::closeTag(), MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSTransportable::myPlan, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

Field Documentation

◆ INVALID_ID

const GUIGlID GUIGlObject::INVALID_ID = 0
staticinherited

◆ myAdditionalVisualizations

std::map<GUISUMOAbstractView*, int> GUIContainer::myAdditionalVisualizations

Enabled visualisations, per view.

Definition at line 181 of file GUIContainer.h.

Referenced by getPopUpMenu().

◆ myLock

MFXMutex GUIContainer::myLock
mutableprivate

The mutex used to avoid concurrent updates of the vehicle buffer.

Definition at line 188 of file GUIContainer.h.

Referenced by getAngle(), getEdgePos(), getPosition(), getSpeed(), and getWaitingSeconds().

◆ myParameter

const SUMOVehicleParameter* MSTransportable::myParameter
protectedinherited

◆ myPlan

◆ myPositionInVehicle

Position GUIContainer::myPositionInVehicle
private

The position of a container while riding a vehicle.

Definition at line 191 of file GUIContainer.h.

Referenced by drawGL(), and setPositionInVehicle().

◆ myStep

◆ myVType

const MSVehicleType* MSTransportable::myVType
protectedinherited

This transportable's type. (mainly used for drawing related information Note sure if it is really necessary.

Definition at line 536 of file MSTransportable.h.

Referenced by GUIPerson::getTypeParameterWindow(), MSTransportable::getVehicleType(), and MSTransportable::replaceVehicleType().

◆ myWriteEvents

bool MSTransportable::myWriteEvents
protectedinherited

Whether events shall be written.

Definition at line 539 of file MSTransportable.h.

◆ ROADSIDE_OFFSET

const double MSTransportable::ROADSIDE_OFFSET
staticprotectedinherited

the offset for computing positions when standing at an edge

Definition at line 529 of file MSTransportable.h.

Referenced by MSTransportable::Stage_Waiting::getPosition(), and MSTransportable::Stage_Driving::getPosition().

◆ TypeNames

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 76 of file GUIGlObject.h.


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