diff Framework/Radiography/RadiographyScene.h @ 643:f0008c55e5f7

getting rid of MessageType enumeration
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 10 May 2019 17:34:48 +0200
parents 848170ca4351
children 63982c8c294a
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyScene.h	Fri May 10 14:54:03 2019 +0200
+++ b/Framework/Radiography/RadiographyScene.h	Fri May 10 17:34:48 2019 +0200
@@ -37,9 +37,10 @@
       public IObservable
   {
   public:
-    class GeometryChangedMessage :
-        public OriginMessage<MessageType_RadiographyScene_GeometryChanged, RadiographyScene>
+    class GeometryChangedMessage : public OriginMessage<RadiographyScene>
     {
+      ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
+
     private:
       RadiographyLayer&        layer_;
 
@@ -57,9 +58,10 @@
       }
     };
 
-    class ContentChangedMessage :
-        public OriginMessage<MessageType_RadiographyScene_ContentChanged, RadiographyScene>
+    class ContentChangedMessage : public OriginMessage<RadiographyScene>
     {
+      ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
+
     private:
       RadiographyLayer&        layer_;
 
@@ -77,9 +79,10 @@
       }
     };
 
-    class LayerEditedMessage :
-        public OriginMessage<MessageType_RadiographyScene_LayerEdited, RadiographyScene>
+    class LayerEditedMessage : public OriginMessage<RadiographyScene>
     {
+      ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
+
     private:
       const RadiographyLayer&        layer_;
 
@@ -95,20 +98,12 @@
       {
         return layer_;
       }
-
     };
 
-    class WindowingChangedMessage :
-        public OriginMessage<MessageType_RadiographyScene_WindowingChanged, RadiographyScene>
-    {
 
-    public:
-      WindowingChangedMessage(const RadiographyScene& origin) :
-        OriginMessage(origin)
-      {
-      }
-    };
+    ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, WindowingChangedMessage, RadiographyScene);
 
+    
     class LayerAccessor : public boost::noncopyable
     {
     private: