Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/MeasureTool.h @ 1314:9b126de2cde2 broker
Since the observer system now uses shared_ptr and many registrations are
done in the constructors, and since we cannot called shared_from_this() in
the constructors, it is mandatory to split construction from registration.
This has been done by making many ctors protected and replacing them
by factory methods that directly return shared_ptrs + added PostConstructor
method when base classes perform shared_from_this() calls too.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 16 Mar 2020 11:19:50 +0100 |
parents | a5326ce4f24b |
children | ab81ee8fce1f |
comparison
equal
deleted
inserted
replaced
1313:f30905f5d246 | 1314:9b126de2cde2 |
---|---|
113 virtual std::string GetDescription() = 0; | 113 virtual std::string GetDescription() = 0; |
114 | 114 |
115 protected: | 115 protected: |
116 MeasureTool(IViewport& viewport); | 116 MeasureTool(IViewport& viewport); |
117 | 117 |
118 void PostConstructor(); | |
119 | |
118 /** | 120 /** |
119 The measuring tool may exist in a standalone fashion, without any available | 121 The measuring tool may exist in a standalone fashion, without any available |
120 scene (because the controller is dead or dying). This call allows to check | 122 scene (because the controller is dead or dying). This call allows to check |
121 before accessing the scene. | 123 before accessing the scene. |
122 */ | 124 */ |