Mercurial > hg > octave-lyh
comparison src/oct-strstrm.h @ 4587:7b957b442818
[project @ 2003-11-10 15:50:39 by jwe]
author | jwe |
---|---|
date | Mon, 10 Nov 2003 15:50:40 +0000 |
parents | 6cb22b9e3942 |
children | ef3a14fb6847 |
comparison
equal
deleted
inserted
replaced
4586:7e08de0d1a98 | 4587:7b957b442818 |
---|---|
32 class | 32 class |
33 octave_base_strstream : public octave_base_stream | 33 octave_base_strstream : public octave_base_stream |
34 { | 34 { |
35 public: | 35 public: |
36 | 36 |
37 octave_base_strstream (std::ios::openmode arg_md = std::ios::out, | 37 octave_base_strstream (std::ios::openmode m = std::ios::out, |
38 oct_mach_info::float_format flt_fmt = | 38 oct_mach_info::float_format ff = |
39 oct_mach_info::flt_fmt_native) | 39 oct_mach_info::flt_fmt_native) |
40 : octave_base_stream (arg_md, flt_fmt) { } | 40 : octave_base_stream (m, ff) { } |
41 | 41 |
42 // Position a stream at OFFSET relative to ORIGIN. | 42 // Position a stream at OFFSET relative to ORIGIN. |
43 | 43 |
44 int seek (std::streamoff offset, std::ios::seekdir origin); | 44 int seek (std::streamoff offset, std::ios::seekdir origin); |
45 | 45 |
75 { | 75 { |
76 public: | 76 public: |
77 | 77 |
78 octave_istrstream (const char *data, | 78 octave_istrstream (const char *data, |
79 std::ios::openmode arg_md = std::ios::out, | 79 std::ios::openmode arg_md = std::ios::out, |
80 oct_mach_info::float_format flt_fmt = | 80 oct_mach_info::float_format ff = |
81 oct_mach_info::flt_fmt_native) | 81 oct_mach_info::flt_fmt_native) |
82 : octave_base_strstream (arg_md, flt_fmt), is (data) { } | 82 : octave_base_strstream (arg_md, ff), is (data) { } |
83 | 83 |
84 octave_istrstream (const std::string& data, | 84 octave_istrstream (const std::string& data, |
85 std::ios::openmode arg_md = std::ios::out, | 85 std::ios::openmode arg_md = std::ios::out, |
86 oct_mach_info::float_format flt_fmt = | 86 oct_mach_info::float_format ff = |
87 oct_mach_info::flt_fmt_native) | 87 oct_mach_info::flt_fmt_native) |
88 : octave_base_strstream (arg_md, flt_fmt), is (data.c_str ()) { } | 88 : octave_base_strstream (arg_md, ff), is (data.c_str ()) { } |
89 | 89 |
90 static octave_stream | 90 static octave_stream |
91 create (const char *data, std::ios::openmode arg_md = std::ios::out, | 91 create (const char *data, std::ios::openmode arg_md = std::ios::out, |
92 oct_mach_info::float_format flt_fmt = oct_mach_info::flt_fmt_native); | 92 oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native); |
93 | 93 |
94 static octave_stream | 94 static octave_stream |
95 create (const std::string& data, std::ios::openmode arg_md = std::ios::out, | 95 create (const std::string& data, std::ios::openmode arg_md = std::ios::out, |
96 oct_mach_info::float_format flt_fmt = oct_mach_info::flt_fmt_native); | 96 oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native); |
97 | 97 |
98 // Return non-zero if EOF has been reached on this stream. | 98 // Return non-zero if EOF has been reached on this stream. |
99 | 99 |
100 bool eof (void) const { return is.eof (); } | 100 bool eof (void) const { return is.eof (); } |
101 | 101 |
128 octave_ostrstream : public octave_base_strstream | 128 octave_ostrstream : public octave_base_strstream |
129 { | 129 { |
130 public: | 130 public: |
131 | 131 |
132 octave_ostrstream (std::ios::openmode arg_md = std::ios::out, | 132 octave_ostrstream (std::ios::openmode arg_md = std::ios::out, |
133 oct_mach_info::float_format flt_fmt = | 133 oct_mach_info::float_format ff = |
134 oct_mach_info::flt_fmt_native) | 134 oct_mach_info::flt_fmt_native) |
135 : octave_base_strstream (arg_md, flt_fmt) { } | 135 : octave_base_strstream (arg_md, ff) { } |
136 | 136 |
137 static octave_stream | 137 static octave_stream |
138 create (std::ios::openmode arg_md = std::ios::out, | 138 create (std::ios::openmode arg_md = std::ios::out, |
139 oct_mach_info::float_format flt_fmt = oct_mach_info::flt_fmt_native); | 139 oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native); |
140 | 140 |
141 // Return non-zero if EOF has been reached on this stream. | 141 // Return non-zero if EOF has been reached on this stream. |
142 | 142 |
143 bool eof (void) const { return os.eof (); } | 143 bool eof (void) const { return os.eof (); } |
144 | 144 |