Mercurial > hg > orthanc
diff OrthancServer/ServerEnumerations.cpp @ 624:b58d65608949
integration find-move-scp -> mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Oct 2013 12:42:38 +0200 |
parents | 4aa6f0d79947 |
children | 08eca5d86aad |
line wrap: on
line diff
--- a/OrthancServer/ServerEnumerations.cpp Fri Oct 25 10:36:06 2013 +0200 +++ b/OrthancServer/ServerEnumerations.cpp Fri Oct 25 12:42:38 2013 +0200 @@ -33,6 +33,7 @@ #include "../Core/OrthancException.h" #include "../Core/EnumerationDictionary.h" +#include "../Core/Toolbox.h" #include <boost/thread.hpp> @@ -82,27 +83,6 @@ return dictMetadataType_.Translate(str); } - const char* EnumerationToString(ResourceType type) - { - switch (type) - { - case ResourceType_Patient: - return "Patient"; - - case ResourceType_Study: - return "Study"; - - case ResourceType_Series: - return "Series"; - - case ResourceType_Instance: - return "Instance"; - - default: - throw OrthancException(ErrorCode_ParameterOutOfRange); - } - } - std::string GetBasePath(ResourceType type, const std::string& publicId) { @@ -274,6 +254,38 @@ } + const char* EnumerationToString(DicomRequestType type) + { + switch (type) + { + case DicomRequestType_Echo: + return "Echo"; + break; + + case DicomRequestType_Find: + return "Find"; + break; + + case DicomRequestType_Get: + return "Get"; + break; + + case DicomRequestType_Move: + return "Move"; + break; + + case DicomRequestType_Store: + return "Store"; + break; + + + default: + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + } + + + ModalityManufacturer StringToModalityManufacturer(const std::string& manufacturer) { if (manufacturer == "Generic") @@ -289,6 +301,4 @@ throw OrthancException(ErrorCode_ParameterOutOfRange); } } - - }