GNU Octave  3.8.0
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 | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
octave_fstream Class Reference

#include "oct-fstrm.h"

Inheritance diagram for octave_fstream:
Inheritance graph
[legend]
Collaboration diagram for octave_fstream:
Collaboration graph
[legend]

Public Member Functions

 octave_fstream (const std::string &nm_arg, std::ios::openmode arg_md=std::ios::in|std::ios::out, oct_mach_info::float_format flt_fmt=oct_mach_info::native_float_format())
void close (void)
void do_close (void)
bool eof (void) const
std::string error (bool clear, int &err_num)
virtual int file_number (void) const
std::istream * input_stream (void)
bool is_open (void) const
std::string name (void) const
bool ok (void) const
std::ostream * output_stream (void)
int seek (off_t offset, int origin)
off_t tell (void)

Static Public Member Functions

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

Protected Member Functions

 ~octave_fstream (void)
void clear (void)
void clearerr (void)
void error (const std::string &msg)
void error (const std::string &who, const std::string &msg)
oct_mach_info::float_format float_format (void) const
int mode (void) const

Private Member Functions

 octave_fstream (const octave_fstream &)
octave_fstreamoperator= (const octave_fstream &)

Private Attributes

std::fstream fs
std::string nm

Detailed Description

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

Constructor & Destructor Documentation

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

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

References octave_base_stream::error(), fs, and nm.

octave_fstream::~octave_fstream ( void  )
inlineprotected

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

octave_fstream::octave_fstream ( const octave_fstream )
private

Member Function Documentation

void octave_base_stream::clear ( void  )
protectedinherited
void octave_base_stream::clearerr ( void  )
protectedinherited
void octave_base_stream::close ( void  )
inlineinherited

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

References octave_stream::is_open().

Referenced by octave_stream::close().

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

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

References octave_base_stream::octave_stream.

void octave_fstream::do_close ( void  )
virtual

Reimplemented from octave_base_stream.

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

References fs.

bool octave_fstream::eof ( void  ) const
virtual

Implements octave_base_stream.

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

References fs.

std::string octave_base_stream::error ( bool  clear,
int err_num 
)
inherited
void octave_base_stream::error ( const std::string &  msg)
protectedinherited

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

References octave_base_stream::errmsg, and octave_base_stream::fail.

void octave_base_stream::error ( const std::string &  who,
const std::string &  msg 
)
protectedinherited

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

References octave_base_stream::errmsg, and octave_base_stream::fail.

virtual int octave_base_stream::file_number ( void  ) const
inlinevirtualinherited
oct_mach_info::float_format octave_base_stream::float_format ( void  ) const
inlineprotectedinherited

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

Referenced by octave_stream::float_format().

std::istream * octave_fstream::input_stream ( void  )
virtual

Reimplemented from octave_base_stream.

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

References fs, and octave_base_stream::mode().

bool octave_base_stream::is_open ( void  ) const
inlineinherited

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

Referenced by octave_stream::is_open().

int octave_base_stream::mode ( void  ) const
inlineprotectedinherited

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

Referenced by input_stream(), octave_stream::mode(), and output_stream().

std::string octave_fstream::name ( void  ) const
inlinevirtual

Implements octave_base_stream.

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

bool octave_base_stream::ok ( void  ) const
inlineinherited
octave_fstream& octave_fstream::operator= ( const octave_fstream )
private
std::ostream * octave_fstream::output_stream ( void  )
virtual

Reimplemented from octave_base_stream.

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

References fs, and octave_base_stream::mode().

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

Implements octave_base_stream.

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

References octave_base_stream::error().

off_t octave_fstream::tell ( void  )
virtual

Implements octave_base_stream.

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

References octave_base_stream::error().

Member Data Documentation

std::fstream octave_fstream::fs
private

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

Referenced by do_close(), eof(), input_stream(), octave_fstream(), and output_stream().

std::string octave_fstream::nm
private

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

Referenced by octave_fstream().


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