Notification.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // Notification.h
  3. //
  4. // Library: Foundation
  5. // Package: Notifications
  6. // Module: Notification
  7. //
  8. // Definition of the Notification 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. #ifndef Foundation_Notification_INCLUDED
  16. #define Foundation_Notification_INCLUDED
  17. #include "Poco/Foundation.h"
  18. #include "Poco/Mutex.h"
  19. #include "Poco/RefCountedObject.h"
  20. #include "Poco/AutoPtr.h"
  21. namespace Poco {
  22. class Foundation_API Notification: public RefCountedObject
  23. /// The base class for all notification classes used
  24. /// with the NotificationCenter and the NotificationQueue
  25. /// classes.
  26. /// The Notification class can be used with the AutoPtr
  27. /// template class.
  28. {
  29. public:
  30. typedef AutoPtr<Notification> Ptr;
  31. Notification();
  32. /// Creates the notification.
  33. virtual std::string name() const;
  34. /// Returns the name of the notification.
  35. /// The default implementation returns the class name.
  36. protected:
  37. virtual ~Notification();
  38. };
  39. } // namespace Poco
  40. #endif // Foundation_Notification_INCLUDED