Mercurial > hg > orthanc-stone
diff Applications/BasicApplicationContext.h @ 221:d7b2590744f8 am
wip: building applications reusable in SDL and WASM
author | am@osimis.io |
---|---|
date | Mon, 11 Jun 2018 14:01:02 +0200 |
parents | fccffbf99ba1 |
children | 84844649a8fd |
line wrap: on
line diff
--- a/Applications/BasicApplicationContext.h Fri Jun 08 14:41:45 2018 +0200 +++ b/Applications/BasicApplicationContext.h Mon Jun 11 14:01:02 2018 +0200 @@ -35,19 +35,14 @@ class BasicApplicationContext : public boost::noncopyable { private: - typedef std::list<ISlicedVolume*> SlicedVolumes; - typedef std::list<IVolumeLoader*> VolumeLoaders; - typedef std::list<IWorldSceneInteractor*> Interactors; static void UpdateThread(BasicApplicationContext* that); + Oracle oracle_; OracleWebService webService_; boost::mutex viewportMutex_; - WidgetViewport viewport_; - SlicedVolumes slicedVolumes_; - VolumeLoaders volumeLoaders_; - Interactors interactors_; + WidgetViewport centralViewport_; boost::thread updateThread_; bool stopped_; unsigned int updateDelay_; @@ -62,7 +57,7 @@ public: ViewportLocker(BasicApplicationContext& that) : lock_(that.viewportMutex_), - viewport_(that.viewport_) + viewport_(that.centralViewport_) { } @@ -75,7 +70,7 @@ BasicApplicationContext(Orthanc::WebServiceParameters& orthanc); - ~BasicApplicationContext(); + virtual ~BasicApplicationContext() {} IWidget& SetCentralWidget(IWidget* widget); // Takes ownership @@ -84,12 +79,6 @@ return webService_; } - ISlicedVolume& AddSlicedVolume(ISlicedVolume* volume); - - IVolumeLoader& AddVolumeLoader(IVolumeLoader* loader); - - IWorldSceneInteractor& AddInteractor(IWorldSceneInteractor* interactor); - void Start(); void Stop();