Mercurial > hg > octave-nkf
annotate libinterp/corefcn/oct-fstrm.h @ 20404:b0f7ee81d974 stable
doc: Remove extra spaces at start of docstring which show up in Info format.
* intro.txi: Use blank line between end of example and seealso.
* utils.cc: Remove stray comment from previous cset.
* annotation.m: Overhaul docstring.
* subspace.m: Re-indent academic reference.
* condest.m: Remove blank column of spaces in front of license.
* onenormest.m: Remove blank column of spaces in front of license.
* sinc.m: Remove extra single space at start of line.
* invhilb.m: Remove extra single space at start of line.
* gls.m: Remove extra single space at start of line.
* ols.m: Remove extra single space at start of line.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 14 May 2015 14:25:37 -0700 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
2081 | 1 /* |
2 | |
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19007
diff
changeset
|
3 Copyright (C) 1996-2015 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 | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
2081 | 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 | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
2081 | 20 |
21 */ | |
22 | |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
23 #if !defined (octave_oct_fstrm_h) |
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
24 #define octave_oct_fstrm_h 1 |
2081 | 25 |
3503 | 26 #include <fstream> |
3775 | 27 #include <string> |
2081 | 28 |
29 #include "oct-stream.h" | |
30 | |
31 class | |
32 octave_fstream : public octave_base_stream | |
33 { | |
34 public: | |
35 | |
3523 | 36 octave_fstream (const std::string& nm_arg, |
10313 | 37 std::ios::openmode arg_md = std::ios::in|std::ios::out, |
38 oct_mach_info::float_format flt_fmt | |
39 = oct_mach_info::native_float_format ()); | |
2081 | 40 |
3340 | 41 static octave_stream |
3544 | 42 create (const std::string& nm_arg, |
10313 | 43 std::ios::openmode arg_md = std::ios::in|std::ios::out, |
44 oct_mach_info::float_format flt_fmt | |
45 = oct_mach_info::native_float_format ()); | |
2081 | 46 |
47 // Position a stream at OFFSET relative to ORIGIN. | |
48 | |
16011
8122286c69a9
initial large file support for 32-bit systems
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
49 int seek (off_t offset, int origin); |
2081 | 50 |
51 // Return current stream position. | |
52 | |
16011
8122286c69a9
initial large file support for 32-bit systems
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
53 off_t tell (void); |
2081 | 54 |
19007
9ac2357f19bc
doc: Replace "non-zero" with "nonzero" to match existing usage.
Rik <rik@octave.org>
parents:
17822
diff
changeset
|
55 // Return nonzero if EOF has been reached on this stream. |
2081 | 56 |
57 bool eof (void) const; | |
58 | |
3652 | 59 void do_close (void); |
60 | |
2081 | 61 // The name of the file. |
62 | |
3523 | 63 std::string name (void) const { return nm; } |
2081 | 64 |
3523 | 65 std::istream *input_stream (void); |
2081 | 66 |
3523 | 67 std::ostream *output_stream (void); |
2081 | 68 |
3340 | 69 protected: |
70 | |
71 ~octave_fstream (void) { } | |
72 | |
2081 | 73 private: |
74 | |
3523 | 75 std::string nm; |
2081 | 76 |
3551 | 77 std::fstream fs; |
2081 | 78 |
79 // No copying! | |
80 | |
81 octave_fstream (const octave_fstream&); | |
82 | |
83 octave_fstream& operator = (const octave_fstream&); | |
84 }; | |
85 | |
86 #endif |