GNU Octave  6.2.0
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 (const CFile &)=delete
 
 CFile (const std::string &path, const std::string &mode)
 
 CFile (void)=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 97 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 103 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 114 of file gzip.cc.

References m_fp.

Member Function Documentation

◆ close()

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

Definition at line 120 of file gzip.cc.

References m_fp.

◆ operator=()

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

Member Data Documentation

◆ m_fp

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

Definition at line 128 of file gzip.cc.

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


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