Elements  5.10
A C++ base framework for the Euclid Software.
Temporary.h
Go to the documentation of this file.
1 
26 #ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_TEMPORARY_H_
27 #define ELEMENTSKERNEL_ELEMENTSKERNEL_TEMPORARY_H_
28 
29 #include <string>
30 #include <boost/filesystem.hpp>
31 
32 #include "ElementsKernel/Export.h" // ELEMENTS_API
33 #include "ElementsKernel/Environment.h" // for Environment
34 
35 namespace Elements {
36 
38 const std::string DEFAULT_TMP_KEEP_VAR {"KEEPTEMPDIR"};
40 const std::string DEFAULT_TMP_MOTIF {"%%%%-%%%%-%%%%-%%%%"};
41 
43 public:
44  explicit TempPath(const std::string& motif = DEFAULT_TMP_MOTIF,
45  const std::string& keep_var = DEFAULT_TMP_KEEP_VAR);
46  virtual ~TempPath();
48  std::string motif() const;
49 private:
53 };
54 
55 
56 class ELEMENTS_API TempDir : public TempPath {
57 public:
58  explicit TempDir(const std::string& motif = DEFAULT_TMP_MOTIF,
59  const std::string& keep_var = DEFAULT_TMP_KEEP_VAR);
60  virtual ~TempDir();
61 };
62 
63 
64 class ELEMENTS_API TempFile : public TempPath {
65 public:
66  explicit TempFile(const std::string& motif = DEFAULT_TMP_MOTIF,
67  const std::string& keep_var = DEFAULT_TMP_KEEP_VAR);
68  virtual ~TempFile();
69 };
70 
72 
77 } // namespace Elements
78 
79 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_TEMPORARY_H_
80 
Export.h
defines the macros to be used for explicit export of the symbols
std::string
STL class.
Elements::DEFAULT_TMP_MOTIF
const std::string DEFAULT_TMP_MOTIF
The default random creation motif.
Definition: Temporary.h:40
Elements::TempPath::m_path
boost::filesystem::path m_path
Definition: Temporary.h:51
ElementsServices::DataSync::path
boost::filesystem::path path
Definition: DataSyncUtils.h:38
Elements::DEFAULT_TMP_KEEP_VAR
const std::string DEFAULT_TMP_KEEP_VAR
The default environment variable name to keep the temporary object.
Definition: Temporary.h:38
Elements::TempFile
Definition: Temporary.h:64
ELEMENTS_API
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
Elements::TempDir
Definition: Temporary.h:56
Elements::TempPath::m_keep_var
const std::string m_keep_var
Definition: Temporary.h:52
Elements::TempPath
Definition: Temporary.h:42
Environment.h
Defines a class to handle the Environment.
Elements::Environment
Definition: Environment.h:44
Elements::TempPath::m_motif
const std::string m_motif
Definition: Temporary.h:50
Elements
Definition: ClassExample.h:38