diff options
Diffstat (limited to 'src/lib/util.h')
| -rw-r--r-- | src/lib/util.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/util.h b/src/lib/util.h index c05680859..0bbab8305 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -176,6 +176,24 @@ private: char* _old; }; +class ScopedTemporary +{ +public: + ScopedTemporary (); + ~ScopedTemporary (); + + boost::filesystem::path file () const { + return _file; + } + + char const * c_str () const; + FILE* open (char const *); + void close (); + +private: + boost::filesystem::path _file; + FILE* _open; +}; #endif |
