GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
octave::CFile Class Reference

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

Collaboration diagram for octave::CFile:
Collaboration graph
[legend]

Public Member Functions

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

Public Attributes

std::FILE * 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 86 of file gzip.cc.

Constructor & Destructor Documentation

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

Definition at line 91 of file gzip.cc.

octave::CFile::~CFile ( )
inline

Definition at line 106 of file gzip.cc.

References fclose().

Member Function Documentation

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

Definition at line 99 of file gzip.cc.

References fclose().

Member Data Documentation

std::FILE* octave::CFile::fp

Definition at line 89 of file gzip.cc.


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