comparison Applications/BasicApplicationContext.h @ 271:46c5296d867e am-2

OracleWebService and BasicSdlApplicationContext using the same global mutex
author am@osimis.io
date Thu, 23 Aug 2018 17:12:54 +0200
parents 092db46c6291
children
comparison
equal deleted inserted replaced
270:2d64f4d39610 271:46c5296d867e
19 **/ 19 **/
20 20
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "../Platforms/Generic/OracleWebService.h" 24 #include "../Framework/Toolbox/IWebService.h"
25 #include "../Framework/Viewport/WidgetViewport.h" 25 #include "../Framework/Viewport/WidgetViewport.h"
26 26
27 #include <list> 27 #include <list>
28 28
29 namespace OrthancStone 29 namespace OrthancStone
30 { 30 {
31 class BasicApplicationContext : public boost::noncopyable 31 class BasicApplicationContext : public boost::noncopyable
32 { 32 {
33 33
34 protected: 34 protected:
35 IWebService& webService_; 35 IWebService* webService_;
36 public: 36 public:
37 BasicApplicationContext(IWebService& webService) 37 BasicApplicationContext()
38 : webService_(webService) 38 : webService_(NULL)
39 { 39 {
40 } 40 }
41 41
42 virtual IWebService& GetWebService() {return webService_;} 42 IWebService& GetWebService() {return *webService_;}
43 void SetWebService(IWebService& webService)
44 {
45 webService_ = &webService;
46 }
43 // virtual IWidget& SetCentralWidget(IWidget* widget) = 0; // Takes ownership 47 // virtual IWidget& SetCentralWidget(IWidget* widget) = 0; // Takes ownership
44 48
45 virtual ~BasicApplicationContext() {} 49 virtual ~BasicApplicationContext() {}
46 }; 50 };
47 } 51 }