Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::TestSupport::FileRaii Class Referencefinal

An RAII wrapper around an open temporary file on disk.

It cleans up the guarded file when the wrapper object goes out of scope.

Definition at line 159 of file TestSupport.hxx.

Public Member Functions

 FileRaii (const FileRaii &)=delete
 
 FileRaii (const std::string &path)
 
 FileRaii (FileRaii &&)=default
 
 ~FileRaii ()
 
std::string GetPath () const
 
FileRaiioperator= (const FileRaii &)=delete
 
FileRaiioperator= (FileRaii &&)=default
 
void PreserveFile ()
 

Private Attributes

std::string fPath
 
bool fPreserveFile = false
 

#include <ROOT/TestSupport.hxx>

Constructor & Destructor Documentation

◆ FileRaii() [1/3]

ROOT::TestSupport::FileRaii::FileRaii ( const std::string & path)
inlineexplicit

Definition at line 165 of file TestSupport.hxx.

◆ FileRaii() [2/3]

ROOT::TestSupport::FileRaii::FileRaii ( FileRaii && )
default

◆ FileRaii() [3/3]

ROOT::TestSupport::FileRaii::FileRaii ( const FileRaii & )
delete

◆ ~FileRaii()

ROOT::TestSupport::FileRaii::~FileRaii ( )
inline

Definition at line 170 of file TestSupport.hxx.

Member Function Documentation

◆ GetPath()

std::string ROOT::TestSupport::FileRaii::GetPath ( ) const
inline

Definition at line 175 of file TestSupport.hxx.

◆ operator=() [1/2]

FileRaii & ROOT::TestSupport::FileRaii::operator= ( const FileRaii & )
delete

◆ operator=() [2/2]

FileRaii & ROOT::TestSupport::FileRaii::operator= ( FileRaii && )
default

◆ PreserveFile()

void ROOT::TestSupport::FileRaii::PreserveFile ( )
inline

Definition at line 179 of file TestSupport.hxx.

Member Data Documentation

◆ fPath

std::string ROOT::TestSupport::FileRaii::fPath
private

Definition at line 161 of file TestSupport.hxx.

◆ fPreserveFile

bool ROOT::TestSupport::FileRaii::fPreserveFile = false
private

Definition at line 162 of file TestSupport.hxx.

  • core/testsupport/inc/ROOT/TestSupport.hxx