Mercurial > hg > orthanc-stone
comparison Applications/StoneApplicationContext.cpp @ 417:aee3d7941c9b
preparing to load images using DICOMweb
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 15 Nov 2018 17:28:15 +0100 |
parents | 8c8da145fefa |
children | c23df8b3433b |
comparison
equal
deleted
inserted
replaced
415:c0589c3173fd | 417:aee3d7941c9b |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #include "StoneApplicationContext.h" | 22 #include "StoneApplicationContext.h" |
23 | 23 |
24 #include <Core/OrthancException.h> | |
25 | |
24 namespace OrthancStone | 26 namespace OrthancStone |
25 { | 27 { |
28 IWebService& StoneApplicationContext::GetWebService() | |
29 { | |
30 if (webService_ == NULL) | |
31 { | |
32 throw Orthanc::ErrorCode_BadSequenceOfCalls; | |
33 } | |
34 | |
35 return *webService_; | |
36 } | |
37 | |
38 OrthancApiClient& StoneApplicationContext::GetOrthancApiClient() | |
39 { | |
40 if (orthanc_.get() == NULL) | |
41 { | |
42 throw Orthanc::ErrorCode_BadSequenceOfCalls; | |
43 } | |
44 | |
45 return *orthanc_; | |
46 } | |
47 | |
48 void StoneApplicationContext::Initialize(MessageBroker& broker, | |
49 IWebService& webService, | |
50 const std::string& orthancBaseUrl) | |
51 { | |
52 webService_ = &webService; | |
53 orthanc_.reset(new OrthancApiClient(broker, webService, orthancBaseUrl)); | |
54 } | |
26 } | 55 } |