Mercurial > hg > orthanc-databases
comparison Framework/Plugins/MessagesToolbox.cpp @ 550:9ed9a91bde33 find-refactoring
un-sharing DatabaseConstraint and ISqlLookupFormatter with Orthanc core
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Sep 2024 15:04:48 +0200 |
parents | |
children | 1a74fc1bea2d |
comparison
equal
deleted
inserted
replaced
546:cd9766f294fa | 550:9ed9a91bde33 |
---|---|
1 /** | |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium | |
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium | |
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
8 * | |
9 * This program is free software: you can redistribute it and/or | |
10 * modify it under the terms of the GNU Affero General Public License | |
11 * as published by the Free Software Foundation, either version 3 of | |
12 * the License, or (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, but | |
15 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 * Affero General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU Affero General Public License | |
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
24 #include "MessagesToolbox.h" | |
25 | |
26 | |
27 namespace OrthancDatabases | |
28 { | |
29 namespace MessagesToolbox | |
30 { | |
31 Orthanc::ResourceType Convert(Orthanc::DatabasePluginMessages::ResourceType resourceType) | |
32 { | |
33 switch (resourceType) | |
34 { | |
35 case Orthanc::DatabasePluginMessages::RESOURCE_PATIENT: | |
36 return Orthanc::ResourceType_Patient; | |
37 | |
38 case Orthanc::DatabasePluginMessages::RESOURCE_STUDY: | |
39 return Orthanc::ResourceType_Study; | |
40 | |
41 case Orthanc::DatabasePluginMessages::RESOURCE_SERIES: | |
42 return Orthanc::ResourceType_Series; | |
43 | |
44 case Orthanc::DatabasePluginMessages::RESOURCE_INSTANCE: | |
45 return Orthanc::ResourceType_Instance; | |
46 | |
47 default: | |
48 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | |
49 } | |
50 } | |
51 } | |
52 } |