|
WSF
|
#include <WsfStableOrderEventManager.hpp>


Public Types | |
| typedef std::pair< WsfEvent *, unsigned int > | StableEvent |
Public Member Functions | |
| WsfStableOrderEventManager () | |
| virtual | ~WsfStableOrderEventManager () |
| virtual void | AddEvent (WsfEvent *aEventPtr) |
| virtual WsfEvent * | PeekEvent () |
| virtual WsfEvent * | PopEvent () |
| virtual void | Reset () |
| Reset the event queue back to an empty state. | |
| Public Member Functions inherited from WsfEventManager | |
| WsfEventManager (WsfSimulation &aSimulation) | |
| WsfEventManager (const WsfEventManager &aSrc)=delete | |
| WsfEventManager & | operator= (const WsfEventManager &aRhs)=delete |
| WsfEventManager (WsfEventManager &&)=default | |
| WsfEventManager & | operator= (WsfEventManager &&)=default |
| virtual | ~WsfEventManager ()=default |
| virtual void | AddEvent (std::unique_ptr< WsfEvent > aEventPtr) |
| Add an event to the event queue. | |
| virtual WsfEvent * | PeekEvent () const |
| Get, but do not remove, the next event that should be dispatched. | |
Additional Inherited Members | |
| Protected Attributes inherited from WsfEventManager | |
| std::recursive_mutex | mMutex {} |
A manager for a stable time-ordered queue of WsfEvent objects
This class is used by WsfSimulation to implement an event queue. It could also be used by other classes that want to retain their own time-ordered event queues.
| typedef std::pair<WsfEvent*, unsigned int> WsfStableOrderEventManager::StableEvent |
|
inline |
References WsfEventManager::WsfEventManager().
|
inlinevirtual |
References WsfEventManager::Reset().
|
inlinevirtual |
Add an event to the event queue.
| aEventPtr | Pointer to the event to be added to the queue. The WsfEvent::GetTime method will be used to determine when the event should be dispatched. The event manager becomes the owner of the event. |
If multiple events are queued with the same time, the order in which those events are dispatched is not guaranteed to be the same as the order of insertion. The only guarantee is that events with a smaller time will be dispatched before those with a greater time.
References WsfEventManager::mMutex.
|
inlinevirtual |
Get, but do not remove, the next event that should be dispatched
The next event is the one with the lowest time value.
References WsfEventManager::mMutex.
|
inlinevirtual |
Get and remove the next event that should be dispatched
The next event is the one with the lowest time value.
Reimplemented from WsfEventManager.
References WsfEventManager::mMutex.
|
inlinevirtual |
Reset the event queue back to an empty state.
Reimplemented from WsfEventManager.
References WsfEventManager::mMutex.