comparison Framework/Deprecated/Loaders/DicomStructureSetLoader.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
comparison
equal deleted inserted replaced
1313:f30905f5d246 1314:9b126de2cde2
67 67
68 Changing this value directly affects the rendering 68 Changing this value directly affects the rendering
69 */ 69 */
70 std::vector<bool> structureVisibility_; 70 std::vector<bool> structureVisibility_;
71 71
72 protected:
73 DicomStructureSetLoader(OrthancStone::ILoadersContext& loadersContext);
74
72 public: 75 public:
73 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresReady, DicomStructureSetLoader); 76 ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(__FILE__, __LINE__, StructuresReady, DicomStructureSetLoader);
74 77
75 DicomStructureSetLoader(OrthancStone::ILoadersContext& loadersContext); 78 static boost::shared_ptr<DicomStructureSetLoader> Create(
76 79 OrthancStone::ILoadersContext& loadersContext);
80
77 OrthancStone::DicomStructureSet* GetContent() 81 OrthancStone::DicomStructureSet* GetContent()
78 { 82 {
79 return content_.get(); 83 return content_.get();
80 } 84 }
81 85