mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 19:25:53 +02:00
sources for 1.3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// AbstractEvent.h
|
||||
//
|
||||
// $Id: //poco/1.2/Foundation/include/Poco/AbstractEvent.h#3 $
|
||||
// $Id: //poco/1.3/Foundation/include/Poco/AbstractEvent.h#1 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Events
|
||||
@@ -76,12 +76,15 @@ class AbstractEvent
|
||||
/// ...
|
||||
/// };
|
||||
///
|
||||
/// Throwing the event can be done either by the events notify or notifyAsync method:
|
||||
/// Throwing the event can be done either by the events notify() or notifyAsync() method:
|
||||
///
|
||||
///
|
||||
/// Alternatively, instead of notify(), operator () can be used.
|
||||
///
|
||||
/// void MyData::setAge(int i)
|
||||
/// {
|
||||
/// this->_age = i;
|
||||
/// AgeChanged.notify(this, this->_age);
|
||||
/// AgeChanged(this, this->_age);
|
||||
/// }
|
||||
///
|
||||
/// Note that notify and notifyAsync do not catch exceptions, i.e. in case a delegate
|
||||
@@ -171,6 +174,11 @@ public:
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
_strategy.remove(aDelegate);
|
||||
}
|
||||
|
||||
void operator () (const void* pSender, TArgs& args)
|
||||
{
|
||||
notify(pSender, args);
|
||||
}
|
||||
|
||||
void notify(const void* pSender, TArgs& args)
|
||||
/// Sends a notification to all registered delegates. The order is
|
||||
|
Reference in New Issue
Block a user