annotate Framework/Common/DatabasesEnumerations.cpp @ 322:7e9622c64c40

compatibility with Orthanc framework < 1.9.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Jul 2021 15:52:15 +0200
parents 70685295a373
children 16aac0287485
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
299
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #include "DatabasesEnumerations.h"
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include <OrthancException.h>
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 namespace OrthancDatabases
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 {
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 const char* EnumerationToString(ValueType type)
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 {
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 switch (type)
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 case ValueType_BinaryString:
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 return "BinaryString";
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 case ValueType_InputFile:
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 return "InputFile";
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 case ValueType_Integer64:
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 return "Integer64";
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 case ValueType_Null:
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 return "Null";
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 case ValueType_ResultFile:
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 return "ResultFile";
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 case ValueType_Utf8String:
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 return "Utf8String";
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 default:
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 }
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 }
70685295a373 added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 }