Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
89:f244018a4e4b | 90:64e60018943f |
---|---|
34 public: | 34 public: |
35 virtual ~IObserver() | 35 virtual ~IObserver() |
36 { | 36 { |
37 } | 37 } |
38 | 38 |
39 // Triggered as soon as the source has enough information to | |
40 // answer to "GetExtent()" | |
41 virtual void NotifyGeometryReady(const ILayerSource& source) = 0; | |
42 | |
43 virtual void NotifyGeometryError(const ILayerSource& source) = 0; | |
44 | |
39 // Triggered if the content of several slices in the source | 45 // Triggered if the content of several slices in the source |
40 // volume has changed | 46 // volume has changed |
41 virtual void NotifyContentChange(const ILayerSource& source) = 0; | 47 virtual void NotifyContentChange(const ILayerSource& source) = 0; |
42 | 48 |
43 // Triggered if the content of some individual slice in the | 49 // Triggered if the content of some individual slice in the |
46 const Slice& slice) = 0; | 52 const Slice& slice) = 0; |
47 | 53 |
48 // The layer must be deleted by the observer. "layer" will never | 54 // The layer must be deleted by the observer. "layer" will never |
49 // be "NULL", otherwise "NotifyLayerError()" would have been | 55 // be "NULL", otherwise "NotifyLayerError()" would have been |
50 // called. | 56 // called. |
51 virtual void NotifyLayerReady(ILayerRenderer *layer, | 57 virtual void NotifyLayerReady(std::auto_ptr<ILayerRenderer>& layer, |
52 const ILayerSource& source, | 58 const ILayerSource& source, |
53 const Slice& slice) = 0; | 59 const Slice& slice) = 0; |
54 | 60 |
55 virtual void NotifyLayerError(const ILayerSource& source, | 61 virtual void NotifyLayerError(const ILayerSource& source, |
56 const SliceGeometry& slice) = 0; | 62 const SliceGeometry& slice) = 0; |
58 | 64 |
59 virtual ~ILayerSource() | 65 virtual ~ILayerSource() |
60 { | 66 { |
61 } | 67 } |
62 | 68 |
63 virtual void SetObserver(IObserver& observer) = 0; | 69 virtual void Register(IObserver& observer) = 0; |
64 | 70 |
65 virtual bool GetExtent(double& x1, | 71 virtual bool GetExtent(double& x1, |
66 double& y1, | 72 double& y1, |
67 double& x2, | 73 double& x2, |
68 double& y2, | 74 double& y2, |