Mercurial > hg > octave-lyh
diff src/ov-file.h @ 3340:585a8809fd9b
[project @ 1999-11-05 07:02:30 by jwe]
author | jwe |
---|---|
date | Fri, 05 Nov 1999 07:02:36 +0000 |
parents | 30770ba4457a |
children | d14c483b3c12 |
line wrap: on
line diff
--- a/src/ov-file.h +++ b/src/ov-file.h @@ -34,6 +34,7 @@ class ostream; #include "oct-alloc.h" +#include "oct-stream.h" #include "ov-base.h" #include "ov-typeinfo.h" @@ -50,9 +51,9 @@ public: octave_file (void) - : octave_base_value (), stream (0), number (-1) { } + : octave_base_value (), stream (), number (-1) { } - octave_file (octave_stream *s, int n) + octave_file (const octave_stream& s, int n) : octave_base_value (), stream (s), number (n) { } octave_file (const octave_file& f) @@ -68,13 +69,13 @@ double scalar_value (bool) const { return static_cast<double> (number); } - octave_stream *stream_value (void) const { return stream; } + octave_stream stream_value (void) const { return stream; } int stream_number (void) const { return number; } bool is_defined (void) const { return true; } - bool is_file (void) const { return true; } + bool is_stream (void) const { return true; } void print (ostream& os, bool pr_as_read_syntax = false) const; @@ -85,7 +86,7 @@ private: // The stream object. - octave_stream *stream; + octave_stream stream; // The number of the beast. int number;