#include "oct-stream.h"
Public Member Functions | |
stream_list (interpreter &interp) | |
stream_list (const stream_list &)=delete | |
~stream_list (void) | |
void | clear (bool flush=true) |
int | get_file_number (const octave_value &fid) const |
string_vector | get_info (int fid) const |
string_vector | get_info (const octave_value &fid) const |
int | insert (stream &os) |
std::string | list_open_files (void) const |
stream | lookup (int fid, const std::string &who="") const |
stream | lookup (const octave_value &fid, const std::string &who="") const |
octave_value | open_file_numbers (void) const |
stream_list & | operator= (const stream_list &)=delete |
int | remove (int fid, const std::string &who="") |
int | remove (const octave_value &fid, const std::string &who="") |
octave_value | stderr_file (void) const |
octave_value | stdin_file (void) const |
octave_value | stdout_file (void) const |
Private Types | |
typedef std::map< int, stream > | ostrl_map |
Private Attributes | |
ostrl_map | list |
ostrl_map::const_iterator | lookup_cache |
int | m_stderr_file |
int | m_stdin_file |
int | m_stdout_file |
Definition at line 414 of file oct-stream.h.
|
private |
Definition at line 452 of file oct-stream.h.
octave::stream_list::stream_list | ( | interpreter & | interp | ) |
Definition at line 7286 of file oct-stream.cc.
References octave_istream::create(), octave_ostream::create(), insert(), m_stderr_file, m_stdin_file, m_stdout_file, and octave_stdout.
|
delete |
octave::stream_list::~stream_list | ( | void | ) |
Definition at line 7306 of file oct-stream.cc.
References clear().
void octave::stream_list::clear | ( | bool | flush = true | ) |
Definition at line 7426 of file oct-stream.cc.
References octave::stream::close(), fid, octave::stream::is_valid(), list, octave::stream::name(), name, os, string, and transform().
Referenced by ~stream_list().
int octave::stream_list::get_file_number | ( | const octave_value & | fid | ) | const |
Definition at line 7560 of file oct-stream.cc.
References octave::convert_to_valid_int(), error(), fid, list, octave::stream::name(), nm, os, retval, and string.
string_vector octave::stream_list::get_info | ( | int | fid | ) | const |
string_vector octave::stream_list::get_info | ( | const octave_value & | fid | ) | const |
Definition at line 7498 of file oct-stream.cc.
References octave::convert_to_valid_int(), error(), and fid.
int octave::stream_list::insert | ( | stream & | os | ) |
Definition at line 7311 of file oct-stream.cc.
References error(), octave::stream::file_number(), list, and os.
Referenced by stream_list().
std::string octave::stream_list::list_open_files | ( | void | ) | const |
Definition at line 7510 of file oct-stream.cc.
References octave::stream::float_format(), octave::mach_info::float_format_as_string(), left, list, octave::stream::mode(), octave::stream::name(), os, and right.
stream octave::stream_list::lookup | ( | int | fid, |
const std::string & | who = "" |
||
) | const |
Definition at line 7351 of file oct-stream.cc.
References octave::err_invalid_file_id(), fid, list, lookup_cache, and retval.
Referenced by Fdup2(), Ffrewind(), and Ffwrite().
stream octave::stream_list::lookup | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) | const |
Definition at line 7374 of file oct-stream.cc.
octave_value octave::stream_list::open_file_numbers | ( | void | ) | const |
Definition at line 7542 of file oct-stream.cc.
References list, octave_value::resize(), and retval.
Referenced by if().
|
delete |
int octave::stream_list::remove | ( | int | fid, |
const std::string & | who = "" |
||
) |
Definition at line 7382 of file oct-stream.cc.
References octave::stream::close(), octave::err_invalid_file_id(), fid, octave::stream::is_valid(), list, and os.
int octave::stream_list::remove | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) |
Definition at line 7406 of file oct-stream.cc.
octave_value octave::stream_list::stderr_file | ( | void | ) | const |
Definition at line 7608 of file oct-stream.cc.
References octave_value().
octave_value octave::stream_list::stdin_file | ( | void | ) | const |
Definition at line 7598 of file oct-stream.cc.
References octave_value().
octave_value octave::stream_list::stdout_file | ( | void | ) | const |
Definition at line 7603 of file oct-stream.cc.
References octave_value().
|
private |
Definition at line 454 of file oct-stream.h.
|
mutableprivate |
Definition at line 456 of file oct-stream.h.
Referenced by lookup().
|
private |
Definition at line 460 of file oct-stream.h.
Referenced by stream_list().
|
private |
Definition at line 458 of file oct-stream.h.
Referenced by stream_list().
|
private |
Definition at line 459 of file oct-stream.h.
Referenced by stream_list().