Class representing a reference to a temporary file. More...
#include <tpie/tempname.h>
Public Member Functions | |
temp_file () | |
Create a temp_file associated with a temporary file. More... | |
temp_file (const std::string &path, bool persist=false) | |
Create a temp_file associated with a specific file. More... | |
bool | is_persistent () const |
void | set_persistent (bool p) |
Set persistence. More... | |
void | set_path (const std::string &path, bool persist=false) |
Associate with a specific file. More... | |
const std::string & | path () |
Get the path of the associated file. More... | |
void | free () |
Clears the current object reference. More... | |
void | update_recorded_size (stream_size_type size) |
Class representing a reference to a temporary file.
When all temp_file objects to a file go out of scope and are not set to persistent, the associated temporary file will be deleted.
Definition at line 202 of file tempname.h.
|
inline |
Create a temp_file associated with a temporary file.
Definition at line 207 of file tempname.h.
|
inline |
Create a temp_file associated with a specific file.
Definition at line 214 of file tempname.h.
|
inline |
Clears the current object reference.
Definition at line 251 of file tempname.h.
|
inline |
Definition at line 222 of file tempname.h.
Referenced by tpie::ami::stack< item_type >::persist(), and tpie::ami::stream_old< T >::persist().
|
inline |
Get the path of the associated file.
Definition at line 244 of file tempname.h.
Referenced by tpie::file_base_crtp< file_stream_base >::open(), and tpie::ami::stream_old< T >::stream_old().
|
inline |
Associate with a specific file.
Definition at line 237 of file tempname.h.
|
inline |
Set persistence.
When true, the file will not be deleted when this goes out of scope.
Definition at line 230 of file tempname.h.
Referenced by tpie::ami::stack< item_type >::persist(), and tpie::ami::stream_old< T >::persist().