Mercurial > octave
comparison libinterp/corefcn/textscan.h @ 21490:243b04c97b56
textscan: Use references rather than pointers to stream objects
* textscan.cc, textscan.h (textscan::scan, textscan::do_scan): Accept
a reference to a std::istream rather than a pointer. (Ftextscan): Pass
streams by reference.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 18 Mar 2016 16:36:40 -0700 |
parents | 9dbc8f8bc2d7 |
children | ab0a19882615 |
comparison
equal
deleted
inserted
replaced
21489:ea81c2fdd568 | 21490:243b04c97b56 |
---|---|
59 | 59 |
60 textscan (void); | 60 textscan (void); |
61 | 61 |
62 ~textscan (void) { } | 62 ~textscan (void) { } |
63 | 63 |
64 octave_value scan (std::istream *isp, const octave_value_list& args); | 64 octave_value scan (std::istream& isp, const octave_value_list& args); |
65 | 65 |
66 private: | 66 private: |
67 | 67 |
68 friend class textscan_format_list; | 68 friend class textscan_format_list; |
69 | 69 |
122 bool default_exp; | 122 bool default_exp; |
123 bool numeric_delim; | 123 bool numeric_delim; |
124 | 124 |
125 octave_idx_type lines; | 125 octave_idx_type lines; |
126 | 126 |
127 octave_value do_scan (std::istream *isp, textscan_format_list& fmt_list, | 127 octave_value do_scan (std::istream& isp, textscan_format_list& fmt_list, |
128 octave_idx_type ntimes); | 128 octave_idx_type ntimes); |
129 | 129 |
130 void parse_options (const octave_value_list& args, | 130 void parse_options (const octave_value_list& args, |
131 textscan_format_list& fmt_list); | 131 textscan_format_list& fmt_list); |
132 | 132 |