comparison Framework/Deprecated/Loaders/OrthancSeriesVolumeProgressiveLoader.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 9bea7e15b519
children cbfdba08e039
comparison
equal deleted inserted replaced
1313:f30905f5d246 1314:9b126de2cde2
121 std::unique_ptr<OrthancStone::IFetchingItemsSorter::IFactory> sorter_; 121 std::unique_ptr<OrthancStone::IFetchingItemsSorter::IFactory> sorter_;
122 std::unique_ptr<OrthancStone::IFetchingStrategy> strategy_; 122 std::unique_ptr<OrthancStone::IFetchingStrategy> strategy_;
123 std::vector<unsigned int> slicesQuality_; 123 std::vector<unsigned int> slicesQuality_;
124 bool volumeImageReadyInHighQuality_; 124 bool volumeImageReadyInHighQuality_;
125 125
126
127 OrthancSeriesVolumeProgressiveLoader(
128 OrthancStone::ILoadersContext& loadersContext,
129 const boost::shared_ptr<OrthancStone::DicomVolumeImage>& volume);
130
126 public: 131 public:
127 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, VolumeImageReadyInHighQuality, OrthancSeriesVolumeProgressiveLoader); 132 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, VolumeImageReadyInHighQuality, OrthancSeriesVolumeProgressiveLoader);
128 133
129 OrthancSeriesVolumeProgressiveLoader( 134 static boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> Create(
130 OrthancStone::ILoadersContext& context, 135 OrthancStone::ILoadersContext& context,
131 const boost::shared_ptr<OrthancStone::DicomVolumeImage>& volume); 136 const boost::shared_ptr<OrthancStone::DicomVolumeImage>& volume);
132 137
133 virtual ~OrthancSeriesVolumeProgressiveLoader(); 138 virtual ~OrthancSeriesVolumeProgressiveLoader();
134 139