GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
base_stream Class Referenceabstract

#include "oct-stream.h"

Inheritance diagram for base_stream:
tstdiostream< c_file_ptr_buf, io_c_file_ptr_stream, FILE * > tstdiostream< c_zfile_ptr_buf, io_c_zfile_ptr_stream, gzFile > base_iostream base_strstream fstream tstdiostream< BUF_T, STREAM_T, FILE_T > stdiostream zstdiostream istream ostream istrstream ostrstream

Public Member Functions

 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 ()
 
virtual void do_close ()
 
virtual bool eof () const =0
 
std::string error (bool clear, int &err_num)
 
virtual int file_number () const
 
virtual std::istream * input_stream ()
 
bool is_open () const
 
virtual std::string name () const =0
 
bool ok () const
 
virtual std::ostream * output_stream ()
 
std::ostream * preferred_output_stream ()
 
virtual int seek (off_t offset, int origin)=0
 
virtual off_t tell ()=0
 

Protected Member Functions

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
 

Friends

class stream
 

Detailed Description

Definition at line 66 of file oct-stream.h.

Constructor & Destructor Documentation

◆ base_stream()

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" 
)
inline

Definition at line 72 of file oct-stream.h.

◆ ~base_stream()

virtual base_stream::~base_stream ( )
virtualdefault

Member Function Documentation

◆ clear()

void base_stream::clear ( )
protected

Definition at line 4034 of file oct-stream.cc.

Referenced by error().

◆ clearerr()

void base_stream::clearerr ( )
protected

Definition at line 4041 of file oct-stream.cc.

References input_stream(), and preferred_output_stream().

◆ close()

void base_stream::close ( )
inline

Definition at line 149 of file oct-stream.h.

◆ do_close()

◆ encoding()

std::string base_stream::encoding ( ) const
inlineprotected

◆ eof()

◆ error() [1/3]

std::string base_stream::error ( bool  clear,
int err_num 
)

◆ error() [2/3]

void base_stream::error ( const std::string &  msg)
protected

Definition at line 4020 of file oct-stream.cc.

◆ error() [3/3]

void base_stream::error ( const std::string &  who,
const std::string &  msg 
)
protected

Definition at line 4027 of file oct-stream.cc.

◆ file_number()

◆ float_format()

mach_info::float_format base_stream::float_format ( ) const
inlineprotected

Definition at line 182 of file oct-stream.h.

◆ input_stream()

◆ is_open()

bool base_stream::is_open ( ) const
inline

Definition at line 145 of file oct-stream.h.

◆ mode()

int base_stream::mode ( ) const
inlineprotected

Definition at line 180 of file oct-stream.h.

Referenced by fstream::input_stream(), and fstream::output_stream().

◆ name()

◆ ok()

bool base_stream::ok ( ) const
inline

Definition at line 172 of file oct-stream.h.

◆ output_stream()

◆ preferred_output_stream()

std::ostream * base_stream::preferred_output_stream ( )
inline

Definition at line 118 of file oct-stream.h.

Referenced by clearerr().

◆ seek()

◆ tell()

Friends And Related Symbol Documentation

◆ stream


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