diff OrthancServer/ServerEnumerations.cpp @ 562:f64e3838d6e1 find-move-scp

refactoring enumerations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Sep 2013 16:49:48 +0200
parents e0cfb413c86b
children 4aa6f0d79947
line wrap: on
line diff
--- a/OrthancServer/ServerEnumerations.cpp	Wed Sep 18 16:22:21 2013 +0200
+++ b/OrthancServer/ServerEnumerations.cpp	Wed Sep 18 16:49:48 2013 +0200
@@ -83,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)
   {
@@ -290,32 +269,4 @@
       throw OrthancException(ErrorCode_ParameterOutOfRange);
     }
   }
-
-
-  ResourceType StringToResourceType(const char* type)
-  {
-    std::string s(type);
-    Toolbox::ToUpperCase(s);
-
-    if (s == "PATIENT")
-    {
-      return ResourceType_Patient;
-    }
-    else if (s == "STUDY")
-    {
-      return ResourceType_Study;
-    }
-    else if (s == "SERIES")
-    {
-      return ResourceType_Series;
-    }
-    else if (s == "INSTANCE" || s == "IMAGE")
-    {
-      return ResourceType_Instance;
-    }
-    else
-    {
-      throw OrthancException(ErrorCode_ParameterOutOfRange);
-    }
-  }
 }