AbstractObserver.h 1.1 KB

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