Temporary file name.
More...
#include <spot/misc/tmpfile.hh>
Temporary file name.
This class serves a dual purpose.
- It carries the name of a temporary file, created with create_tmpfile().
- It represents the life of the associated file. The file is erased as soon as the temporary_file instance is destroyed.
Note that there are two ways to destroy temporary_file instances. Either directly with delete, or indirectly by calling cleanup_tmpfiles(). You should never delete an instance that has been created before the last call to cleanup_tmpfiles(), because that instance has already been deleted.
◆ cleanpos_t
Iterator position in the cleanup list.
◆ temporary_file()
| SPOT_LOCAL spot::temporary_file::temporary_file |
( |
char * |
name, |
|
|
cleanpos_t |
cp |
|
) |
| |
Build a temporary file wrapper.
◆ ~temporary_file()
| virtual spot::temporary_file::~temporary_file |
( |
| ) |
|
|
overridevirtual |
Destroy the temporary file.
◆ name()
| const char* spot::temporary_file::name |
( |
| ) |
const |
|
inline |
◆ print()
| virtual void spot::temporary_file::print |
( |
std::ostream & |
os, |
|
|
const char * |
|
|
) |
| const |
|
inlinefinaloverridevirtual |
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const temporary_file * |
f |
|
) |
| |
|
friend |
◆ cleanpos_
◆ name_
| char* spot::temporary_file::name_ |
|
protected |
The documentation for this class was generated from the following file: