GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
fstream Class Reference

#include "oct-fstrm.h"

Inheritance diagram for fstream:
base_stream

Public Member Functions

 fstream (const std::string &nm_arg, std::ios::openmode arg_md=std::ios::in|std::ios::out, mach_info::float_format flt_fmt=mach_info::native_float_format())
 
void do_close ()
 
bool eof () const
 
std::istream * input_stream ()
 
std::string name () const
 
std::ostream * output_stream ()
 
int seek (off_t offset, int origin)
 
off_t tell ()
 
- Public Member Functions inherited from base_stream
 base_stream (std::ios::openmode arg_md=std::ios::in|std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8")
 
virtual ~base_stream ()=default
 
void close ()
 
std::string error (bool clear, int &err_num)
 
virtual int file_number () const
 
bool is_open () const
 
bool ok () const
 
std::ostream * preferred_output_stream ()
 

Static Public Member Functions

static stream create (const std::string &nm_arg, std::ios::openmode arg_md=std::ios::in|std::ios::out, mach_info::float_format flt_fmt=mach_info::native_float_format())
 

Protected Member Functions

 ~fstream ()=default
 
- Protected Member Functions inherited from base_stream
void clear ()
 
void clearerr ()
 
std::string encoding () const
 
void error (const std::string &msg)
 
void error (const std::string &who, const std::string &msg)
 
mach_info::float_format float_format () const
 
int mode () const
 

Detailed Description

Definition at line 38 of file oct-fstrm.h.

Constructor & Destructor Documentation

◆ fstream()

fstream::fstream ( const std::string &  nm_arg,
std::ios::openmode  arg_md = std::ios::in | std::ios::out,
mach_info::float_format  flt_fmt = mach_info::native_float_format () 
)

Definition at line 45 of file oct-fstrm.cc.

References base_stream::error().

◆ ~fstream()

fstream::~fstream ( )
protecteddefault

Member Function Documentation

◆ create()

stream fstream::create ( const std::string &  nm_arg,
std::ios::openmode  arg_md = std::ios::in | std::ios::out,
mach_info::float_format  flt_fmt = mach_info::native_float_format () 
)
static

Definition at line 39 of file oct-fstrm.cc.

References base_stream::stream.

◆ do_close()

void fstream::do_close ( )
virtual

Reimplemented from base_stream.

Definition at line 87 of file oct-fstrm.cc.

◆ eof()

bool fstream::eof ( ) const
virtual

Implements base_stream.

Definition at line 81 of file oct-fstrm.cc.

◆ input_stream()

std::istream * fstream::input_stream ( )
virtual

Reimplemented from base_stream.

Definition at line 93 of file oct-fstrm.cc.

References base_stream::mode().

◆ name()

std::string fstream::name ( ) const
inlinevirtual

Implements base_stream.

Definition at line 70 of file oct-fstrm.h.

◆ output_stream()

std::ostream * fstream::output_stream ( )
virtual

Reimplemented from base_stream.

Definition at line 104 of file oct-fstrm.cc.

References base_stream::mode().

◆ seek()

int fstream::seek ( off_t  offset,
int  origin 
)
virtual

Implements base_stream.

Definition at line 59 of file oct-fstrm.cc.

References base_stream::error().

◆ tell()

off_t fstream::tell ( )
virtual

Implements base_stream.

Definition at line 70 of file oct-fstrm.cc.

References base_stream::error().


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