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

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

Constructor & Destructor Documentation

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

Definition at line 91 of file

octave::CFile::~CFile ( )

Definition at line 106 of file

References fclose().

Member Function Documentation

void octave::CFile::close ( void  )

Definition at line 99 of file

References fclose().

Member Data Documentation

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

Definition at line 89 of file

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