#include "oct-stream.h"
Public Member Functions | |
stream_list (const stream_list &)=delete | |
stream_list (interpreter &interp) | |
~stream_list (void) | |
void | clear (bool flush=true) |
int | get_file_number (const octave_value &fid) const |
string_vector | get_info (const octave_value &fid) const |
string_vector | get_info (int fid) const |
int | insert (stream &os) |
std::string | list_open_files (void) const |
stream | lookup (const octave_value &fid, const std::string &who="") const |
stream | lookup (int fid, const std::string &who="") const |
octave_value | open_file_numbers (void) const |
stream_list & | operator= (const stream_list &)=delete |
int | remove (const octave_value &fid, const std::string &who="") |
int | remove (int 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 | m_list |
ostrl_map::const_iterator | m_lookup_cache |
int | m_stderr_file |
int | m_stdin_file |
int | m_stdout_file |
Definition at line 428 of file oct-stream.h.
|
private |
Definition at line 466 of file oct-stream.h.
octave::stream_list::stream_list | ( | interpreter & | interp | ) |
Definition at line 7359 of file oct-stream.cc.
References octave::output_system::__stdout__(), octave_istream::create(), octave_ostream::create(), octave::interpreter::get_output_system(), insert(), m_stderr_file, m_stdin_file, and m_stdout_file.
|
delete |
octave::stream_list::~stream_list | ( | void | ) |
Definition at line 7382 of file oct-stream.cc.
References clear().
void octave::stream_list::clear | ( | bool | flush = true | ) |
Definition at line 7502 of file oct-stream.cc.
References octave::stream::close(), octave::stream::is_valid(), m_list, m_lookup_cache, name, octave::stream::name(), and transform().
Referenced by ~stream_list(), and remove().
int octave::stream_list::get_file_number | ( | const octave_value & | fid | ) | const |
Definition at line 7640 of file oct-stream.cc.
References octave::convert_to_valid_int(), error(), octave_value::is_single_type(), octave_value::is_string(), m_list, octave::stream::name(), retval, and octave_value::string_value().
Referenced by Ffclear(), Ffdisp(), Ffflush(), Fstat(), lookup(), and remove().
string_vector octave::stream_list::get_info | ( | const octave_value & | fid | ) | const |
Definition at line 7575 of file oct-stream.cc.
References octave::convert_to_valid_int(), error(), get_info(), and octave_value::is_single_type().
string_vector octave::stream_list::get_info | ( | int | fid | ) | const |
Definition at line 7543 of file oct-stream.cc.
References octave::stream::encoding(), octave::stream::float_format(), octave::mach_info::float_format_as_string(), octave::stream::is_valid(), m_list, m_lookup_cache, octave::stream::mode(), octave::stream::mode_as_string(), octave::stream::name(), and retval.
Referenced by Ffopen(), and get_info().
int octave::stream_list::insert | ( | stream & | os | ) |
Definition at line 7387 of file oct-stream.cc.
References error(), octave::stream::file_number(), and m_list.
Referenced by stream_list(), Ffopen(), Fmkstemp(), Fpipe(), Fpopen(), Fpopen2(), and Ftmpfile().
std::string octave::stream_list::list_open_files | ( | void | ) | const |
Definition at line 7590 of file oct-stream.cc.
References octave::stream::float_format(), octave::mach_info::float_format_as_string(), octave::left, m_list, octave::stream::mode(), octave::stream::mode_as_string(), and octave::stream::name().
Referenced by Ffreport().
stream octave::stream_list::lookup | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) | const |
Definition at line 7450 of file oct-stream.cc.
References get_file_number(), and lookup().
stream octave::stream_list::lookup | ( | int | fid, |
const std::string & | who = "" |
||
) | const |
Definition at line 7427 of file oct-stream.cc.
References octave::err_invalid_file_id(), m_list, m_lookup_cache, and retval.
Referenced by Fdlmread(), Fdup2(), Ffclear(), Ffcntl(), Ffdisp(), Ffeof(), Fferror(), Ffflush(), Ffgetl(), Ffgets(), Ffread(), Ffrewind(), Ffseek(), Ffskipl(), Fftell(), Ffwrite(), lookup(), printf_internal(), puts_internal(), scanf_internal(), and textscan_internal().
octave_value octave::stream_list::open_file_numbers | ( | void | ) | const |
Definition at line 7622 of file oct-stream.cc.
References m_list, Array< T >::resize(), and retval.
Referenced by Ffopen().
|
delete |
int octave::stream_list::remove | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) |
Definition at line 7482 of file oct-stream.cc.
References clear(), get_file_number(), octave_value::is_string(), remove(), retval, and octave_value::string_value().
int octave::stream_list::remove | ( | int | fid, |
const std::string & | who = "" |
||
) |
Definition at line 7458 of file oct-stream.cc.
References octave::stream::close(), octave::err_invalid_file_id(), octave::stream::is_valid(), m_list, and m_lookup_cache.
octave_value octave::stream_list::stderr_file | ( | void | ) | const |
Definition at line 7690 of file oct-stream.cc.
References m_stderr_file, and octave_value().
Referenced by Fstderr().
octave_value octave::stream_list::stdin_file | ( | void | ) | const |
Definition at line 7680 of file oct-stream.cc.
References m_stdin_file, and octave_value().
Referenced by Fstdin().
octave_value octave::stream_list::stdout_file | ( | void | ) | const |
Definition at line 7685 of file oct-stream.cc.
References m_stdout_file, and octave_value().
Referenced by Fstdout().
|
private |
Definition at line 468 of file oct-stream.h.
Referenced by clear(), get_file_number(), get_info(), insert(), list_open_files(), lookup(), open_file_numbers(), and remove().
|
mutableprivate |
Definition at line 470 of file oct-stream.h.
Referenced by clear(), get_info(), lookup(), and remove().
|
private |
Definition at line 474 of file oct-stream.h.
Referenced by stream_list(), and stderr_file().
|
private |
Definition at line 472 of file oct-stream.h.
Referenced by stream_list(), and stdin_file().
|
private |
Definition at line 473 of file oct-stream.h.
Referenced by stream_list(), and stdout_file().