13 #ifndef SST_CORE_ONESHOT_H 14 #define SST_CORE_ONESHOT_H 16 #include <sst/core/sst_types.h> 20 #include <sst/core/action.h> 22 #define _ONESHOT_DBG(fmt, args...)__DBG(DBG_ONESHOT, OneShot, fmt, ## args) 52 template <
typename classT,
typename argT =
void>
55 typedef void (classT::*PtrMember)(argT);
57 const PtrMember member;
66 Handler(classT*
const object, PtrMember member, argT data) :
77 (
object->*member)(data);
86 template <
typename classT>
89 typedef void (classT::*PtrMember)();
91 const PtrMember member;
98 Handler(classT*
const object, PtrMember member) :
128 void print(
const std::string& header,
Output &out)
const override;
131 typedef std::vector<OneShot::HandlerBase*> HandlerList_t;
132 typedef std::map<SimTime_t, HandlerList_t*> HandlerVectorMap_t;
138 void execute(
void)
override;
142 SimTime_t scheduleOneShot();
145 HandlerVectorMap_t m_HandlerVectorMap;
153 #endif // SST_CORE_ONESHOT_H Output object provides consistant method for outputing data to stdout, stderr and/or sst debug file...
Definition: output.h:54
An Action is a schedulable Activity which is not an Event.
Definition: action.h:30
void operator()() override
Operator to callback OneShot Handler; called by the OneShot object to execute the users callback...
Definition: oneshot.h:106
A class to convert between a component's view of time and the core's view of time.
Definition: timeConverter.h:25
void print(const std::string &header, Output &out) const override
Print details about the OneShot.
Definition: oneshot.cc:144
bool isScheduled()
Is OneShot scheduled.
Definition: oneshot.h:122
Handler(classT *const object, PtrMember member, argT data)
Constructor.
Definition: oneshot.h:66
void registerHandler(OneShot::HandlerBase *handler)
Add a handler to be called on this OneShot Event.
Definition: oneshot.cc:51
virtual void operator()()=0
Function called when Handler is invoked.
Handler(classT *const object, PtrMember member)
Constructor.
Definition: oneshot.h:98
A OneShot Event class.
Definition: oneshot.h:33
Event Handler class with user-data argument.
Definition: oneshot.h:53
void operator()() override
Operator to callback OneShot Handler; called by the OneShot object to execute the users callback...
Definition: oneshot.h:76
Functor classes for OneShot handling.
Definition: oneshot.h:39