Logo Search packages:      
Sourcecode: poco version File versions  Download package

Public Types | Public Member Functions | Private Attributes

Poco::NObserver< C, N > Class Template Reference

#include <NObserver.h>

Inheritance diagram for Poco::NObserver< C, N >:
Inheritance graph
Collaboration diagram for Poco::NObserver< C, N >:
Collaboration graph

List of all members.

Public Types

typedef void(C::* Callback )(const NotificationPtr &)
typedef AutoPtr< N > NotificationPtr

Public Member Functions

bool accepts (Notification *pNf) const
AbstractObserverclone () const
bool equals (const AbstractObserver &abstractObserver) const
 NObserver (const NObserver &observer)
 NObserver (C &object, Callback method)
void notify (Notification *pNf) const
NObserveroperator= (const NObserver &observer)

Private Attributes

Callback _method
C * _pObject

Detailed Description

template<class C, class N>
class Poco::NObserver< C, N >

This template class implements an adapter that sits between a NotificationCenter and an object receiving notifications from it. It is quite similar in concept to the RunnableAdapter, but provides some NotificationCenter specific additional methods. See the NotificationCenter class for information on how to use this template class.

This class template is quite similar to the Observer class template. The only difference is that the NObserver expects the callback function to accept a const AutoPtr& instead of a plain pointer as argument, thus simplifying memory management.

Definition at line 51 of file NObserver.h.

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

Generated by  Doxygen 1.6.0   Back to index