Mercurial > hg > orthanc
diff Core/Uuid.h @ 2140:aa4b8895cd23
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Nov 2016 16:12:47 +0100 |
parents | b1291df2f780 |
children | a260a8ad83f1 |
line wrap: on
line diff
--- a/Core/Uuid.h Wed Nov 09 15:25:09 2016 +0100 +++ b/Core/Uuid.h Wed Nov 09 16:12:47 2016 +0100 @@ -43,6 +43,10 @@ * http://stackoverflow.com/questions/246930/is-there-any-difference-between-a-guid-and-a-uuid **/ +#if !defined(ORTHANC_SANDBOXED) +# define ORTHANC_SANDBOXED 0 +#endif + #include "Toolbox.h" namespace Orthanc @@ -54,33 +58,35 @@ bool IsUuid(const std::string& str); bool StartsWithUuid(const std::string& str); - - class TemporaryFile - { - private: - std::string path_; + } - public: - TemporaryFile(); +#if ORTHANC_SANDBOXED == 0 + class TemporaryFile + { + private: + std::string path_; - TemporaryFile(const char* extension); + public: + TemporaryFile(); - ~TemporaryFile(); + TemporaryFile(const char* extension); + + ~TemporaryFile(); - const std::string& GetPath() const - { - return path_; - } + const std::string& GetPath() const + { + return path_; + } - void Write(const std::string& content) - { - Toolbox::WriteFile(content, path_); - } + void Write(const std::string& content) + { + SystemToolbox::WriteFile(content, path_); + } - void Read(std::string& content) const - { - Toolbox::ReadFile(content, path_); - } - }; - } + void Read(std::string& content) const + { + SystemToolbox::ReadFile(content, path_); + } + }; +#endif }