X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Futil.h;h=579b1c231bf144874af2aa6fcc78b239e419dbe3;hp=2ae97814cf77726377a4f187c6e2e32d9c186435;hb=854f2e5bbb7ffb9758b823af87034033033f3cb8;hpb=e6f28e7cda23c1ba3c49cc1bf2dc1491c2f87160 diff --git a/src/lib/util.h b/src/lib/util.h index 2ae97814c..579b1c231 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -141,6 +141,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