GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
tstdiostream< BUF_T, STREAM_T, FILE_T > Class Template Reference

#include "oct-stdstrm.h"

Inheritance diagram for tstdiostream< BUF_T, STREAM_T, FILE_T >:
base_stream

Public Member Functions

 tstdiostream (const std::string &n, FILE_T f=0, int fid=0, std::ios::openmode m=std::ios::in|std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8", typename BUF_T::close_fcn cf=BUF_T::file_close)
 
bool bad () const
 
void clear ()
 
void do_close ()
 
bool eof () const
 
int file_number () const
 
std::istream * input_stream ()
 
std::string name () const
 
std::ostream * output_stream ()
 
BUF_T * rdbuf () const
 
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)
 
bool is_open () const
 
bool ok () const
 
std::ostream * preferred_output_stream ()
 

Protected Member Functions

 ~tstdiostream ()
 
- 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
 

Protected Attributes

int m_fnum
 
std::ios::openmode m_mode
 
std::string m_name
 
STREAM_Tm_stream
 

Detailed Description

template<typename BUF_T, typename STREAM_T, typename FILE_T>
class tstdiostream< BUF_T, STREAM_T, FILE_T >

Definition at line 39 of file oct-stdstrm.h.

Constructor & Destructor Documentation

◆ tstdiostream()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
tstdiostream< BUF_T, STREAM_T, FILE_T >::tstdiostream ( const std::string &  n,
FILE_T  f = 0,
int  fid = 0,
std::ios::openmode  m = std::ios::in | std::ios::out,
mach_info::float_format  ff = mach_info::native_float_format (),
const std::string &  encoding = "utf-8",
typename BUF_T::close_fcn  cf = BUF_T::file_close 
)
inline

Definition at line 44 of file oct-stdstrm.h.

◆ ~tstdiostream()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
tstdiostream< BUF_T, STREAM_T, FILE_T >::~tstdiostream ( )
inlineprotected

Definition at line 108 of file oct-stdstrm.h.

Member Function Documentation

◆ bad()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
bool tstdiostream< BUF_T, STREAM_T, FILE_T >::bad ( ) const
inline

Definition at line 92 of file oct-stdstrm.h.

◆ clear()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
void tstdiostream< BUF_T, STREAM_T, FILE_T >::clear ( )
inline

Definition at line 94 of file oct-stdstrm.h.

◆ do_close()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
void tstdiostream< BUF_T, STREAM_T, FILE_T >::do_close ( )
inlinevirtual

Reimplemented from base_stream.

Definition at line 100 of file oct-stdstrm.h.

◆ eof()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
bool tstdiostream< BUF_T, STREAM_T, FILE_T >::eof ( ) const
inlinevirtual

Implements base_stream.

Definition at line 68 of file oct-stdstrm.h.

◆ file_number()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
int tstdiostream< BUF_T, STREAM_T, FILE_T >::file_number ( ) const
inlinevirtual

Reimplemented from base_stream.

Definition at line 90 of file oct-stdstrm.h.

◆ input_stream()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
std::istream* tstdiostream< BUF_T, STREAM_T, FILE_T >::input_stream ( )
inlinevirtual

Reimplemented from base_stream.

Definition at line 74 of file oct-stdstrm.h.

◆ name()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
std::string tstdiostream< BUF_T, STREAM_T, FILE_T >::name ( ) const
inlinevirtual

Implements base_stream.

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

◆ output_stream()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
std::ostream* tstdiostream< BUF_T, STREAM_T, FILE_T >::output_stream ( )
inlinevirtual

Reimplemented from base_stream.

Definition at line 79 of file oct-stdstrm.h.

◆ rdbuf()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
BUF_T* tstdiostream< BUF_T, STREAM_T, FILE_T >::rdbuf ( ) const
inline

Definition at line 85 of file oct-stdstrm.h.

◆ seek()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
int tstdiostream< BUF_T, STREAM_T, FILE_T >::seek ( off_t  offset,
int  origin 
)
inlinevirtual

Implements base_stream.

Definition at line 57 of file oct-stdstrm.h.

References base_stream::seek().

◆ tell()

template<typename BUF_T , typename STREAM_T , typename FILE_T >
off_t tstdiostream< BUF_T, STREAM_T, FILE_T >::tell ( )
inlinevirtual

Implements base_stream.

Definition at line 64 of file oct-stdstrm.h.

Member Data Documentation

◆ m_fnum

template<typename BUF_T , typename STREAM_T , typename FILE_T >
int tstdiostream< BUF_T, STREAM_T, FILE_T >::m_fnum
protected

Definition at line 119 of file oct-stdstrm.h.

◆ m_mode

template<typename BUF_T , typename STREAM_T , typename FILE_T >
std::ios::openmode tstdiostream< BUF_T, STREAM_T, FILE_T >::m_mode
protected

Definition at line 114 of file oct-stdstrm.h.

◆ m_name

template<typename BUF_T , typename STREAM_T , typename FILE_T >
std::string tstdiostream< BUF_T, STREAM_T, FILE_T >::m_name
protected

Definition at line 112 of file oct-stdstrm.h.

◆ m_stream

template<typename BUF_T , typename STREAM_T , typename FILE_T >
STREAM_T* tstdiostream< BUF_T, STREAM_T, FILE_T >::m_stream
protected

Definition at line 116 of file oct-stdstrm.h.


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