Go to the documentation of this file.
31 #ifndef PTLIB_NOTIFIER_H
32 #define PTLIB_NOTIFIER_H
62 template <
typename ParmType>
108 template <
typename ParmType>
163 #define PDECLARE_NOTIFIER2(notifier, notifiee, func, type) \
164 class func##_PNotifier : public PNotifierFunctionTemplate<type> { \
166 func##_PNotifier(notifiee * obj) : PNotifierFunctionTemplate<type>(obj) { } \
167 virtual void Call(PObject & note, type extra) const \
168 { ((notifiee*)object)->func((notifier &)note, extra); } \
170 friend class func##_PNotifier; \
171 virtual void func(notifier & note, type extra)
174 #define PDECLARE_NOTIFIER(notifier, notifiee, func) \
175 PDECLARE_NOTIFIER2(notifier, notifiee, func, INT)
186 #define PCREATE_NOTIFIER2_EXT(obj, notifiee, func, type) PNotifierTemplate<type>(new notifiee::func##_PNotifier(obj))
189 #define PCREATE_NOTIFIER_EXT( obj, notifiee, func) PCREATE_NOTIFIER2_EXT(obj, notifiee, func, INT)
200 #define PCREATE_NOTIFIER2(func, type) PNotifierTemplate<type>(new func##_PNotifier(this))
203 #define PCREATE_NOTIFIER(func) PCREATE_NOTIFIER2(func, INT)
206 #endif // PTLIB_NOTIFIER_H