15#include "wsf_export.h"
51 , mPriority(aPriority)
71 double GetTime()
const {
return mSimTime; }
86 void SetTime(
double aSimTime) { mSimTime = aSimTime; }
109 double mSimTime{0.0};
110 WsfSimulation* mSimulationPtr{
nullptr};
117template<
typename RT,
typename... Args>
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
WsfEventAdapterT(double aSimTime, const ExecuteFn &aExecuteFn)
Definition WsfEvent.hpp:123
~WsfEventAdapterT() override=default
ExecuteFn mExecuteFn
Definition WsfEvent.hpp:131
std::function< RT(Args...)> ExecuteFn
Definition WsfEvent.hpp:121
Definition WsfEvent.hpp:29
double GetTime() const
Definition WsfEvent.hpp:71
void AddedToEventQueue(WsfSimulation &aSimulation)
Called when the event is added to the event queue of the specified simulation.
Definition WsfEvent.hpp:106
int GetPriority() const
Definition WsfEvent.hpp:75
virtual EventDisposition Execute()=0
WsfSimulation * GetSimulation() const
Definition WsfEvent.hpp:103
void SetShouldExecute(bool aExecute)
Definition WsfEvent.hpp:99
virtual ~WsfEvent()=default
bool ShouldExecute() const
Definition WsfEvent.hpp:79
void SetTime(double aSimTime)
Definition WsfEvent.hpp:86
void SetPriority(int aPriority)
Definition WsfEvent.hpp:95
EventDisposition
Definition WsfEvent.hpp:37
@ cRESCHEDULE
Reschedule the event. WsfEvent::SetTime should have been called with the new time.
Definition WsfEvent.hpp:39
@ cDELETE
Delete the event from the event queue.
Definition WsfEvent.hpp:38
WsfEvent(const WsfEvent &aSrc)=delete
Copy constructor and copy assignment deleted to prevent copying.
WsfEvent & operator=(const WsfEvent &aRhs)=delete
WsfEvent(double aSimTime, int aPriority=0)
Definition WsfEvent.hpp:49
WsfOneShotEvent(double aSimTime, const ExecuteFn &aExecuteFn)
Definition WsfEvent.hpp:141
EventDisposition Execute() override
Definition WsfEvent.hpp:146
WsfRecurringEvent(double aSimTime, const ExecuteFn &aExecuteFn)
Definition WsfEvent.hpp:166
EventDisposition Execute() override
Definition WsfEvent.hpp:171
The main controller for a simulation.
Definition WsfSimulation.hpp:109