2023-02-08 11:04:11 +00:00
|
|
|
//
|
|
|
|
// AbstractPriorityDelegate.h
|
|
|
|
//
|
|
|
|
// Library: Foundation
|
|
|
|
// Package: Events
|
|
|
|
// Module: AbstractPriorityDelegate
|
|
|
|
//
|
|
|
|
// Implementation of the AbstractPriorityDelegate template.
|
|
|
|
//
|
|
|
|
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
|
|
|
|
// and Contributors.
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef Foundation_AbstractPriorityDelegate_INCLUDED
|
|
|
|
#define Foundation_AbstractPriorityDelegate_INCLUDED
|
|
|
|
|
|
|
|
|
|
|
|
#include "Poco/AbstractDelegate.h"
|
2023-02-13 09:22:33 +00:00
|
|
|
#include "Poco/Foundation.h"
|
2023-02-08 11:04:11 +00:00
|
|
|
|
|
|
|
|
2023-02-13 09:22:33 +00:00
|
|
|
namespace Poco
|
|
|
|
{
|
2023-02-08 11:04:11 +00:00
|
|
|
|
|
|
|
|
2023-02-13 09:22:33 +00:00
|
|
|
template <class TArgs>
|
|
|
|
class AbstractPriorityDelegate : public AbstractDelegate<TArgs>
|
|
|
|
/// Base class for PriorityDelegate and PriorityExpire.
|
|
|
|
///
|
|
|
|
/// Extends AbstractDelegate with a priority value.
|
2023-02-08 11:04:11 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-02-13 09:22:33 +00:00
|
|
|
AbstractPriorityDelegate(int prio) : _priority(prio) { }
|
|
|
|
|
|
|
|
AbstractPriorityDelegate(const AbstractPriorityDelegate & del) : AbstractDelegate<TArgs>(del), _priority(del._priority) { }
|
|
|
|
|
|
|
|
virtual ~AbstractPriorityDelegate() { }
|
|
|
|
|
|
|
|
int priority() const { return _priority; }
|
2023-02-08 11:04:11 +00:00
|
|
|
|
|
|
|
protected:
|
2023-02-13 09:22:33 +00:00
|
|
|
int _priority;
|
2023-02-08 11:04:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Poco
|
|
|
|
|
|
|
|
|
|
|
|
#endif // Foundation_AbstractPriorityDelegate_INCLUDED
|