trunk/branch integration: Inflating/Deflating update, test updates, NotificationCenter update

This commit is contained in:
Marian Krivos
2011-08-23 09:55:09 +00:00
parent a360bf900f
commit 60050ce87a
41 changed files with 4034 additions and 548 deletions

View File

@@ -43,7 +43,9 @@
#include "Poco/Foundation.h"
#include "Poco/Notification.h"
#include "Poco/Mutex.h"
#include <list>
#include "Poco/SharedPtr.h"
#include <vector>
#include <cstddef>
namespace Poco {
@@ -131,18 +133,22 @@ public:
bool hasObservers() const;
/// Returns true iff there is at least one registered observer.
///
/// Can be used to improve performance if an expensive notification
/// shall only be created and posted if there are any observers.
static NotificationCenter& defaultCenter();
/// Returns a reference to the default
/// NotificationCenter.
/// Can be used to improve performance if an expensive notification
/// shall only be created and posted if there are any observers.
std::size_t countObservers() const;
/// Returns the number of registered observers.
static NotificationCenter& defaultCenter();
/// Returns a reference to the default
/// NotificationCenter.
private:
typedef std::list<AbstractObserver*> ObserverList;
typedef SharedPtr<AbstractObserver> AbstractObserverPtr;
typedef std::vector<AbstractObserverPtr> ObserverList;
ObserverList _observers;
mutable Mutex _mutex;
ObserverList _observers;
mutable Mutex _mutex;
};