Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/LayerHolder.h @ 818:e42b491f1fb2
Removed typedefs to shared_ptr by making them explicit. Removed using namespace
directives to make usage more explicit, too.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 29 May 2019 10:51:28 +0200 |
parents | 07adcffba38c |
children | 0aff28f15ea2 |
comparison
equal
deleted
inserted
replaced
817:68f888812af4 | 818:e42b491f1fb2 |
---|---|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | 19 **/ |
20 | 20 |
21 #pragma once | 21 #pragma once |
22 | 22 |
23 #include "PointerTypes.h" | 23 #include "PredeclaredTypes.h" |
24 | |
24 #include "boost/noncopyable.hpp" | 25 #include "boost/noncopyable.hpp" |
26 #include "boost/weak_ptr.hpp" | |
27 #include "boost/shared_ptr.hpp" | |
25 | 28 |
26 namespace OrthancStone | 29 namespace OrthancStone |
27 { | 30 { |
28 class PolylineSceneLayer; | 31 class PolylineSceneLayer; |
29 class TextSceneLayer; | 32 class TextSceneLayer; |
38 /** | 41 /** |
39 This ctor merely stores the scene and layer counts. No layer creation | 42 This ctor merely stores the scene and layer counts. No layer creation |
40 performed at this time | 43 performed at this time |
41 */ | 44 */ |
42 LayerHolder( | 45 LayerHolder( |
43 ViewportControllerWPtr controllerW, | 46 boost::weak_ptr<ViewportController> controllerW, |
44 int polylineLayerCount, int textLayerCount); | 47 int polylineLayerCount, int textLayerCount); |
45 | 48 |
46 /** | 49 /** |
47 This actually creates the layers | 50 This actually creates the layers |
48 */ | 51 */ |
84 TextSceneLayer* GetTextLayer(int index = 0); | 87 TextSceneLayer* GetTextLayer(int index = 0); |
85 | 88 |
86 private: | 89 private: |
87 int GetPolylineLayerIndex(int index = 0); | 90 int GetPolylineLayerIndex(int index = 0); |
88 int GetTextLayerIndex(int index = 0); | 91 int GetTextLayerIndex(int index = 0); |
89 Scene2DPtr GetScene(); | 92 boost::shared_ptr<Scene2D> GetScene(); |
90 | 93 |
91 int textLayerCount_; | 94 int textLayerCount_; |
92 int polylineLayerCount_; | 95 int polylineLayerCount_; |
93 ViewportControllerWPtr controllerW_; | 96 boost::weak_ptr<ViewportController> controllerW_; |
94 int baseLayerIndex_; | 97 int baseLayerIndex_; |
95 }; | 98 }; |
96 | |
97 typedef boost::shared_ptr<LayerHolder> LayerHolderPtr; | |
98 } | 99 } |
99 | 100 |