annotate libinterp/corefcn/procstream.h @ 25438:cb1606f78f6b

prefer <istream>, <ostream>, or <iosfwd> to <iostream> where possible Using <iostream> brings with it a static initializer for the std::cin, std::cout, and std::cerr streams. In most cases they are not needed and should be avoided if possible. Files affected: build-aux/mk-opts.pl libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp libinterp/corefcn/__dsearchn__.cc libinterp/corefcn/c-file-ptr-stream.cc libinterp/corefcn/c-file-ptr-stream.h libinterp/corefcn/daspk.cc libinterp/corefcn/dasrt.cc libinterp/corefcn/dassl.cc libinterp/corefcn/defaults.cc libinterp/corefcn/defun.cc libinterp/corefcn/file-io.cc libinterp/corefcn/ft-text-renderer.cc libinterp/corefcn/gl-render.cc libinterp/corefcn/help.cc libinterp/corefcn/ls-ascii-helper.cc libinterp/corefcn/ls-hdf5.cc libinterp/corefcn/ls-hdf5.h libinterp/corefcn/ls-mat-ascii.cc libinterp/corefcn/ls-mat4.cc libinterp/corefcn/ls-mat5.cc libinterp/corefcn/ls-oct-binary.cc libinterp/corefcn/ls-oct-text.cc libinterp/corefcn/lsode.cc libinterp/corefcn/oct-iostrm.cc libinterp/corefcn/oct-procbuf.cc libinterp/corefcn/oct-stdstrm.h libinterp/corefcn/procstream.cc libinterp/corefcn/procstream.h libinterp/corefcn/quad.cc libinterp/corefcn/symscope.h libinterp/corefcn/symtab.h libinterp/corefcn/toplev.cc libinterp/corefcn/urlwrite.cc libinterp/corefcn/utils.cc libinterp/corefcn/zfstream.cc libinterp/dldfcn/__ode15__.cc libinterp/dldfcn/convhulln.cc libinterp/octave-value/ov-base-diag.cc libinterp/octave-value/ov-base-int.cc libinterp/octave-value/ov-base-mat.cc libinterp/octave-value/ov-base-scalar.cc libinterp/octave-value/ov-base-sparse.cc libinterp/octave-value/ov-base.cc libinterp/octave-value/ov-bool-mat.cc libinterp/octave-value/ov-bool-sparse.cc libinterp/octave-value/ov-bool.cc libinterp/octave-value/ov-cell.cc libinterp/octave-value/ov-ch-mat.cc libinterp/octave-value/ov-class.cc libinterp/octave-value/ov-colon.cc libinterp/octave-value/ov-complex.cc libinterp/octave-value/ov-cs-list.cc libinterp/octave-value/ov-cx-mat.cc libinterp/octave-value/ov-cx-sparse.cc libinterp/octave-value/ov-fcn-handle.cc libinterp/octave-value/ov-fcn-inline.cc libinterp/octave-value/ov-float.cc libinterp/octave-value/ov-flt-complex.cc libinterp/octave-value/ov-flt-cx-mat.cc libinterp/octave-value/ov-flt-re-mat.cc libinterp/octave-value/ov-int16.cc libinterp/octave-value/ov-int32.cc libinterp/octave-value/ov-int64.cc libinterp/octave-value/ov-int8.cc libinterp/octave-value/ov-java.cc libinterp/octave-value/ov-range.cc libinterp/octave-value/ov-re-mat.cc libinterp/octave-value/ov-re-sparse.cc libinterp/octave-value/ov-scalar.cc libinterp/octave-value/ov-str-mat.cc libinterp/octave-value/ov-struct.cc libinterp/octave-value/ov-typeinfo.cc libinterp/octave-value/ov-uint16.cc libinterp/octave-value/ov-uint32.cc libinterp/octave-value/ov-uint64.cc libinterp/octave-value/ov-uint8.cc libinterp/octave.cc libinterp/parse-tree/bp-table.cc libinterp/parse-tree/lex.h libinterp/parse-tree/profiler.cc libinterp/parse-tree/pt-arg-list.cc libinterp/parse-tree/pt-array-list.cc libinterp/parse-tree/pt-assign.cc libinterp/parse-tree/pt-cell.cc libinterp/parse-tree/pt-const.cc libinterp/parse-tree/pt-eval.cc libinterp/parse-tree/pt-exp.cc libinterp/parse-tree/pt-fcn-handle.cc libinterp/parse-tree/pt-jit.cc libinterp/parse-tree/pt-pr-code.cc libinterp/parse-tree/pt-tm-const.cc libinterp/parse-tree/pt.cc liboctave/array/Array.cc liboctave/array/CColVector.cc liboctave/array/CDiagMatrix.cc liboctave/array/CMatrix.cc liboctave/array/CNDArray.cc liboctave/array/CRowVector.cc liboctave/array/CSparse.cc liboctave/array/DiagArray2.cc liboctave/array/MArray.cc liboctave/array/Range.cc liboctave/array/Sparse.cc liboctave/array/boolMatrix.cc liboctave/array/boolSparse.cc liboctave/array/chMatrix.cc liboctave/array/dColVector.cc liboctave/array/dDiagMatrix.cc liboctave/array/dMatrix.cc liboctave/array/dNDArray.cc liboctave/array/dRowVector.cc liboctave/array/dSparse.cc liboctave/array/fCColVector.cc liboctave/array/fCDiagMatrix.cc liboctave/array/fCMatrix.cc liboctave/array/fCNDArray.cc liboctave/array/fCRowVector.cc liboctave/array/fColVector.cc liboctave/array/fDiagMatrix.cc liboctave/array/fMatrix.cc liboctave/array/fNDArray.cc liboctave/array/fRowVector.cc liboctave/array/idx-vector.cc liboctave/numeric/CollocWt.cc liboctave/numeric/eigs-base.cc liboctave/system/file-ops.cc liboctave/system/oct-time.cc liboctave/util/cmd-hist.cc liboctave/util/data-conv.cc liboctave/util/data-conv.h liboctave/util/file-info.cc liboctave/util/lo-utils.cc liboctave/util/lo-utils.h liboctave/util/quit.cc liboctave/util/str-vec.cc liboctave/util/url-transfer.cc liboctave/util/url-transfer.h
author John W. Eaton <jwe@octave.org>
date Thu, 07 Jun 2018 10:11:54 -0400
parents 6652d3823428
children 00f796120a6d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
1 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
2
25054
6652d3823428 maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
3 Copyright (C) 1993-2018 John W. Eaton
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
4
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23795
diff changeset
7 Octave is free software: you can redistribute it and/or modify it
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
8 under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23795
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
10 (at your option) any later version.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
11
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
12 Octave is distributed in the hope that it will be useful, but
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
13 WITHOUT ANY WARRANTY; without even the implied warranty of
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
15 GNU General Public License for more details.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
16
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6316
diff changeset
18 along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23795
diff changeset
19 <https://www.gnu.org/licenses/>.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
20
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
21 */
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
22
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 20088
diff changeset
23 #if ! defined (octave_procstream_h)
383
0b52c68ec81f [project @ 1994-03-09 21:19:44 by jwe]
jwe
parents: 240
diff changeset
24 #define octave_procstream_h 1
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
25
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
26 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
27
25438
cb1606f78f6b prefer <istream>, <ostream>, or <iosfwd> to <iostream> where possible
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
28 #include <iosfwd>
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
29 #include <string>
2095
36903d507b0e [project @ 1996-04-28 09:00:07 by jwe]
jwe
parents: 1996
diff changeset
30
36903d507b0e [project @ 1996-04-28 09:00:07 by jwe]
jwe
parents: 1996
diff changeset
31 #include <sys/types.h>
36903d507b0e [project @ 1996-04-28 09:00:07 by jwe]
jwe
parents: 1996
diff changeset
32
36903d507b0e [project @ 1996-04-28 09:00:07 by jwe]
jwe
parents: 1996
diff changeset
33 #include "oct-procbuf.h"
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
34
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
35 class
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5307
diff changeset
36 OCTINTERP_API
3544
71bd2d124119 [project @ 2000-02-02 21:02:31 by jwe]
jwe
parents: 3537
diff changeset
37 procstreambase : virtual public std::ios
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
38 {
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
39 public:
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
40
11584
cda4aa780d58 Another round of initialising members in the constructor initialisation list
Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
parents: 11523
diff changeset
41 procstreambase (void) : pb () { pb_init (); }
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
42
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
43 procstreambase (const std::string& name, int mode);
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
44
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
45 procstreambase (const char *name, int mode);
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
46
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
47 ~procstreambase (void) { close (); }
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
48
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
49 void open (const std::string& name, int mode)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
50 { open (name.c_str (), mode); }
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
51
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
52 void open (const char *name, int mode);
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
53
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
54 int is_open (void) const { return pb.is_open (); }
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
55
483
41a70d08c1f7 [project @ 1994-06-30 18:30:21 by jwe]
jwe
parents: 453
diff changeset
56 int close (void);
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
57
6316
a3a2580435c2 [project @ 2007-02-16 07:23:49 by jwe]
jwe
parents: 6109
diff changeset
58 pid_t pid (void) const { return pb.pid (); }
a3a2580435c2 [project @ 2007-02-16 07:23:49 by jwe]
jwe
parents: 6109
diff changeset
59
a3a2580435c2 [project @ 2007-02-16 07:23:49 by jwe]
jwe
parents: 6109
diff changeset
60 int file_number (void) const { return pb.file_number (); }
2095
36903d507b0e [project @ 1996-04-28 09:00:07 by jwe]
jwe
parents: 1996
diff changeset
61
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
62 private:
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
63
2095
36903d507b0e [project @ 1996-04-28 09:00:07 by jwe]
jwe
parents: 1996
diff changeset
64 octave_procbuf pb;
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
65
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
66 void pb_init (void) { init (&pb); }
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
67
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
68 procstreambase (const procstreambase&);
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
69
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
70 procstreambase& operator = (const procstreambase&);
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
71 };
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
72
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
73 class
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5307
diff changeset
74 OCTINTERP_API
3775
13905c3a24af [project @ 2001-02-06 01:56:59 by jwe]
jwe
parents: 3652
diff changeset
75 iprocstream : public std::istream, public procstreambase
13905c3a24af [project @ 2001-02-06 01:56:59 by jwe]
jwe
parents: 3652
diff changeset
76 // iprocstream : public procstreambase, public std::istream
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
77 {
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
78 public:
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
79
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
80 iprocstream (void) : std::istream (nullptr), procstreambase () { }
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
81
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
82 iprocstream (const std::string& name, int mode = std::ios::in)
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
83 : std::istream (nullptr), procstreambase (name, mode) { }
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
84
3544
71bd2d124119 [project @ 2000-02-02 21:02:31 by jwe]
jwe
parents: 3537
diff changeset
85 iprocstream (const char *name, int mode = std::ios::in)
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
86 : std::istream (nullptr), procstreambase (name, mode) { }
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
87
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
88 ~iprocstream (void) = default;
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
89
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
90 void open (const std::string& name, int mode = std::ios::in)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
91 { procstreambase::open (name, mode); }
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
92
3544
71bd2d124119 [project @ 2000-02-02 21:02:31 by jwe]
jwe
parents: 3537
diff changeset
93 void open (const char *name, int mode = std::ios::in)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
94 { procstreambase::open (name, mode); }
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
95
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
96 private:
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
97
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
98 iprocstream (const iprocstream&);
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
99
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
100 iprocstream& operator = (const iprocstream&);
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
101 };
1448
067f11a46742 [project @ 1995-09-20 03:41:58 by jwe]
jwe
parents: 1380
diff changeset
102
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
103 class
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5307
diff changeset
104 OCTINTERP_API
3775
13905c3a24af [project @ 2001-02-06 01:56:59 by jwe]
jwe
parents: 3652
diff changeset
105 oprocstream : public std::ostream, public procstreambase
13905c3a24af [project @ 2001-02-06 01:56:59 by jwe]
jwe
parents: 3652
diff changeset
106 // oprocstream : public procstreambase, public std::ostream
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
107 {
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
108 public:
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11584
diff changeset
109
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
110 oprocstream (void) : std::ostream (nullptr), procstreambase () { }
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
111
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
112 oprocstream (const std::string& name, int mode = std::ios::out)
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
113 : std::ostream (nullptr), procstreambase (name, mode) { }
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
114
3544
71bd2d124119 [project @ 2000-02-02 21:02:31 by jwe]
jwe
parents: 3537
diff changeset
115 oprocstream (const char *name, int mode = std::ios::out)
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
116 : std::ostream (nullptr), procstreambase (name, mode) { }
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
117
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
118 ~oprocstream (void) = default;
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
119
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
120 void open (const std::string& name, int mode = std::ios::out)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
121 { procstreambase::open (name, mode); }
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
122
3544
71bd2d124119 [project @ 2000-02-02 21:02:31 by jwe]
jwe
parents: 3537
diff changeset
123 void open (const char *name, int mode = std::ios::out)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
124 { procstreambase::open (name, mode); }
1380
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
125
79f80c6229be [project @ 1995-09-12 07:03:33 by jwe]
jwe
parents: 1315
diff changeset
126 private:
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
127
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
128 oprocstream (const oprocstream&);
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
129
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
130 oprocstream& operator = (const oprocstream&);
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
131 };
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
132
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
133 class
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5307
diff changeset
134 OCTINTERP_API
3775
13905c3a24af [project @ 2001-02-06 01:56:59 by jwe]
jwe
parents: 3652
diff changeset
135 procstream : public std::iostream, public procstreambase
13905c3a24af [project @ 2001-02-06 01:56:59 by jwe]
jwe
parents: 3652
diff changeset
136 // procstream : public procstreambase, public std::iostream
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
137 {
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
138 public:
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
139
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
140 procstream (void) : std::iostream (nullptr), procstreambase () { }
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
141
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
142 procstream (const std::string& name, int mode)
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
143 : std::iostream (nullptr), procstreambase (name, mode) { }
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
144
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
145 procstream (const char *name, int mode)
23795
980f39c3ab90 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23220
diff changeset
146 : std::iostream (nullptr), procstreambase (name, mode) { }
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
147
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
148 ~procstream (void) = default;
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
149
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
150 void open (const std::string& name, int mode)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
151 { procstreambase::open (name, mode); }
4051
b79da8779a0e [project @ 2002-08-17 19:38:32 by jwe]
jwe
parents: 3775
diff changeset
152
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
153 void open (const char *name, int mode)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
154 { procstreambase::open (name, mode); }
1965
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
155
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
156 private:
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
157
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
158 procstream (const procstream&);
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
159
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
160 procstream& operator = (const procstream&);
01e3ed56c415 [project @ 1996-02-17 02:02:50 by jwe]
jwe
parents: 1884
diff changeset
161 };
1448
067f11a46742 [project @ 1995-09-20 03:41:58 by jwe]
jwe
parents: 1380
diff changeset
162
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
163 #endif