#include "oct-stream.h"
Public Member Functions | |
stream_list (const stream_list &)=delete | |
OCTINTERP_API | stream_list (interpreter &interp) |
OCTINTERP_API | ~stream_list (void) |
OCTINTERP_API void | clear (bool flush=true) |
OCTINTERP_API int | get_file_number (const octave_value &fid) const |
OCTINTERP_API string_vector | get_info (const octave_value &fid) const |
OCTINTERP_API string_vector | get_info (int fid) const |
OCTINTERP_API int | insert (stream &os) |
OCTINTERP_API std::string | list_open_files (void) const |
OCTINTERP_API stream | lookup (const octave_value &fid, const std::string &who="") const |
OCTINTERP_API stream | lookup (int fid, const std::string &who="") const |
OCTINTERP_API octave_value | open_file_numbers (void) const |
stream_list & | operator= (const stream_list &)=delete |
OCTINTERP_API int | remove (const octave_value &fid, const std::string &who="") |
OCTINTERP_API int | remove (int fid, const std::string &who="") |
OCTINTERP_API octave_value | stderr_file (void) const |
OCTINTERP_API octave_value | stdin_file (void) const |
OCTINTERP_API 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 459 of file oct-stream.h.
|
private |
Definition at line 498 of file oct-stream.h.
octave::stream_list::stream_list | ( | interpreter & | interp | ) |
Definition at line 7355 of file oct-stream.cc.
References output_system::__stdout__(), istream::create(), ostream::create(), 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 7378 of file oct-stream.cc.
References clear().
void octave::stream_list::clear | ( | bool | flush = true | ) |
Definition at line 7498 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 7636 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(), and octave_value::string_value().
string_vector octave::stream_list::get_info | ( | const octave_value & | fid | ) | const |
Definition at line 7571 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 7539 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(), and octave::stream::name().
Referenced by get_info().
Definition at line 7383 of file oct-stream.cc.
References error(), octave::stream::file_number(), and m_list.
Referenced by stream_list().
std::string octave::stream_list::list_open_files | ( | void | ) | const |
Definition at line 7586 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().
stream octave::stream_list::lookup | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) | const |
Definition at line 7446 of file oct-stream.cc.
References get_file_number(), and lookup().
Definition at line 7423 of file oct-stream.cc.
References octave::err_invalid_file_id(), m_list, and m_lookup_cache.
Referenced by lookup().
octave_value octave::stream_list::open_file_numbers | ( | void | ) | const |
Definition at line 7618 of file oct-stream.cc.
References m_list, and Matrix::resize().
|
delete |
int octave::stream_list::remove | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) |
Definition at line 7478 of file oct-stream.cc.
References clear(), get_file_number(), octave_value::is_string(), remove(), and octave_value::string_value().
Definition at line 7454 of file oct-stream.cc.
References octave::stream::close(), octave::err_invalid_file_id(), octave::stream::is_valid(), m_list, and m_lookup_cache.
Referenced by remove().
octave_value octave::stream_list::stderr_file | ( | void | ) | const |
Definition at line 7686 of file oct-stream.cc.
References m_stderr_file, and octave_value().
octave_value octave::stream_list::stdin_file | ( | void | ) | const |
Definition at line 7676 of file oct-stream.cc.
References m_stdin_file, and octave_value().
octave_value octave::stream_list::stdout_file | ( | void | ) | const |
Definition at line 7681 of file oct-stream.cc.
References m_stdout_file, and octave_value().
|
private |
Definition at line 500 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 502 of file oct-stream.h.
Referenced by clear(), get_info(), lookup(), and remove().
|
private |
Definition at line 506 of file oct-stream.h.
Referenced by stream_list(), and stderr_file().
|
private |
Definition at line 504 of file oct-stream.h.
Referenced by stream_list(), and stdin_file().
|
private |
Definition at line 505 of file oct-stream.h.
Referenced by stream_list(), and stdout_file().