Opens a temporary file with a unique name and deletes it when finished.
More...
#include <TemporaryFile.h>
|
| TemporaryFile (const std::string &basename) |
| Construct a temporary file with the specified basename.
|
| ~TemporaryFile () |
| Close and remove the temporary file.
|
void | close () |
| Close the temporary file.
|
void | unlink () |
| Unlink the temporary file.
|
void | remove () |
| Remove the temporary file (close and unlink)
|
int | get_fd () const |
| Get the file descriptor of the temporary file.
|
std::string | get_filename () const |
| Get the name of the temporary file.
|
void | set_removed (bool flag=true) |
| Set to true if the temporary file need not be removed.
|
| Able () |
| Default constructor.
|
| Able (const Able &) |
| Copy constructor.
|
Able & | operator= (const Able &) |
| Assignment operator.
|
virtual | ~Able () |
| Destructor.
|
unsigned | get_reference_count () const |
| Returns the number of references there are to this.
|
| HeapTracked () |
| Default constructor.
|
| HeapTracked (const HeapTracked &) |
| Copy constructor.
|
HeapTracked & | operator= (const HeapTracked &) |
| Assignment operator.
|
virtual | ~HeapTracked () |
| Destructor.
|
bool | __is_on_heap () const |
| Return true if this instance is found in heap addresses.
|
|
static bool | abort = true |
| Abort after processing any signals.
|
|
static size_t | get_instance_count () |
| Returns the current number instances in existence.
|
static void * | operator new (size_t size, void *ptr=0) |
| Records the addresses of new instances allocated on the heap.
|
static void | operator delete (void *location, void *ptr) |
| Placement delete overload to match the placement new overload.
|
static void | operator delete (void *location) |
| Regular delete overload.
|
static size_t | get_heap_queue_size () |
| Return the number of heap addresses awaiting processing.
|
Handle * | __reference (bool active) const |
| Add the address of a reference to this object.
|
void | __dereference (bool auto_delete=true) const |
| Remove the address of a reference to this object.
|
Opens a temporary file with a unique name and deletes it when finished.
◆ TemporaryFile()
TemporaryFile::TemporaryFile |
( |
const std::string & | basename | ) |
|
◆ ~TemporaryFile()
TemporaryFile::~TemporaryFile |
( |
| ) |
|
Close and remove the temporary file.
Destructor.
References remove().
The documentation for this class was generated from the following files: