2081
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
2081
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_octave_procstream_h) |
|
24 #define octave_octave_procstream_h 1 |
|
25 |
|
26 #include "oct-stdstrm.h" |
|
27 |
3652
|
28 // XXX FIXME XXX -- why don't these classes use iprocstream and |
|
29 // oprocstream, which in turn use the octave_procbuf class? |
|
30 |
2081
|
31 class |
4327
|
32 octave_iprocstream : public octave_stdiostream |
2081
|
33 { |
|
34 public: |
|
35 |
3523
|
36 octave_iprocstream (const std::string& n, |
3544
|
37 std::ios::openmode arg_md = std::ios::in, |
2317
|
38 oct_mach_info::float_format flt_fmt = |
|
39 oct_mach_info::native); |
2081
|
40 |
3340
|
41 static octave_stream |
3544
|
42 create (const std::string& n, std::ios::openmode arg_md = std::ios::in, |
3340
|
43 oct_mach_info::float_format flt_fmt = oct_mach_info::native); |
|
44 |
|
45 protected: |
|
46 |
2081
|
47 ~octave_iprocstream (void); |
|
48 |
|
49 private: |
|
50 |
|
51 // No copying! |
|
52 |
|
53 octave_iprocstream (const octave_iprocstream&); |
|
54 |
|
55 octave_iprocstream& operator = (const octave_iprocstream&); |
|
56 }; |
|
57 |
|
58 class |
4327
|
59 octave_oprocstream : public octave_stdiostream |
2081
|
60 { |
|
61 public: |
|
62 |
3523
|
63 octave_oprocstream (const std::string& n, |
3544
|
64 std::ios::openmode arg_md = std::ios::out, |
2317
|
65 oct_mach_info::float_format flt_fmt = |
|
66 oct_mach_info::native); |
2081
|
67 |
3340
|
68 static octave_stream |
3544
|
69 create (const std::string& n, std::ios::openmode arg_md = std::ios::out, |
3340
|
70 oct_mach_info::float_format flt_fmt = oct_mach_info::native); |
|
71 |
|
72 protected: |
|
73 |
2081
|
74 ~octave_oprocstream (void); |
|
75 |
|
76 private: |
|
77 |
|
78 // No copying! |
|
79 |
|
80 octave_oprocstream (const octave_oprocstream&); |
|
81 |
|
82 octave_oprocstream& operator = (const octave_oprocstream&); |
|
83 }; |
|
84 |
|
85 #endif |
|
86 |
|
87 /* |
|
88 ;;; Local Variables: *** |
|
89 ;;; mode: C++ *** |
|
90 ;;; End: *** |
|
91 */ |