diff Framework/Messages/IObserver.h @ 393:e7a494bdd956

removed Messages/MessageType.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Nov 2018 18:30:30 +0100
parents b4abaeb783b1
children b70e9be013e4
line wrap: on
line diff
--- a/Framework/Messages/IObserver.h	Fri Nov 09 17:59:35 2018 +0100
+++ b/Framework/Messages/IObserver.h	Fri Nov 09 18:30:30 2018 +0100
@@ -23,21 +23,17 @@
 
 #include "MessageBroker.h"
 #include "IMessage.h"
-#include <set>
-#include <assert.h>
 
-namespace OrthancStone {
-
-  class IObservable;
-
+namespace OrthancStone 
+{
   class IObserver : public boost::noncopyable
   {
-  protected:
-    MessageBroker&                    broker_;
+  private:
+    MessageBroker&  broker_;
 
   public:
-    IObserver(MessageBroker& broker)
-      : broker_(broker)
+    IObserver(MessageBroker& broker) :
+      broker_(broker)
     {
       broker_.Register(*this);
     }
@@ -46,6 +42,10 @@
     {
       broker_.Unregister(*this);
     }
+
+    MessageBroker& GetBroker() const
+    {
+      return broker_;
+    }
   };
-
 }