| 1 | // | 
|---|
| 2 | // AbstractObserver.h | 
|---|
| 3 | // | 
|---|
| 4 | // Library: Foundation | 
|---|
| 5 | // Package: Notifications | 
|---|
| 6 | // Module:  NotificationCenter | 
|---|
| 7 | // | 
|---|
| 8 | // Definition of the AbstractObserver class. | 
|---|
| 9 | // | 
|---|
| 10 | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | 
|---|
| 11 | // and Contributors. | 
|---|
| 12 | // | 
|---|
| 13 | // SPDX-License-Identifier:	BSL-1.0 | 
|---|
| 14 | // | 
|---|
| 15 |  | 
|---|
| 16 |  | 
|---|
| 17 | #ifndef Foundation_AbstractObserver_INCLUDED | 
|---|
| 18 | #define Foundation_AbstractObserver_INCLUDED | 
|---|
| 19 |  | 
|---|
| 20 |  | 
|---|
| 21 | #include "Poco/Foundation.h" | 
|---|
| 22 | #include "Poco/Notification.h" | 
|---|
| 23 |  | 
|---|
| 24 |  | 
|---|
| 25 | namespace Poco { | 
|---|
| 26 |  | 
|---|
| 27 |  | 
|---|
| 28 | class Foundation_API AbstractObserver | 
|---|
| 29 | /// The base class for all instantiations of | 
|---|
| 30 | /// the Observer and NObserver template classes. | 
|---|
| 31 | { | 
|---|
| 32 | public: | 
|---|
| 33 | AbstractObserver(); | 
|---|
| 34 | AbstractObserver(const AbstractObserver& observer); | 
|---|
| 35 | virtual ~AbstractObserver(); | 
|---|
| 36 |  | 
|---|
| 37 | AbstractObserver& operator = (const AbstractObserver& observer); | 
|---|
| 38 |  | 
|---|
| 39 | virtual void notify(Notification* pNf) const = 0; | 
|---|
| 40 | virtual bool equals(const AbstractObserver& observer) const = 0; | 
|---|
| 41 | virtual bool accepts(Notification* pNf) const = 0; | 
|---|
| 42 | virtual AbstractObserver* clone() const = 0; | 
|---|
| 43 | virtual void disable() = 0; | 
|---|
| 44 | }; | 
|---|
| 45 |  | 
|---|
| 46 |  | 
|---|
| 47 | } // namespace Poco | 
|---|
| 48 |  | 
|---|
| 49 |  | 
|---|
| 50 | #endif // Foundation_AbstractObserver_INCLUDED | 
|---|
| 51 |  | 
|---|