12 #ifndef SST_CORE_SSTHANDLER_H
13 #define SST_CORE_SSTHANDLER_H
15 #include "sst/core/sst_types.h"
83 static std::atomic<HandlerId_t> id_counter;
95 HandlerId_t
getId() {
return my_id; }
99 template <
typename returnT,
typename argT,
bool createIdT>
114 template <
typename returnT,
typename argT,
bool createIdT,
typename classT,
typename dataT =
void>
118 typedef returnT (classT::*PtrMember)(argT, dataT);
120 const PtrMember member;
129 SSTHandler(classT*
const object, PtrMember member, dataT data) :
136 returnT
operator()(argT arg) {
return (object->*member)(arg, data); }
142 template <
typename returnT,
typename argT,
bool createIdT,
typename classT>
146 typedef returnT (classT::*PtrMember)(argT);
147 const PtrMember member;
161 returnT
operator()(argT arg) {
return (object->*member)(arg); }
166 template <
typename returnT,
bool createIdT>
180 template <
typename returnT,
typename classT,
bool createIdT,
typename dataT =
void>
184 typedef returnT (classT::*PtrMember)(dataT);
186 const PtrMember member;
208 template <
typename returnT,
typename classT,
bool createIdT>
212 typedef returnT (classT::*PtrMember)();
213 const PtrMember member;
233 #endif // SST_CORE_SSTHANDLER_H
HandlerId_t getId()
Get the unique ID of this handler.
Definition: ssthandler.h:95
void operator()()
Handler function.
Definition: ssthandler.h:227
void operator()()
Handler function.
Definition: ssthandler.h:202
virtual returnT operator()(argT)=0
Handler function.
Definition: ssthandler.h:100
returnT operator()(argT arg)
Handler function.
Definition: ssthandler.h:136
Event Handler class with user-data argument.
Definition: ssthandler.h:115
SSTHandler(classT *const object, PtrMember member)
Constructor.
Definition: ssthandler.h:155
returnT operator()(argT arg)
Handler function.
Definition: ssthandler.h:161
Handler with no arguments to callback from caller.
Definition: ssthandler.h:167
SSTHandlerNoArgs(classT *const object, PtrMember member)
Constructor.
Definition: ssthandler.h:221
SSTHandler(classT *const object, PtrMember member, dataT data)
Constructor.
Definition: ssthandler.h:129
Event Handler class with user-data argument.
Definition: ssthandler.h:181
SSTHandlerNoArgs(classT *const object, PtrMember member, dataT data)
Constructor.
Definition: ssthandler.h:195
virtual returnT operator()()=0
Handler function.
Functor classes for Event handling.
Definition: ssthandler.h:71