Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Protected Member Functions | Private Attributes | List of all members
FileResource Class Reference

RAII: Gives a clean file destination and removes the file when handle is out of scope. More...

#include <FileResource.h>

Public Member Functions

 FileResource (const std::string &fileName, bool debugMode=false)
 
std::string fullPath () const
 
void setDebugMode (bool mode)
 
 ~FileResource ()
 

Static Protected Member Functions

static void * operator new (std::size_t)
 
static void * operator new[] (std::size_t)
 

Private Attributes

bool m_debugMode
 
boost::filesystem::path m_full_path
 

Detailed Description

RAII: Gives a clean file destination and removes the file when handle is out of scope.

Must be stack allocated.

Author
Takudzwa Makoni, RAL (UKRI), ISIS
Date
06/08/2019

Definition at line 20 of file FileResource.h.

Constructor & Destructor Documentation

◆ FileResource()

FileResource::FileResource ( const std::string &  fileName,
bool  debugMode = false 
)

Definition at line 11 of file FileResource.cpp.

References m_full_path.

◆ ~FileResource()

FileResource::~FileResource ( )

Definition at line 32 of file FileResource.cpp.

References m_debugMode, and m_full_path.

Member Function Documentation

◆ fullPath()

std::string FileResource::fullPath ( ) const

Definition at line 30 of file FileResource.cpp.

References m_full_path.

◆ operator new()

static void * FileResource::operator new ( std::size_t  )
staticprotected

◆ operator new[]()

static void * FileResource::operator new[] ( std::size_t  )
staticprotected

◆ setDebugMode()

void FileResource::setDebugMode ( bool  mode)

Definition at line 29 of file FileResource.cpp.

References m_debugMode.

Member Data Documentation

◆ m_debugMode

bool FileResource::m_debugMode
private

Definition at line 29 of file FileResource.h.

Referenced by setDebugMode(), and ~FileResource().

◆ m_full_path

boost::filesystem::path FileResource::m_full_path
private

Definition at line 30 of file FileResource.h.

Referenced by FileResource(), fullPath(), and ~FileResource().


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