]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Dispatcher.hh
no more useless singleton class
[chaz/yoink] / src / Moof / Dispatcher.hh
index 5747f8581ddbc3622eed9be8ce5c3f0eebd03293..a152691a8184d170d62890df2fb72dbc51959dc2 100644 (file)
 
 #include <string>
 
-#include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
-
-#include <Moof/Singleton.hh>
+#include <boost/shared_ptr.hpp>
 
 
 namespace Mf {
@@ -55,13 +53,17 @@ public:
  * Dispatcher of notifications to interested parties.
  */
 
-class Dispatcher : public Singleton<Dispatcher>
+class Dispatcher
 {
 public:
        typedef void* Handler;
        typedef boost::function<void(const Notification*)> Function;
 
        Dispatcher();
+       ~Dispatcher();
+
+       // get global instance
+       static Dispatcher& getInstance();
 
        Handler addHandler(const std::string& message, const Function& callback);
        Handler addHandler(const std::string& message, const Function& callback,
This page took 0.018755 seconds and 4 git commands to generate.