Mercurial > hg > orthanc-databases
comparison Framework/Common/DatabasesEnumerations.cpp @ 299:70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 01 Jul 2021 16:25:41 +0200 |
parents | |
children | 16aac0287485 |
comparison
equal
deleted
inserted
replaced
298:8f655f308de9 | 299:70685295a373 |
---|---|
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-2021 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #include "DatabasesEnumerations.h" | |
23 | |
24 #include <OrthancException.h> | |
25 | |
26 namespace OrthancDatabases | |
27 { | |
28 const char* EnumerationToString(ValueType type) | |
29 { | |
30 switch (type) | |
31 { | |
32 case ValueType_BinaryString: | |
33 return "BinaryString"; | |
34 | |
35 case ValueType_InputFile: | |
36 return "InputFile"; | |
37 | |
38 case ValueType_Integer64: | |
39 return "Integer64"; | |
40 | |
41 case ValueType_Null: | |
42 return "Null"; | |
43 | |
44 case ValueType_ResultFile: | |
45 return "ResultFile"; | |
46 | |
47 case ValueType_Utf8String: | |
48 return "Utf8String"; | |
49 | |
50 default: | |
51 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | |
52 } | |
53 } | |
54 } |