]> git.lyx.org Git - lyx.git/blobdiff - src/support/TempFile.h
Cmake build: Omit also hidden header files from globbing
[lyx.git] / src / support / TempFile.h
index c9342f91f2a6bfe38e4bd661f6087dce92827047..b99ee756a16c9d67541a2c2b4ab16399e6a025f9 100644 (file)
@@ -26,6 +26,10 @@ class FileName;
  * of this class must stay alive as long as the file is needed.
  */
 class TempFile {
+       /// noncopyable
+       TempFile(TempFile const &);
+       /// nonassignable
+       TempFile & operator=(TempFile const &);
 public:
        /**
         *Create a temporary file with the given mask.
@@ -46,6 +50,13 @@ public:
         * This is empty if the file could not be created.
         */
        FileName name() const;
+       /**
+        * Set whether the file should be automatically deleted in the
+        * destructor.
+        * Automatic deletion is the default, but it can be switched off if
+        * the file should be kept, because it should be renamed afterwards.
+        */
+       void setAutoRemove(bool autoremove);
 private:
        ///
        struct Private;