]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Dispatcher.cc
no more useless singleton class
[chaz/yoink] / src / Moof / Dispatcher.cc
index 9e652a37a8983614010cf974f92172c310caae88..7e33c270d848050caf7fe43c8a17633106928fb0 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "Dispatcher.hh"
 
+#include <iostream>
+
 
 namespace Mf {
 
@@ -97,6 +99,15 @@ struct Dispatcher::Impl
 Dispatcher::Dispatcher() :
        impl_(new Dispatcher::Impl) {}
 
+Dispatcher::~Dispatcher() {}
+
+
+Dispatcher& Dispatcher::getInstance()
+{
+       static Dispatcher dispatcher;
+       return dispatcher;
+}
+
 
 Dispatcher::Handler Dispatcher::addHandler(const std::string& message,
                const Function& callback)
This page took 0.021033 seconds and 4 git commands to generate.