AbstractPriorityDelegate.h 1.2 KB

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