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
16
17#ifndef Foundation_AbstractPriorityDelegate_INCLUDED
18#define Foundation_AbstractPriorityDelegate_INCLUDED
19
20
21#include "Poco/Foundation.h"
22#include "Poco/AbstractDelegate.h"
23
24
25namespace Poco {
26
27
28template <class TArgs>
29class AbstractPriorityDelegate: public AbstractDelegate<TArgs>
30 /// Base class for PriorityDelegate and PriorityExpire.
31 ///
32 /// Extends AbstractDelegate with a priority value.
33{
34public:
35 AbstractPriorityDelegate(int prio):
36 _priority(prio)
37 {
38 }
39
40 AbstractPriorityDelegate(const AbstractPriorityDelegate& del):
41 AbstractDelegate<TArgs>(del),
42 _priority(del._priority)
43 {
44 }
45
46 virtual ~AbstractPriorityDelegate()
47 {
48 }
49
50 int priority() const
51 {
52 return _priority;
53 }
54
55protected:
56 int _priority;
57};
58
59
60} // namespace Poco
61
62
63#endif // Foundation_AbstractPriorityDelegate_INCLUDED
64