Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
TempDir Class Reference

This class creates a temporary directory for the test, and removes it when the test is done. More...

#include <TempFile.hxx>

Public Member Functions

 TempDir ()
 
const string & name () const
 

Static Public Member Functions

static TempDirinstance ()
 

Private Attributes

string dirName_
 name of the temporary directory.
 

Detailed Description

This class creates a temporary directory for the test, and removes it when the test is done.

The caller is responsible for creating and removing the files in this directory.

The temporary directory will be under the current working directory (usually wherever the test is running).

Definition at line 52 of file TempFile.hxx.

Constructor & Destructor Documentation

◆ TempDir()

TempDir::TempDir ( )
Todo:
mingw does not seem to have an mkdtemp call.

Definition at line 54 of file TempFile.cxx.

◆ ~TempDir()

TempDir::~TempDir ( )
inline

Definition at line 58 of file TempFile.hxx.

Member Function Documentation

◆ instance()

static TempDir * TempDir::instance ( )
inlinestatic
Returns
a global singleton instance of TempDir.

Definition at line 67 of file TempFile.hxx.

◆ name()

const string & TempDir::name ( ) const
inline
Returns
name of the temporary directory.

Definition at line 73 of file TempFile.hxx.

Member Data Documentation

◆ dirName_

string TempDir::dirName_
private

name of the temporary directory.

Definition at line 79 of file TempFile.hxx.


The documentation for this class was generated from the following files: