Mercurial > hg > orthanc-databases
annotate Framework/Common/DatabasesEnumerations.cpp @ 385:346fe629d638 db-protobuf
clarifying types of since/limit
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 03 Apr 2023 11:19:19 +0200 |
parents | 16aac0287485 |
children | 3d6886f3e5b3 |
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 |
359
16aac0287485
copyright upgraded to 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
299
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
16aac0287485
copyright upgraded to 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
299
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
299
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * 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
|
9 * 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
|
10 * 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
|
11 * the License, or (at your option) any later version. |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * 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
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * Affero General Public License for more details. |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * 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
|
19 * 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
|
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 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 #include "DatabasesEnumerations.h" |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 #include <OrthancException.h> |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 namespace OrthancDatabases |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 { |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 const char* EnumerationToString(ValueType type) |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 { |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 switch (type) |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 { |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 case ValueType_BinaryString: |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 return "BinaryString"; |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 case ValueType_InputFile: |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 return "InputFile"; |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 case ValueType_Integer64: |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 return "Integer64"; |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 case ValueType_Null: |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 return "Null"; |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 case ValueType_ResultFile: |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 return "ResultFile"; |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 case ValueType_Utf8String: |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 return "Utf8String"; |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 default: |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); |
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 } |
70685295a373
added OrthancDatabases::EnumerationToString(ValueType)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 } |