diff options
Diffstat (limited to 'src/util/utility.h')
-rw-r--r-- | src/util/utility.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/util/utility.h b/src/util/utility.h index 56a68ca40..524397ee6 100644 --- a/src/util/utility.h +++ b/src/util/utility.h @@ -20,8 +20,10 @@ #define __CVC4__UTILITY_H #include <algorithm> -#include <utility> +#include <fstream> #include <functional> +#include <string> +#include <utility> namespace CVC4 { @@ -85,6 +87,18 @@ void container_to_stream(std::ostream& out, out << postfix; } +/** + * Opens a new temporary file with a given filename pattern and returns an + * fstream to it. The directory that the file is created in is either TMPDIR or + * /tmp/ if TMPDIR is not set. + * + * @param A filestream for the temporary file. + * @param pattern The filename pattern. This string is modified to contain the + * name of the temporary file. + * + */ +void openTmpFile(std::fstream* stream, std::string* pattern); + }/* CVC4 namespace */ #endif /* __CVC4__UTILITY_H */ |