Belle II Software development
|
Helper file to create a temporary file and ensure deletion if object goes out of scope. More...
#include <FileSystem.h>
Public Member Functions | |
TemporaryFile (std::ios_base::openmode mode=std::ios_base::trunc|std::ios_base::out) | |
construct a new temporary file | |
TemporaryFile (const TemporaryFile &)=delete | |
prevent assignment | |
TemporaryFile (TemporaryFile &&)=delete | |
and no move construction as basic_ios doesn't allow that | |
TemporaryFile & | operator= (const TemporaryFile &)=delete |
prevent copy constructor | |
~TemporaryFile () | |
close file and delete on destruction | |
std::string | getName () const |
get filename of the temporary file | |
Private Attributes | |
std::string | m_filename |
filename of the temporary file | |
Helper file to create a temporary file and ensure deletion if object goes out of scope.
Definition at line 128 of file FileSystem.h.
|
explicit |
construct a new temporary file
Definition at line 223 of file FileSystem.cc.
~TemporaryFile | ( | ) |
close file and delete on destruction
Definition at line 241 of file FileSystem.cc.
|
inline |
|
private |
filename of the temporary file
Definition at line 144 of file FileSystem.h.