diff src/oct-iostrm.h @ 3340:585a8809fd9b

[project @ 1999-11-05 07:02:30 by jwe]
author jwe
date Fri, 05 Nov 1999 07:02:36 +0000
parents 5c1b9e545dd1
children d8d3700fb4ab
line wrap: on
line diff
--- a/src/oct-iostrm.h	Thu Nov 04 16:24:31 1999 +0000
+++ b/src/oct-iostrm.h	Fri Nov 05 07:02:36 1999 +0000
@@ -41,8 +41,6 @@
 			oct_mach_info::native)
     : octave_base_stream (md, flt_fmt), nm (n) { }
 
-  ~octave_base_iostream (void) { }
-
   // Position a stream at OFFSET relative to ORIGIN.
 
   int seek (streamoff offset, ios::seek_dir origin);
@@ -57,10 +55,12 @@
 
   // The name of the file.
 
-  string name (void);
+  string name (void) const { return nm; }
 
 protected:
 
+  ~octave_base_iostream (void) { }
+
   void invalid_operation (void) const;
 
 private:
@@ -85,12 +85,17 @@
     : octave_base_iostream (nm, ios::in, oct_mach_info::native),
       is (arg) { }
 
-  ~octave_istream (void) { }
+  static octave_stream
+  create (istream *arg = 0, const string& nm = string ());
 
   istream *input_stream (void) { return is; }
 
   ostream *output_stream (void) { return 0; }
 
+protected:
+
+  ~octave_istream (void) { }
+
 private:
 
   istream *is;
@@ -113,12 +118,17 @@
     : octave_base_iostream (nm, ios::out, oct_mach_info::native),
       os (arg) { }
 
-  ~octave_ostream (void) { }
+  static octave_stream
+  create (ostream *arg, const string& nm = string ());
 
   istream *input_stream (void) { return 0; }
 
   ostream *output_stream (void) { return os; }
 
+protected:
+
+  ~octave_ostream (void) { }
+
 private:
 
   ostream *os;