Mercurial > hg > orthanc-stone
changeset 2304:cb959d9a539a refactoring
renamed New::IOracle as IOracle
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Sun, 27 Sep 2026 12:16:39 +0200 |
| parents | a683376c19f0 |
| children | 62b1a4463d11 |
| files | Applications/Samples/Sdl/SingleFrameViewer/SdlSimpleViewer.cpp Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewer.cpp Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp OrthancStone/Sources/Oracle/IOracle.h OrthancStone/Sources/Oracle/ThreadedOracle.h OrthancStone/Sources/Platforms/WebAssembly/WebAssemblyOracle.h OrthancStone/Sources/StoneApplication.cpp OrthancStone/Sources/StoneApplication.h |
| diffstat | 9 files changed, 12 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Samples/Sdl/SingleFrameViewer/SdlSimpleViewer.cpp Sun Sep 27 12:12:11 2026 +0200 +++ b/Applications/Samples/Sdl/SingleFrameViewer/SdlSimpleViewer.cpp Sun Sep 27 12:16:39 2026 +0200 @@ -310,7 +310,7 @@ { // TODO Refactoring OrthancStone::IEnvironment& environment = OrthancStone::StoneApplication::GetInstance().GetEnvironment(); - OrthancStone::New::IOracle& oracle = OrthancStone::StoneApplication::GetInstance().GetOracle(); + OrthancStone::IOracle& oracle = OrthancStone::StoneApplication::GetInstance().GetOracle(); oracle.Submit(environment, toto_, new OrthancStone::SleepOracleCommand(1000));
--- a/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp Sun Sep 27 12:12:11 2026 +0200 +++ b/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp Sun Sep 27 12:16:39 2026 +0200 @@ -156,7 +156,8 @@ configuration.SetDicomCacheSize(128 * 1024 * 1024); // 128MB OrthancStone::StoneApplication::Initialize(configuration); - loadersContext_.reset(new WebAssemblyLoadersContext(configuration, 1, 4, 1)); + + loadersContext_.reset(new WebAssemblyLoadersContext(1, 4, 1)); // we are in WASM --> downcast to concrete type boost::shared_ptr<WebAssemblyLoadersContext> loadersContext =
--- a/Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewer.cpp Sun Sep 27 12:12:11 2026 +0200 +++ b/Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewer.cpp Sun Sep 27 12:16:39 2026 +0200 @@ -97,7 +97,7 @@ configuration.SetDicomCacheSize(128 * 1024 * 1024); // 128MB OrthancStone::StoneApplication::Initialize(configuration); - context_.reset(new OrthancStone::WebAssemblyLoadersContext(configuration, 1, 4, 1)); + context_.reset(new OrthancStone::WebAssemblyLoadersContext(1, 4, 1)); DISPATCH_JAVASCRIPT_EVENT("WasmModuleInitialized"); }
--- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Sun Sep 27 12:12:11 2026 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Sun Sep 27 12:16:39 2026 +0200 @@ -4985,7 +4985,7 @@ { OrthancStone::IEnvironment& environment = OrthancStone::StoneApplication::GetInstance().GetEnvironment(); - OrthancStone::New::IOracle& oracle = OrthancStone::StoneApplication::GetInstance().GetOracle(); + OrthancStone::IOracle& oracle = OrthancStone::StoneApplication::GetInstance().GetOracle(); oracle.Submit(environment, toto_, new OrthancStone::SleepOracleCommand(2000));
--- a/OrthancStone/Sources/Oracle/IOracle.h Sun Sep 27 12:12:11 2026 +0200 +++ b/OrthancStone/Sources/Oracle/IOracle.h Sun Sep 27 12:16:39 2026 +0200 @@ -41,28 +41,8 @@ { } - /** - * Returns "true" iff the command has actually been queued. If - * "false" is returned, the command has been freed, and it won't - * be processed (this is the case if the oracle is stopped). - **/ - virtual bool Schedule(boost::shared_ptr<IObserver> receiver, - IOracleCommand* command) = 0; // Takes ownership + virtual void Submit(IEnvironment& environment, + const boost::shared_ptr<IOracleClient>& client, + IOracleCommand* command /* takes ownership */) = 0; }; - - - namespace New - { - class IOracle : public boost::noncopyable - { - public: - virtual ~IOracle() - { - } - - virtual void Submit(IEnvironment& environment, - const boost::shared_ptr<IOracleClient>& client, - IOracleCommand* command /* takes ownership */) = 0; - }; - } }
--- a/OrthancStone/Sources/Oracle/ThreadedOracle.h Sun Sep 27 12:12:11 2026 +0200 +++ b/OrthancStone/Sources/Oracle/ThreadedOracle.h Sun Sep 27 12:16:39 2026 +0200 @@ -53,7 +53,7 @@ namespace OrthancStone { - class ThreadedOracle : public ::OrthancStone::New::IOracle + class ThreadedOracle : public IOracle { private: class GenericRunnable;
--- a/OrthancStone/Sources/Platforms/WebAssembly/WebAssemblyOracle.h Sun Sep 27 12:12:11 2026 +0200 +++ b/OrthancStone/Sources/Platforms/WebAssembly/WebAssemblyOracle.h Sun Sep 27 12:16:39 2026 +0200 @@ -52,7 +52,7 @@ namespace OrthancStone { - class WebAssemblyOracle : public New::IOracle + class WebAssemblyOracle : public IOracle { private: typedef std::map<std::string, std::string> HttpHeaders;
--- a/OrthancStone/Sources/StoneApplication.cpp Sun Sep 27 12:12:11 2026 +0200 +++ b/OrthancStone/Sources/StoneApplication.cpp Sun Sep 27 12:16:39 2026 +0200 @@ -258,7 +258,7 @@ } - New::IOracle& StoneApplication::GetOracle() + IOracle& StoneApplication::GetOracle() { assert(pimpl_ != NULL); return pimpl_->GetOracle();
