diff Core/Toolbox.h @ 2367:2aff870c2c58

refactoring of BoostConfiguration.cmake
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Aug 2017 17:32:13 +0200
parents 9c7a80c87ae9
children 68380777f9a6
line wrap: on
line diff
--- a/Core/Toolbox.h	Mon Aug 21 21:21:48 2017 +0200
+++ b/Core/Toolbox.h	Tue Aug 22 17:32:13 2017 +0200
@@ -45,6 +45,10 @@
 #  error The macro ORTHANC_ENABLE_BASE64 must be defined
 #endif
 
+#if !defined(ORTHANC_ENABLE_LOCALE)
+#  error The macro ORTHANC_ENABLE_LOCALE must be defined
+#endif
+
 #if !defined(ORTHANC_ENABLE_MD5)
 #  error The macro ORTHANC_ENABLE_MD5 must be defined
 #endif
@@ -53,10 +57,6 @@
 #  error The macro ORTHANC_ENABLE_PUGIXML must be defined
 #endif
 
-#if !defined(BOOST_HAS_REGEX)
-#  error The macro BOOST_HAS_REGEX must be defined
-#endif
-
 
 /**
  * NOTE: GUID vs. UUID
@@ -132,22 +132,22 @@
     void EncodeBase64(std::string& result, 
                       const std::string& data);
 
-#  if BOOST_HAS_REGEX == 1
     bool DecodeDataUriScheme(std::string& mime,
                              std::string& content,
                              const std::string& source);
-#  endif
 
     void EncodeDataUriScheme(std::string& result,
                              const std::string& mime,
                              const std::string& content);
 #endif
 
+#if ORTHANC_ENABLE_LOCALE == 1
     std::string ConvertToUtf8(const std::string& source,
                               Encoding sourceEncoding);
 
     std::string ConvertFromUtf8(const std::string& source,
                                 Encoding targetEncoding);
+#endif
 
     bool IsAsciiString(const void* data,
                        size_t size);
@@ -161,9 +161,7 @@
 
     Endianness DetectEndianness();
 
-#if BOOST_HAS_REGEX == 1
     std::string WildcardToRegularExpression(const std::string& s);
-#endif
 
     void TokenizeString(std::vector<std::string>& result,
                         const std::string& source,
@@ -207,9 +205,11 @@
 
     bool StartsWithUuid(const std::string& str);
 
+#if ORTHANC_ENABLE_LOCALE == 1
     void InitializeGlobalLocale(const char* locale);
 
     void FinalizeGlobalLocale();
+#endif
 
     std::string ToUpperCaseWithAccents(const std::string& source);
   }