mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-18 00:15:27 +01:00
trunk/branch integration: documentation
This commit is contained in:
parent
7b0716effa
commit
76f70d9358
@ -1,7 +1,7 @@
|
||||
//
|
||||
// NotificationStrategy.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/NotificationStrategy.h#2 $
|
||||
// $Id: //poco/1.4/Foundation/include/Poco/NotificationStrategy.h#2 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Events
|
||||
@ -9,7 +9,7 @@
|
||||
//
|
||||
// Definition of the NotificationStrategy interface.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
@ -36,8 +36,8 @@
|
||||
//
|
||||
|
||||
|
||||
#ifndef Foundation_NotificationStrategy_INCLUDED
|
||||
#define Foundation_NotificationStrategy_INCLUDED
|
||||
#ifndef Foundation_NotificationStrategy_INCLUDED
|
||||
#define Foundation_NotificationStrategy_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
@ -48,31 +48,33 @@ namespace Poco {
|
||||
|
||||
template <class TArgs, class TDelegate>
|
||||
class NotificationStrategy
|
||||
/// The interface that all notification strategies must implement.
|
||||
/// Note: Event is based on policy-driven design, so your strategy implementation
|
||||
/// must offer all the methods from this interface (otherwise: compile errors)
|
||||
/// but you don't need to extend from NotificationStrategy!
|
||||
/// The interface that all notification strategies must implement.
|
||||
///
|
||||
/// Note: Event is based on policy-driven design, so every strategy implementation
|
||||
/// must provide all the methods from this interface (otherwise: compile errors)
|
||||
/// but does not need to inherit from NotificationStrategy.
|
||||
{
|
||||
public:
|
||||
NotificationStrategy()
|
||||
NotificationStrategy()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~NotificationStrategy()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
virtual void notify(const void* sender, TArgs& arguments) = 0;
|
||||
/// Sends a notification to all registered delegates,
|
||||
virtual void notify(const void* sender, TArgs& arguments) = 0;
|
||||
/// Sends a notification to all registered delegates.
|
||||
|
||||
virtual void add(const TDelegate& pDelegate) = 0;
|
||||
/// Adds a delegate to the strategy, if the delegate is not yet present
|
||||
virtual void add(const TDelegate& pDelegate) = 0;
|
||||
/// Adds a delegate to the strategy, if the delegate is not yet present
|
||||
|
||||
virtual void remove(const TDelegate& pDelegate) = 0;
|
||||
/// Removes a delegate from the strategy if found.
|
||||
virtual void remove(const TDelegate& delegate) = 0;
|
||||
/// Removes a delegate from the strategy, if found.
|
||||
/// Does nothing if the delegate has not been added.
|
||||
|
||||
virtual void clear() = 0;
|
||||
/// Removes all delegates from the strategy.
|
||||
virtual void clear() = 0;
|
||||
/// Removes all delegates from the strategy.
|
||||
|
||||
virtual bool empty() const = 0;
|
||||
/// Returns false if the strategy contains at least one delegate.
|
||||
@ -82,4 +84,4 @@ public:
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Foundation_NotificationStrategy_INCLUDED
|
||||
|
Loading…
x
Reference in New Issue
Block a user