comparison Applications/StoneApplicationContext.cpp @ 726:4f2416d519b4

moving layers, widgets and loaders to Deprecated namespace
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 21 May 2019 11:43:25 +0200
parents b70e9be013e4
children b537002f83a9 2d8ab34c8c91
comparison
equal deleted inserted replaced
714:d2c0e347ddc2 726:4f2416d519b4
30 if (webService_ == NULL) 30 if (webService_ == NULL)
31 { 31 {
32 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 32 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
33 } 33 }
34 34
35 orthanc_.reset(new OrthancApiClient(broker_, *webService_, orthancBaseUrl_)); 35 orthanc_.reset(new Deprecated::OrthancApiClient(broker_, *webService_, orthancBaseUrl_));
36 } 36 }
37 37
38 38
39 IWebService& StoneApplicationContext::GetWebService() 39 Deprecated::IWebService& StoneApplicationContext::GetWebService()
40 { 40 {
41 if (webService_ == NULL) 41 if (webService_ == NULL)
42 { 42 {
43 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 43 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
44 } 44 }
45 45
46 return *webService_; 46 return *webService_;
47 } 47 }
48 48
49 49
50 OrthancApiClient& StoneApplicationContext::GetOrthancApiClient() 50 Deprecated::OrthancApiClient& StoneApplicationContext::GetOrthancApiClient()
51 { 51 {
52 if (orthanc_.get() == NULL) 52 if (orthanc_.get() == NULL)
53 { 53 {
54 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 54 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
55 } 55 }
56 56
57 return *orthanc_; 57 return *orthanc_;
58 } 58 }
59 59
60 60
61 void StoneApplicationContext::SetWebService(IWebService& webService) 61 void StoneApplicationContext::SetWebService(Deprecated::IWebService& webService)
62 { 62 {
63 webService_ = &webService; 63 webService_ = &webService;
64 InitializeOrthanc(); 64 InitializeOrthanc();
65 } 65 }
66 66