PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PValidatedNotifierTarget Class Reference

Validated PNotifier class. More...

#include <notifier_ext.h>

Inheritance diagram for PValidatedNotifierTarget:

Public Member Functions

 PValidatedNotifierTarget ()
 
virtual ~PValidatedNotifierTarget ()
 
 PValidatedNotifierTarget (const PValidatedNotifierTarget &)
 
void operator= (const PValidatedNotifierTarget &)
 

Static Public Member Functions

static bool Exists (PNotifierIdentifer id)
 

Detailed Description

Validated PNotifier class.

This uses a mechanism to assure the caller that the target class still exists rather than simply calling through a pointer as the base PNotifierFuntion class will. Thus the call simply will not happen rather than crash.

A notification target class must derive from PValidatedNotifierTarget, usually as a multiple inheritance, which will associate a unique ID with the specific class instance. This is saved in a global table. When the object is destoyed the ID is removed from that table so the caller knows if the target still exists or not.

As well as deriving from PValidatedNotifierTarget class, the notifier functions must be declared using the PDECLARE_VALIDATED_NOTIFIER rather than the usual PDECLARE_NOTIFIER macro.

Constructor & Destructor Documentation

PValidatedNotifierTarget::PValidatedNotifierTarget ( )
virtual PValidatedNotifierTarget::~PValidatedNotifierTarget ( )
virtual
PValidatedNotifierTarget::PValidatedNotifierTarget ( const PValidatedNotifierTarget )

Member Function Documentation

static bool PValidatedNotifierTarget::Exists ( PNotifierIdentifer  id)
static
void PValidatedNotifierTarget::operator= ( const PValidatedNotifierTarget )
inline

The documentation for this class was generated from the following file: