Mercurial > hg > orthanc-stone
comparison Framework/Layers/ILayerSource.h @ 247:3d523c9a8f0d am
trying to use boost::signals2 even more.
author | am@osimis.io |
---|---|
date | Mon, 02 Jul 2018 12:32:02 +0200 |
parents | e2fe9352f240 |
children |
comparison
equal
deleted
inserted
replaced
246:5470b15f7cf2 | 247:3d523c9a8f0d |
---|---|
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "ILayerRenderer.h" | 24 #include "ILayerRenderer.h" |
25 #include "../Toolbox/Slice.h" | 25 #include "../Toolbox/Slice.h" |
26 #include <boost/shared_ptr.hpp> | |
26 | 27 |
27 namespace OrthancStone | 28 namespace OrthancStone |
28 { | 29 { |
29 class ILayerSource : public boost::noncopyable | 30 class ILayerSource : public boost::noncopyable |
30 { | 31 { |
50 // source volume has changed | 51 // source volume has changed |
51 virtual void NotifySliceChange(const ILayerSource& source, | 52 virtual void NotifySliceChange(const ILayerSource& source, |
52 const Slice& slice) = 0; | 53 const Slice& slice) = 0; |
53 | 54 |
54 // The layer must be deleted by the observer that releases the | 55 // The layer must be deleted by the observer that releases the |
55 // std::auto_ptr | 56 // std::auto_ptr // TODO: check the lifecycle of the layer since we are not using an std::auto_ptr anymore |
56 virtual void NotifyLayerReady(std::auto_ptr<ILayerRenderer>& layer, | 57 virtual void NotifyLayerReady(boost::shared_ptr<ILayerRenderer> renderer, |
57 const ILayerSource& source, | 58 const ILayerSource& source, |
58 const CoordinateSystem3D& slice, | 59 const CoordinateSystem3D& slice, |
59 bool isError) = 0; // TODO Shouldn't this be separate as NotifyLayerError? | 60 bool isError) = 0; // TODO Shouldn't this be separate as NotifyLayerError? |
60 }; | 61 }; |
61 | 62 |
62 virtual ~ILayerSource() | 63 virtual ~ILayerSource() |
63 { | 64 { |
64 } | 65 } |
65 | 66 |
66 virtual void Register(IObserver& observer) = 0; | 67 virtual void Register(boost::shared_ptr<IObserver> observer) = 0; |
67 | 68 |
68 virtual bool GetExtent(std::vector<Vector>& points, | 69 virtual bool GetExtent(std::vector<Vector>& points, |
69 const CoordinateSystem3D& viewportSlice) = 0; | 70 const CoordinateSystem3D& viewportSlice) = 0; |
70 | 71 |
71 virtual void ScheduleLayerCreation(const CoordinateSystem3D& viewportSlice) = 0; | 72 virtual void ScheduleLayerCreation(const CoordinateSystem3D& viewportSlice) = 0; |