Eclipse SUMO - Simulation of Urban MObility
MSRailSignalConstraint_Predecessor Class Reference

#include <MSRailSignalConstraint.h>

Inheritance diagram for MSRailSignalConstraint_Predecessor:
[legend]
Collaboration diagram for MSRailSignalConstraint_Predecessor:
[legend]

Data Structures

class  PassedTracker
 

Public Member Functions

bool cleared () const
 whether the constraint has been met More...
 
std::string getDescription () const
 
 MSRailSignalConstraint_Predecessor (const MSRailSignal *signal, const std::string &tripId, int limit)
 Constructor. More...
 
 ~MSRailSignalConstraint_Predecessor ()
 Destructor. More...
 

Static Public Member Functions

static void cleanup ()
 clean up state More...
 
static void clearState ()
 Clear all constraint states before quick-loading state. More...
 
static void loadState (const SUMOSAXAttributes &attrs)
 loads the constraint state from the given attrs More...
 
static void saveState (OutputDevice &out)
 Saves the current constraint states into the given stream. More...
 

Data Fields

const int myLimit
 the number of passed vehicles within which tripId must have occured More...
 
std::vector< PassedTracker * > myTrackers
 the tracker object for this constraint More...
 
const std::string myTripId
 id of the predecessor that must already have passed More...
 

Static Public Attributes

static std::map< const MSLane *, PassedTracker * > myTrackerLookup
 

Static Protected Member Functions

static std::string getVehID (const std::string &tripID)
 

Private Member Functions

MSRailSignalConstraint_Predecessoroperator= (const MSRailSignalConstraint_Predecessor &s)=delete
 invalidated assignment operator More...
 

Detailed Description

Definition at line 69 of file MSRailSignalConstraint.h.

Constructor & Destructor Documentation

◆ MSRailSignalConstraint_Predecessor()

MSRailSignalConstraint_Predecessor::MSRailSignalConstraint_Predecessor ( const MSRailSignal signal,
const std::string &  tripId,
int  limit 
)

◆ ~MSRailSignalConstraint_Predecessor()

MSRailSignalConstraint_Predecessor::~MSRailSignalConstraint_Predecessor ( )
inline

Destructor.

Definition at line 76 of file MSRailSignalConstraint.h.

Member Function Documentation

◆ cleanup()

void MSRailSignalConstraint_Predecessor::cleanup ( )
static

clean up state

Definition at line 95 of file MSRailSignalConstraint.cpp.

References myTrackerLookup.

Referenced by MSRailSignalConstraint::cleanup().

Here is the caller graph for this function:

◆ cleared()

bool MSRailSignalConstraint_Predecessor::cleared ( ) const
virtual

whether the constraint has been met

Implements MSRailSignalConstraint.

Definition at line 137 of file MSRailSignalConstraint.cpp.

References myLimit, myTrackers, and myTripId.

◆ clearState()

void MSRailSignalConstraint_Predecessor::clearState ( )
static

Clear all constraint states before quick-loading state.

Definition at line 129 of file MSRailSignalConstraint.cpp.

References myTrackerLookup.

Referenced by MSRailSignalConstraint::clearState().

Here is the caller graph for this function:

◆ getDescription()

std::string MSRailSignalConstraint_Predecessor::getDescription ( ) const
virtual

◆ getVehID()

std::string MSRailSignalConstraint::getVehID ( const std::string &  tripID)
staticprotectedinherited

Definition at line 60 of file MSRailSignalConstraint.cpp.

References Named::getID(), MSNet::getInstance(), SUMOTrafficObject::getParameter(), Parameterised::getParameter(), MSNet::getVehicleControl(), MSVehicleControl::loadedVehBegin(), and MSVehicleControl::loadedVehEnd().

Referenced by getDescription().

Here is the caller graph for this function:

◆ loadState()

void MSRailSignalConstraint_Predecessor::loadState ( const SUMOSAXAttributes attrs)
static

loads the constraint state from the given attrs

Definition at line 110 of file MSRailSignalConstraint.cpp.

References MSLane::dictionary(), SUMOSAXAttributes::get(), SUMOSAXAttributes::getString(), SUMOSAXAttributes::getStringVector(), MSRailSignalConstraint_Predecessor::PassedTracker::loadState(), myTrackerLookup, SUMO_ATTR_INDEX, SUMO_ATTR_LANE, SUMO_ATTR_STATE, and WRITE_WARNINGF.

Referenced by MSStateHandler::myStartElement().

Here is the caller graph for this function:

◆ operator=()

MSRailSignalConstraint_Predecessor& MSRailSignalConstraint_Predecessor::operator= ( const MSRailSignalConstraint_Predecessor s)
privatedelete

invalidated assignment operator

◆ saveState()

void MSRailSignalConstraint_Predecessor::saveState ( OutputDevice out)
static

Saves the current constraint states into the given stream.

Definition at line 103 of file MSRailSignalConstraint.cpp.

References myTrackerLookup.

Referenced by MSRailSignalConstraint::saveState().

Here is the caller graph for this function:

Field Documentation

◆ myLimit

const int MSRailSignalConstraint_Predecessor::myLimit

the number of passed vehicles within which tripId must have occured

Definition at line 131 of file MSRailSignalConstraint.h.

Referenced by cleared().

◆ myTrackerLookup

std::map< const MSLane *, MSRailSignalConstraint_Predecessor::PassedTracker * > MSRailSignalConstraint_Predecessor::myTrackerLookup
static

◆ myTrackers

std::vector<PassedTracker*> MSRailSignalConstraint_Predecessor::myTrackers

the tracker object for this constraint

Definition at line 125 of file MSRailSignalConstraint.h.

Referenced by cleared(), getDescription(), and MSRailSignalConstraint_Predecessor().

◆ myTripId

const std::string MSRailSignalConstraint_Predecessor::myTripId

id of the predecessor that must already have passed

Definition at line 128 of file MSRailSignalConstraint.h.

Referenced by cleared(), and getDescription().


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