|
SUMO - Simulation of Urban MObility
|
This event-class is used to initialise a WAUT switch at a certain time. More...
#include <MSTLLogicControl.h>
Public Member Functions | |
| unsigned int & | getIndex () |
| Returns a reference to the index. | |
| const std::string & | getWAUTID () const |
| Returns the WAUT-id. | |
| SwitchInitCommand (MSTLLogicControl &p, const std::string &wautid, unsigned int index) | |
| Constructor. | |
| ~SwitchInitCommand () | |
| Destructor. | |
Derived from Command | |
| SUMOTime | execute (SUMOTime) |
| Begins a WAUT switch by executing the command. | |
Protected Attributes | |
| unsigned int | myIndex |
| The current index within the WAUT switch table. | |
| MSTLLogicControl & | myParent |
| The control to call. | |
| std::string | myWAUTID |
| The id of the WAUT that shall switch. | |
Private Member Functions | |
| SwitchInitCommand & | operator= (const SwitchInitCommand &) |
| Invalidated assignment operator. | |
| SwitchInitCommand (const SwitchInitCommand &) | |
| Invalidated copy constructor. | |
This event-class is used to initialise a WAUT switch at a certain time.
This command is reused. The index of the WAUT-switch is incremented at each call to the control.
Definition at line 366 of file MSTLLogicControl.h.
| MSTLLogicControl::SwitchInitCommand::SwitchInitCommand | ( | MSTLLogicControl & | p, |
| const std::string & | wautid, | ||
| unsigned int | index | ||
| ) | [inline] |
Constructor.
| [in] | p | The logic control |
| [in] | wautid | The id of the WAUT |
| [in] | index | The first position within the WAUT table |
Definition at line 373 of file MSTLLogicControl.h.
| MSTLLogicControl::SwitchInitCommand::~SwitchInitCommand | ( | ) | [inline] |
Destructor.
Definition at line 378 of file MSTLLogicControl.h.
| MSTLLogicControl::SwitchInitCommand::SwitchInitCommand | ( | const SwitchInitCommand & | ) | [private] |
Invalidated copy constructor.
Begins a WAUT switch by executing the command.
The parent's "initWautSwitch" method is called supporting this command as an argument. The result of "initWautSwitch" is returned.
"initWautSwitch" may throw an ProcessError if the program to switch to is not known.
| [in] | currentTime | The current simulation time (unused) |
| ProcessError | If the program to switch to does not exist |
Implements Command.
Definition at line 399 of file MSTLLogicControl.h.
References MSTLLogicControl::initWautSwitch(), and myParent.
| unsigned int& MSTLLogicControl::SwitchInitCommand::getIndex | ( | ) | [inline] |
Returns a reference to the index.
Definition at line 417 of file MSTLLogicControl.h.
References myIndex.
Referenced by MSTLLogicControl::initWautSwitch().
| const std::string& MSTLLogicControl::SwitchInitCommand::getWAUTID | ( | ) | const [inline] |
Returns the WAUT-id.
Definition at line 409 of file MSTLLogicControl.h.
References myWAUTID.
Referenced by MSTLLogicControl::initWautSwitch().
| SwitchInitCommand& MSTLLogicControl::SwitchInitCommand::operator= | ( | const SwitchInitCommand & | ) | [private] |
Invalidated assignment operator.
unsigned int MSTLLogicControl::SwitchInitCommand::myIndex [protected] |
The current index within the WAUT switch table.
Definition at line 430 of file MSTLLogicControl.h.
Referenced by getIndex().
std::string MSTLLogicControl::SwitchInitCommand::myWAUTID [protected] |
The id of the WAUT that shall switch.
Definition at line 427 of file MSTLLogicControl.h.
Referenced by getWAUTID().