diff Framework/Layers/ILayerSource.h @ 380:ba5ad93f935a

ILayerSource::LayerErrorMessage
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Nov 2018 14:59:20 +0100
parents 2308fe0b0b05
children 19bd222283ae
line wrap: on
line diff
--- a/Framework/Layers/ILayerSource.h	Tue Nov 06 14:41:36 2018 +0100
+++ b/Framework/Layers/ILayerSource.h	Tue Nov 06 14:59:20 2018 +0100
@@ -60,20 +60,16 @@
     class LayerReadyMessage : public OriginMessage<MessageType_LayerSource_LayerReady, ILayerSource>
     {
     private:
-      std::auto_ptr<ILayerRenderer> renderer_;
-      const CoordinateSystem3D& slice_;
-      bool isError_;
+      std::auto_ptr<ILayerRenderer>  renderer_;
+      const CoordinateSystem3D&      slice_;
 
     public:
       LayerReadyMessage(ILayerSource& origin,
                         ILayerRenderer* renderer,  // Takes ownership => TODO Remove this!
-                        const CoordinateSystem3D& slice,
-                        bool isError  // TODO => create NotifyLayerError
-                        ) :
+                        const CoordinateSystem3D& slice) :
         OriginMessage(origin),
         renderer_(renderer),
-        slice_(slice),
-        isError_(isError)
+        slice_(slice)
       {
       }
 
@@ -92,10 +88,25 @@
       {
         return slice_;
       }
+    };
 
-      bool IsError() const
+
+    class LayerErrorMessage : public OriginMessage<MessageType_LayerSource_LayerError, ILayerSource>
+    {
+    private:
+      const CoordinateSystem3D&  slice_;
+
+    public:
+      LayerErrorMessage(ILayerSource& origin,
+                        const CoordinateSystem3D& slice) :
+        OriginMessage(origin),
+        slice_(slice)
       {
-        return isError_;
+      }
+
+      const CoordinateSystem3D& GetSlice() const
+      {
+        return slice_;
       }
     };