GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::CFile Class Reference

RIIA wrapper for std::FILE*. More...

Collaboration diagram for octave::CFile:

Public Member Functions

 CFile (void)=delete
 
 CFile (const std::string &path, const std::string &mode)
 
 CFile (const CFile &)=delete
 
 ~CFile (void)
 
void close (void)
 
CFileoperator= (const CFile &)=delete
 

Public Attributes

std::FILE * m_fp
 

Detailed Description

RIIA wrapper for std::FILE*.

If error handling is available for failing to close the file, use the close method which throws.

If the file has been closed, fp is set to nullptr. Remember that behavior is undefined if the value of the pointer stream is used after fclose.

Definition at line 93 of file gzip.cc.

Constructor & Destructor Documentation

◆ CFile() [1/3]

octave::CFile::CFile ( void  )
delete

◆ CFile() [2/3]

octave::CFile::CFile ( const std::string path,
const std::string mode 
)
inline

Definition at line 99 of file gzip.cc.

References m_fp.

◆ CFile() [3/3]

octave::CFile::CFile ( const CFile )
delete

◆ ~CFile()

octave::CFile::~CFile ( void  )
inline

Definition at line 110 of file gzip.cc.

References fclose, and m_fp.

Member Function Documentation

◆ close()

void octave::CFile::close ( void  )
inline

Definition at line 116 of file gzip.cc.

References fclose, and m_fp.

◆ operator=()

CFile& octave::CFile::operator= ( const CFile )
delete

Member Data Documentation

◆ m_fp

std::FILE* octave::CFile::m_fp

Definition at line 124 of file gzip.cc.

Referenced by CFile(), close(), and ~CFile().


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