Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_octave_fstream_h)
00024 #define octave_octave_fstream_h 1
00025
00026 #include <fstream>
00027 #include <string>
00028
00029 #include "oct-stream.h"
00030
00031 class
00032 octave_fstream : public octave_base_stream
00033 {
00034 public:
00035
00036 octave_fstream (const std::string& nm_arg,
00037 std::ios::openmode arg_md = std::ios::in|std::ios::out,
00038 oct_mach_info::float_format flt_fmt
00039 = oct_mach_info::native_float_format ());
00040
00041 static octave_stream
00042 create (const std::string& nm_arg,
00043 std::ios::openmode arg_md = std::ios::in|std::ios::out,
00044 oct_mach_info::float_format flt_fmt
00045 = oct_mach_info::native_float_format ());
00046
00047
00048
00049 int seek (long offset, int origin);
00050
00051
00052
00053 long tell (void);
00054
00055
00056
00057 bool eof (void) const;
00058
00059 void do_close (void);
00060
00061
00062
00063 std::string name (void) const { return nm; }
00064
00065 std::istream *input_stream (void);
00066
00067 std::ostream *output_stream (void);
00068
00069 protected:
00070
00071 ~octave_fstream (void) { }
00072
00073 private:
00074
00075 std::string nm;
00076
00077 std::fstream fs;
00078
00079
00080
00081 octave_fstream (const octave_fstream&);
00082
00083 octave_fstream& operator = (const octave_fstream&);
00084 };
00085
00086 #endif