diff Framework/Deprecated/Loaders/LoaderCache.h @ 1310:9bea7e15b519 broker

- first pass at changes to cope with the refactoring of the loading system - global loader-related data accessible through ILoadersContext::ILock - many changes in legacy loaders (CT, RTSTRUCT, DOSE) + loader cache - NOT FINISHED! there are shared_from_this calls in ctors! this will crash!
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 09 Mar 2020 14:53:22 +0100
parents 7ec8fea061b9
children
line wrap: on
line diff
--- a/Framework/Deprecated/Loaders/LoaderCache.h	Wed Mar 04 13:20:12 2020 +0100
+++ b/Framework/Deprecated/Loaders/LoaderCache.h	Mon Mar 09 14:53:22 2020 +0100
@@ -34,11 +34,7 @@
 
 namespace OrthancStone
 {
-#if ORTHANC_ENABLE_WASM == 1
-  class WebAssemblyOracle;
-#else
-  class ThreadedOracle;
-#endif
+  class ILoadersContext;
 }
 
 namespace Deprecated
@@ -46,11 +42,7 @@
   class LoaderCache
   {
   public:
-#if ORTHANC_ENABLE_WASM == 1
-    LoaderCache(OrthancStone::WebAssemblyOracle& oracle);
-#else
-    LoaderCache(OrthancStone::ThreadedOracle& oracle, LockingEmitter& lockingEmitter);
-#endif
+    LoaderCache(OrthancStone::ILoadersContext& loadersContext);
 
     boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader>
       GetSeriesVolumeProgressiveLoader      (std::string seriesUuid);
@@ -80,12 +72,8 @@
   private:
     
     void DebugDisplayObjRefCounts();
-#if ORTHANC_ENABLE_WASM == 1
-    OrthancStone::WebAssemblyOracle& oracle_;
-#else
-    OrthancStone::ThreadedOracle& oracle_;
-    LockingEmitter& lockingEmitter_;
-#endif
+
+    OrthancStone::ILoadersContext& loadersContext_;
 
     std::map<std::string, boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> >
       seriesVolumeProgressiveLoaders_;