2023-02-08 11:04:11 +00:00
|
|
|
//
|
|
|
|
// AbstractObserver.h
|
|
|
|
//
|
|
|
|
// Library: Foundation
|
|
|
|
// Package: Notifications
|
|
|
|
// Module: NotificationCenter
|
|
|
|
//
|
|
|
|
// Definition of the AbstractObserver class.
|
|
|
|
//
|
|
|
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
|
|
|
// and Contributors.
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef Foundation_AbstractObserver_INCLUDED
|
|
|
|
#define Foundation_AbstractObserver_INCLUDED
|
|
|
|
|
|
|
|
|
|
|
|
#include "Poco/Foundation.h"
|
|
|
|
#include "Poco/Notification.h"
|
|
|
|
|
|
|
|
|
2023-02-13 09:22:33 +00:00
|
|
|
namespace Poco
|
|
|
|
{
|
2023-02-08 11:04:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Foundation_API AbstractObserver
|
2023-02-13 09:22:33 +00:00
|
|
|
/// The base class for all instantiations of
|
|
|
|
/// the Observer and NObserver template classes.
|
2023-02-08 11:04:11 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-02-13 09:22:33 +00:00
|
|
|
AbstractObserver();
|
|
|
|
AbstractObserver(const AbstractObserver & observer);
|
|
|
|
virtual ~AbstractObserver();
|
|
|
|
|
|
|
|
AbstractObserver & operator=(const AbstractObserver & observer);
|
|
|
|
|
|
|
|
virtual void notify(Notification * pNf) const = 0;
|
|
|
|
virtual bool equals(const AbstractObserver & observer) const = 0;
|
|
|
|
virtual bool accepts(Notification * pNf) const = 0;
|
|
|
|
virtual AbstractObserver * clone() const = 0;
|
|
|
|
virtual void disable() = 0;
|
2023-02-08 11:04:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Poco
|
|
|
|
|
|
|
|
|
|
|
|
#endif // Foundation_AbstractObserver_INCLUDED
|