diff Framework/Layers/ILayerSource.h @ 90:64e60018943f wasm

fix and observer refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 May 2017 11:04:18 +0200
parents f244018a4e4b
children f8bce1bebe01
line wrap: on
line diff
--- a/Framework/Layers/ILayerSource.h	Fri May 26 18:27:59 2017 +0200
+++ b/Framework/Layers/ILayerSource.h	Mon May 29 11:04:18 2017 +0200
@@ -36,6 +36,12 @@
       {
       }
 
+      // Triggered as soon as the source has enough information to
+      // answer to "GetExtent()"
+      virtual void NotifyGeometryReady(const ILayerSource& source) = 0;
+      
+      virtual void NotifyGeometryError(const ILayerSource& source) = 0;
+      
       // Triggered if the content of several slices in the source
       // volume has changed
       virtual void NotifyContentChange(const ILayerSource& source) = 0;
@@ -48,7 +54,7 @@
       // The layer must be deleted by the observer. "layer" will never
       // be "NULL", otherwise "NotifyLayerError()" would have been
       // called.
-      virtual void NotifyLayerReady(ILayerRenderer *layer,
+      virtual void NotifyLayerReady(std::auto_ptr<ILayerRenderer>& layer,
                                     const ILayerSource& source,
                                     const Slice& slice) = 0;
 
@@ -60,7 +66,7 @@
     {
     }
 
-    virtual void SetObserver(IObserver& observer) = 0;
+    virtual void Register(IObserver& observer) = 0;
 
     virtual bool GetExtent(double& x1,
                            double& y1,