2081
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2007 |
|
4 John W. Eaton |
2081
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
2081
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
2081
|
21 |
|
22 */ |
|
23 |
|
24 #ifdef HAVE_CONFIG_H |
|
25 #include <config.h> |
|
26 #endif |
|
27 |
|
28 #include "oct-strstrm.h" |
|
29 |
|
30 // Position a stream at OFFSET relative to ORIGIN. |
|
31 |
|
32 int |
4933
|
33 octave_base_strstream::seek (long, int) |
2081
|
34 { |
4797
|
35 error ("fseek: invalid operation"); |
|
36 return -1; |
2081
|
37 } |
|
38 |
|
39 // Return current stream position. |
|
40 |
4797
|
41 long |
|
42 octave_base_strstream::tell (void) |
2081
|
43 { |
4797
|
44 error ("ftell: invalid operation"); |
|
45 return -1; |
2081
|
46 } |
|
47 |
3340
|
48 octave_stream |
3544
|
49 octave_istrstream::create (const char *data, std::ios::openmode arg_md, |
3340
|
50 oct_mach_info::float_format flt_fmt) |
|
51 { |
|
52 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt)); |
|
53 } |
|
54 |
|
55 octave_stream |
3544
|
56 octave_istrstream::create (const std::string& data, std::ios::openmode arg_md, |
3340
|
57 oct_mach_info::float_format flt_fmt) |
|
58 { |
|
59 return octave_stream (new octave_istrstream (data, arg_md, flt_fmt)); |
|
60 } |
|
61 |
|
62 octave_stream |
3544
|
63 octave_ostrstream::create (std::ios::openmode arg_md, |
3340
|
64 oct_mach_info::float_format flt_fmt) |
|
65 { |
|
66 return octave_stream (new octave_ostrstream (arg_md, flt_fmt)); |
|
67 } |
|
68 |
2081
|
69 /* |
|
70 ;;; Local Variables: *** |
|
71 ;;; mode: C++ *** |
|
72 ;;; End: *** |
|
73 */ |