diff Core/TemporaryFile.h @ 2143:fd5875662670

creation of namespace SystemToolbox
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 16:54:23 +0100
parents 5a8840920121
children a3a65de1840f
line wrap: on
line diff
--- a/Core/TemporaryFile.h	Wed Nov 09 16:26:40 2016 +0100
+++ b/Core/TemporaryFile.h	Wed Nov 09 16:54:23 2016 +0100
@@ -32,17 +32,15 @@
 
 #pragma once
 
-#include <string>
-
 #if !defined(ORTHANC_SANDBOXED)
-#  define ORTHANC_SANDBOXED  0
+#  error The macro ORTHANC_SANDBOXED must be defined
 #endif
 
 #if ORTHANC_SANDBOXED == 1
 #  error The class TemporaryFile cannot be used in sandboxed environments
 #endif
 
-#include "Toolbox.h"
+#include <string>
 
 namespace Orthanc
 {
@@ -63,14 +61,8 @@
       return path_;
     }
 
-    void Write(const std::string& content)
-    {
-      SystemToolbox::WriteFile(content, path_);
-    }
+    void Write(const std::string& content);
 
-    void Read(std::string& content) const
-    {
-      SystemToolbox::ReadFile(content, path_);
-    }
+    void Read(std::string& content) const;
   };
 }