Mercurial > hg > orthanc
comparison OrthancServer/ServerEnumerations.cpp @ 434:ccf3a0a43dac
EnumerationDictionary
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 May 2013 14:54:58 +0200 |
parents | 2d269089078f |
children | 28ba73274919 |
comparison
equal
deleted
inserted
replaced
433:aa50783f9550 | 434:ccf3a0a43dac |
---|---|
33 | 33 |
34 #include "../Core/OrthancException.h" | 34 #include "../Core/OrthancException.h" |
35 | 35 |
36 namespace Orthanc | 36 namespace Orthanc |
37 { | 37 { |
38 const char* ToString(ResourceType type) | 38 const char* EnumerationToString(ResourceType type) |
39 { | 39 { |
40 switch (type) | 40 switch (type) |
41 { | 41 { |
42 case ResourceType_Patient: | 42 case ResourceType_Patient: |
43 return "Patient"; | 43 return "Patient"; |
76 default: | 76 default: |
77 throw OrthancException(ErrorCode_ParameterOutOfRange); | 77 throw OrthancException(ErrorCode_ParameterOutOfRange); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 const char* ToString(SeriesStatus status) | 81 const char* EnumerationToString(SeriesStatus status) |
82 { | 82 { |
83 switch (status) | 83 switch (status) |
84 { | 84 { |
85 case SeriesStatus_Complete: | 85 case SeriesStatus_Complete: |
86 return "Complete"; | 86 return "Complete"; |
97 default: | 97 default: |
98 throw OrthancException(ErrorCode_ParameterOutOfRange); | 98 throw OrthancException(ErrorCode_ParameterOutOfRange); |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 const char* ToString(StoreStatus status) | 102 const char* EnumerationToString(StoreStatus status) |
103 { | 103 { |
104 switch (status) | 104 switch (status) |
105 { | 105 { |
106 case StoreStatus_Success: | 106 case StoreStatus_Success: |
107 return "Success"; | 107 return "Success"; |
119 throw OrthancException(ErrorCode_ParameterOutOfRange); | 119 throw OrthancException(ErrorCode_ParameterOutOfRange); |
120 } | 120 } |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 const char* ToString(ChangeType type) | 124 const char* EnumerationToString(ChangeType type) |
125 { | 125 { |
126 switch (type) | 126 switch (type) |
127 { | 127 { |
128 case ChangeType_CompletedSeries: | 128 case ChangeType_CompletedSeries: |
129 return "CompletedSeries"; | 129 return "CompletedSeries"; |