2012-04-29 20:52:25 +02: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.
|
|
|
|
//
|
2014-05-04 21:02:42 +02:00
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
2012-04-29 20:52:25 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef Foundation_AbstractObserver_INCLUDED
|
|
|
|
#define Foundation_AbstractObserver_INCLUDED
|
|
|
|
|
|
|
|
|
|
|
|
#include "Poco/Foundation.h"
|
|
|
|
#include "Poco/Notification.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Poco {
|
|
|
|
|
|
|
|
|
|
|
|
class Foundation_API AbstractObserver
|
|
|
|
/// The base class for all instantiations of
|
|
|
|
/// the Observer and NObserver template classes.
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
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;
|
2021-06-23 08:33:45 +02:00
|
|
|
virtual bool accepts(Notification* pNf, const char* pName = 0) const = 0;
|
2012-04-29 20:52:25 +02:00
|
|
|
virtual AbstractObserver* clone() const = 0;
|
|
|
|
virtual void disable() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Poco
|
|
|
|
|
|
|
|
|
|
|
|
#endif // Foundation_AbstractObserver_INCLUDED
|