comparison Framework/Deprecated/Loaders/DicomStructureSetLoader.cpp @ 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
355 , structuresReady_(false) 355 , structuresReady_(false)
356 { 356 {
357 } 357 }
358 358
359 359
360 boost::shared_ptr<Deprecated::DicomStructureSetLoader> DicomStructureSetLoader::Create(OrthancStone::ILoadersContext& loadersContext)
361 {
362 boost::shared_ptr<DicomStructureSetLoader> obj(
363 new DicomStructureSetLoader(
364 loadersContext));
365 obj->LoaderStateMachine::PostConstructor();
366 return obj;
367
368 }
369
360 void DicomStructureSetLoader::SetStructureDisplayState(size_t structureIndex, bool display) 370 void DicomStructureSetLoader::SetStructureDisplayState(size_t structureIndex, bool display)
361 { 371 {
362 structureVisibility_.at(structureIndex) = display; 372 structureVisibility_.at(structureIndex) = display;
363 revision_++; 373 revision_++;
364 } 374 }