notifier_ext.h File Reference

Go to the source code of this file.

## Classes

class | PSmartNotifieeRegistrar
| Implements a function similar to the PNotifier, but uses an "id" to link the caller and callee rather than using a pointer. More...
class | PSmartNotifierFunction
class | PNotifierList

## Macros

#define | PDECLARE_SMART_NOTIFIEE PSmartNotifieeRegistrar m_Registrar; \
#define | PCREATE_SMART_NOTIFIEE m_Registrar.Init(this)
#define | PDECLARE_SMART_NOTIFIER(notifier, notifiee, func)
#define | PCREATE_SMART_NOTIFIER(func) PNotifier(new func##_PSmartNotifier(m_Registrar.GetID()))

## Macro Definition Documentation

## PCREATE_SMART_NOTIFIEE

#define PCREATE_SMART_NOTIFIEE m_Registrar.Init(this)

## PCREATE_SMART_NOTIFIER

#define PCREATE_SMART_NOTIFIER | ( |  | func | ) | PNotifier(new func##_PSmartNotifier(m_Registrar.GetID()))

## PDECLARE_SMART_NOTIFIEE

#define PDECLARE_SMART_NOTIFIEE PSmartNotifieeRegistrar m_Registrar; \

## PDECLARE_SMART_NOTIFIER

#define PDECLARE_SMART_NOTIFIER | ( |  | notifier,
|  |  | notifiee,
|  |  | func
| ) |  |

Value:
class func##_PSmartNotifier : public PSmartNotifierFunction { \
public: \
func##_PSmartNotifier(unsigned id) : PSmartNotifierFunction(id) { } \
virtual void Call(PObject & note, INT extra) const \
{ \
void * obj = GetNotifiee(); \
if (obj) \
((notifiee*)obj)->func((notifier &)note, extra); \
else \
PTRACE(2, "PWLib\tInvalid notifiee"); \
} \
}; \
friend class func##_PSmartNotifier; \
virtual void func(notifier & note, INT extra)
PSmartNotifierFunction
Definition: notifier_ext.h:64
PSmartNotifierFunction::GetNotifiee
void * GetNotifiee() const
Definition: notifier_ext.h:74
PNotifierFunctionTemplate::Call
virtual void Call(PObject &notifier, ParmType extra) const =0
Execute the call to the actual notification function on the object instance contained in this object...
PTRACE
#define PTRACE(level, args)
Output trace.
Definition: object.h:530
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118

Referenced by XMPP::MUC::Room::GetOtherUsers().