 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef MSEventControl_h
20 #define MSEventControl_h
52 typedef std::pair< Command*, SUMOTime >
Event;
118 return e1.second > e2.second;
Stores time-dependant events and executes them at the proper time.
std::priority_queue< Event, std::vector< Event >, EventSortCrit > EventCont
Container for time-dependant events, e.g. traffic-light-change.
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
void setCurrentTimeStep(SUMOTime time)
Set the current Time.
EventCont myEvents
Event-container, holds executable events.
std::pair< Command *, SUMOTime > Event
Combination of an event and the time it shall be executed at.
virtual ~MSEventControl()
Destructor.
Sort-criterion for events.
MSEventControl & operator=(const MSEventControl &)
invalid assignment operator.
SUMOTime currentTimeStep
The current TimeStep.
bool isEmpty()
Returns whether events are in the que.
Base (microsim) event class.
MSEventControl()
Default constructor.
bool operator()(const Event &e1, const Event &e2) const
compares two events
virtual void execute(SUMOTime time)
Executes time-dependant commands.
SUMOTime getCurrentTimeStep()
get the Current TimeStep used in addEvent.