CBMC
tempdir.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: CM Wintersteiger
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_UTIL_TEMPDIR_H
11 #define CPROVER_UTIL_TEMPDIR_H
12 
13 #include <string>
14 
15 std::string get_temporary_directory(const std::string &name_template);
16 
17 // Produces a temporary directory,
18 // and deletes it upon destruction.
19 class temp_dirt
20 {
21 public:
22  explicit temp_dirt(const std::string &name_template);
23  ~temp_dirt();
24 
25  temp_dirt(const temp_dirt &) = delete;
26 
28  {
29  path.swap(other.path);
30  }
31 
32  std::string operator()(const std::string &file);
33 
34  void clear();
35 
36  std::string path;
37 };
38 
39 #endif // CPROVER_UTIL_TEMPDIR_H
~temp_dirt()
Definition: tempdir.cpp:88
temp_dirt(const std::string &name_template)
Definition: tempdir.cpp:73
std::string operator()(const std::string &file)
Definition: tempdir.cpp:78
std::string path
Definition: tempdir.h:36
void clear()
Definition: tempdir.cpp:83
temp_dirt(temp_dirt &&other)
Definition: tempdir.h:27
temp_dirt(const temp_dirt &)=delete
std::string get_temporary_directory(const std::string &name_template)
Definition: tempdir.cpp:29