AbstractPriorityDelegate.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // AbstractPriorityDelegate.h
  3. //
  4. // Library: Foundation
  5. // Package: Events
  6. // Module: AbstractPriorityDelegate
  7. //
  8. // Implementation of the AbstractPriorityDelegate template.
  9. //
  10. // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #ifndef Foundation_AbstractPriorityDelegate_INCLUDED
  16. #define Foundation_AbstractPriorityDelegate_INCLUDED
  17. #include "Poco/Foundation.h"
  18. #include "Poco/AbstractDelegate.h"
  19. namespace Poco {
  20. template <class TArgs>
  21. class AbstractPriorityDelegate: public AbstractDelegate<TArgs>
  22. /// Base class for PriorityDelegate and PriorityExpire.
  23. ///
  24. /// Extends AbstractDelegate with a priority value.
  25. {
  26. public:
  27. AbstractPriorityDelegate(int prio):
  28. _priority(prio)
  29. {
  30. }
  31. AbstractPriorityDelegate(const AbstractPriorityDelegate& del):
  32. AbstractDelegate<TArgs>(del),
  33. _priority(del._priority)
  34. {
  35. }
  36. virtual ~AbstractPriorityDelegate()
  37. {
  38. }
  39. int priority() const
  40. {
  41. return _priority;
  42. }
  43. protected:
  44. int _priority;
  45. };
  46. } // namespace Poco
  47. #endif // Foundation_AbstractPriorityDelegate_INCLUDED