comparison 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
comparison
equal deleted inserted replaced
1309:1f877e0846fe 1310:9bea7e15b519
32 #include <string> 32 #include <string>
33 #include <vector> 33 #include <vector>
34 34
35 namespace OrthancStone 35 namespace OrthancStone
36 { 36 {
37 #if ORTHANC_ENABLE_WASM == 1 37 class ILoadersContext;
38 class WebAssemblyOracle;
39 #else
40 class ThreadedOracle;
41 #endif
42 } 38 }
43 39
44 namespace Deprecated 40 namespace Deprecated
45 { 41 {
46 class LoaderCache 42 class LoaderCache
47 { 43 {
48 public: 44 public:
49 #if ORTHANC_ENABLE_WASM == 1 45 LoaderCache(OrthancStone::ILoadersContext& loadersContext);
50 LoaderCache(OrthancStone::WebAssemblyOracle& oracle);
51 #else
52 LoaderCache(OrthancStone::ThreadedOracle& oracle, LockingEmitter& lockingEmitter);
53 #endif
54 46
55 boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> 47 boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader>
56 GetSeriesVolumeProgressiveLoader (std::string seriesUuid); 48 GetSeriesVolumeProgressiveLoader (std::string seriesUuid);
57 49
58 boost::shared_ptr<OrthancStone::DicomVolumeImageMPRSlicer> 50 boost::shared_ptr<OrthancStone::DicomVolumeImageMPRSlicer>
78 void ClearCache(); 70 void ClearCache();
79 71
80 private: 72 private:
81 73
82 void DebugDisplayObjRefCounts(); 74 void DebugDisplayObjRefCounts();
83 #if ORTHANC_ENABLE_WASM == 1 75
84 OrthancStone::WebAssemblyOracle& oracle_; 76 OrthancStone::ILoadersContext& loadersContext_;
85 #else
86 OrthancStone::ThreadedOracle& oracle_;
87 LockingEmitter& lockingEmitter_;
88 #endif
89 77
90 std::map<std::string, boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> > 78 std::map<std::string, boost::shared_ptr<OrthancSeriesVolumeProgressiveLoader> >
91 seriesVolumeProgressiveLoaders_; 79 seriesVolumeProgressiveLoaders_;
92 std::map<std::string, boost::shared_ptr<OrthancMultiframeVolumeLoader> > 80 std::map<std::string, boost::shared_ptr<OrthancMultiframeVolumeLoader> >
93 multiframeVolumeLoaders_; 81 multiframeVolumeLoaders_;