changeset 3532:e4b4b4dbef99

merge
author Alain Mazy <alain@mazy.be>
date Thu, 03 Oct 2019 13:44:08 +0200
parents 877aff48ebb8 (current diff) b26b6ea27648 (diff)
children 2090ec6a83a5
files
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Enumerations.cpp	Thu Oct 03 13:43:33 2019 +0200
+++ b/Core/Enumerations.cpp	Thu Oct 03 13:44:08 2019 +0200
@@ -1141,6 +1141,25 @@
   }
   
 
+  const char* EnumerationToString(Endianness endianness)
+  {
+    switch (endianness)
+    {
+      case Endianness_Little:
+        return "Little-endian";
+
+      case Endianness_Big:
+        return "Big-endian";
+
+      case Endianness_Unknown:
+        return "Unknown endianness";
+                
+      default:
+        throw OrthancException(ErrorCode_ParameterOutOfRange);
+    }
+  }
+
+
   Encoding StringToEncoding(const char* encoding)
   {
     std::string s(encoding);
--- a/Core/Enumerations.h	Thu Oct 03 13:43:33 2019 +0200
+++ b/Core/Enumerations.h	Thu Oct 03 13:44:08 2019 +0200
@@ -749,6 +749,8 @@
 
   const char* EnumerationToString(MimeType mime);
 
+  const char* EnumerationToString(Endianness endianness);
+
   Encoding StringToEncoding(const char* encoding);
 
   ResourceType StringToResourceType(const char* type);