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