#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 500 of file oct-stream.h.
|
private |
Definition at line 540 of file oct-stream.h.
stream_list::stream_list | ( | interpreter & | interp | ) |
Definition at line 7392 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 |
stream_list::~stream_list | ( | void | ) |
Definition at line 7415 of file oct-stream.cc.
References clear().
void stream_list::clear | ( | bool | flush = true | ) |
Definition at line 7535 of file oct-stream.cc.
References stream::close(), stream::is_valid(), m_list, m_lookup_cache, stream::name(), and transform().
Referenced by ~stream_list(), and remove().
int stream_list::get_file_number | ( | const octave_value & | fid | ) | const |
Definition at line 7673 of file oct-stream.cc.
References convert_to_valid_int(), error(), octave_value::is_single_type(), octave_value::is_string(), m_list, stream::name(), and octave_value::string_value().
Referenced by Ffclear(), Ffdisp(), Ffflush(), Fstat(), lookup(), and remove().
string_vector stream_list::get_info | ( | const octave_value & | fid | ) | const |
Definition at line 7608 of file oct-stream.cc.
References convert_to_valid_int(), error(), get_info(), and octave_value::is_single_type().
string_vector stream_list::get_info | ( | int | fid | ) | const |
Definition at line 7576 of file oct-stream.cc.
References stream::encoding(), stream::float_format(), float_format_as_string(), stream::is_valid(), m_list, m_lookup_cache, stream::mode(), stream::mode_as_string(), and stream::name().
Referenced by Ffopen(), and get_info().
int stream_list::insert | ( | stream & | os | ) |
Definition at line 7420 of file oct-stream.cc.
References error(), stream::file_number(), and m_list.
Referenced by stream_list(), Ffopen(), Fmkstemp(), Fpipe(), Fpopen(), Fpopen2(), and Ftmpfile().
std::string stream_list::list_open_files | ( | void | ) | const |
Definition at line 7623 of file oct-stream.cc.
References stream::float_format(), float_format_as_string(), left, m_list, stream::mode(), stream::mode_as_string(), and stream::name().
Referenced by Ffreport().
stream stream_list::lookup | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) | const |
Definition at line 7483 of file oct-stream.cc.
References get_file_number(), and lookup().
stream stream_list::lookup | ( | int | fid, |
const std::string & | who = "" |
||
) | const |
Definition at line 7460 of file oct-stream.cc.
References err_invalid_file_id(), m_list, and m_lookup_cache.
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 stream_list::open_file_numbers | ( | void | ) | const |
Definition at line 7655 of file oct-stream.cc.
References m_list, and Matrix::resize().
Referenced by Ffopen().
|
delete |
int stream_list::remove | ( | const octave_value & | fid, |
const std::string & | who = "" |
||
) |
Definition at line 7515 of file oct-stream.cc.
References clear(), get_file_number(), octave_value::is_string(), remove(), and octave_value::string_value().
int stream_list::remove | ( | int | fid, |
const std::string & | who = "" |
||
) |
Definition at line 7491 of file oct-stream.cc.
References stream::close(), err_invalid_file_id(), stream::is_valid(), m_list, and m_lookup_cache.
octave_value stream_list::stderr_file | ( | void | ) | const |
Definition at line 7723 of file oct-stream.cc.
References m_stderr_file, and octave_value().
Referenced by Fstderr().
octave_value stream_list::stdin_file | ( | void | ) | const |
Definition at line 7713 of file oct-stream.cc.
References m_stdin_file, and octave_value().
Referenced by Fstdin().
octave_value stream_list::stdout_file | ( | void | ) | const |
Definition at line 7718 of file oct-stream.cc.
References m_stdout_file, and octave_value().
Referenced by Fstdout().
|
private |
Definition at line 542 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 544 of file oct-stream.h.
Referenced by clear(), get_info(), lookup(), and remove().
|
private |
Definition at line 548 of file oct-stream.h.
Referenced by stream_list(), and stderr_file().
|
private |
Definition at line 546 of file oct-stream.h.
Referenced by stream_list(), and stdin_file().
|
private |
Definition at line 547 of file oct-stream.h.
Referenced by stream_list(), and stdout_file().