15 #include <boost/shared_ptr.hpp>
16 #include <boost/function.hpp>
18 #include <tbb/spin_mutex.h>
30 template <
typename T_CallbackArg>
92 typedef void (*DtCallbackFunctionType)(
void*);
105 bool addCallback(DtCallbackFunctionType fcn,
void* usrData);
109 bool removeCallback(DtCallbackFunctionType fcn,
void* usrData);
113 void invokeCallbacks();
139 template <
typename Callback>
159 if (myDisconnectFunction)
161 bool value = myDisconnectFunction();
170 template <
typename Callback>
176 : myDisconnectFunction(func) { }
191 template <
typename Callback>
210 void removeCallback(
const Callback& callback,
bool* removedLast = 0);
218 void removeCallback(
const boost::function<
bool(
const Callback&)>& removePredicate,
bool* removedLast = 0);
228 template <
typename T1>
231 template <
typename T1,
typename T2>
234 template <
typename T1,
typename T2,
typename T3>
241 typedef boost::shared_ptr<DtCallbackInfoType>
Ptr;
242 typedef boost::weak_ptr<DtCallbackInfoType>
WPtr;
269 #define callbackList_inl_
270 #include "readerWriter/noArgumentCallbackList.inl"
271 #undef callbackList_inl_