changeset 5051:cab27aa905c4

[project @ 2004-10-19 15:29:15 by jwe]
author jwe
date Tue, 19 Oct 2004 15:29:15 +0000
parents d54d44f2f29a
children c6ef19da4b24
files src/ChangeLog src/ov-range.h
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Oct 19 07:58:34 2004 +0000
+++ b/src/ChangeLog	Tue Oct 19 15:29:15 2004 +0000
@@ -1,3 +1,7 @@
+2004-10-19  John W. Eaton  <jwe@octave.org>
+
+	* ov-range.h (octave_range::write): New function.
+
 2004-10-18  John W. Eaton  <jwe@octave.org>
 
 	* symtab.cc (symbol_record::dimensions_string_req_first_space,
--- a/src/ov-range.h	Tue Oct 19 07:58:34 2004 +0000
+++ b/src/ov-range.h	Tue Oct 19 15:29:15 2004 +0000
@@ -41,6 +41,7 @@
 #include "str-vec.h"
 
 #include "error.h"
+#include "oct-stream.h"
 #include "ov-base.h"
 #include "ov-typeinfo.h"
 
@@ -192,6 +193,17 @@
   bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug);
 #endif
 
+  int write (octave_stream& os, int block_size,
+	     oct_data_conv::data_type output_type, int skip,
+	     oct_mach_info::float_format flt_fmt) const
+    {
+      // XXX FIXME XXX -- could be more memory efficient by having a
+      // special case of the octave_stream::write method for ranges.
+
+      return os.write (matrix_value (), block_size, output_type, skip,
+		       flt_fmt);
+    }
+
 private:
 
   Range range;