#include "oct-stream.h"
Public Member Functions | |
~octave_stream_list (void) | |
Static Public Member Functions | |
static void | clear (bool flush=true) |
static int | get_file_number (const octave_value &fid) |
static string_vector | get_info (int fid) |
static string_vector | get_info (const octave_value &fid) |
static int | insert (octave_stream &os) |
static bool | instance_ok (void) |
static std::string | list_open_files (void) |
static octave_stream | lookup (const octave_value &fid, const std::string &who=std::string()) |
static octave_stream | lookup (int fid, const std::string &who=std::string()) |
static octave_value | open_file_numbers (void) |
static int | remove (int fid, const std::string &who=std::string()) |
static int | remove (const octave_value &fid, const std::string &who=std::string()) |
Protected Member Functions | |
octave_stream_list (void) | |
Private Types | |
typedef std::map< int, octave_stream > | ostrl_map |
Private Member Functions | |
void | do_clear (bool flush=true) |
int | do_get_file_number (const octave_value &fid) const |
string_vector | do_get_info (const octave_value &fid) const |
string_vector | do_get_info (int fid) const |
int | do_insert (octave_stream &os) |
std::string | do_list_open_files (void) const |
octave_stream | do_lookup (int fid, const std::string &who=std::string()) const |
octave_stream | do_lookup (const octave_value &fid, const std::string &who=std::string()) const |
octave_value | do_open_file_numbers (void) const |
int | do_remove (int fid, const std::string &who=std::string()) |
int | do_remove (const octave_value &fid, const std::string &who=std::string()) |
Static Private Member Functions | |
static void | cleanup_instance (void) |
Private Attributes | |
ostrl_map | list |
ostrl_map::const_iterator | lookup_cache |
Static Private Attributes | |
static octave_stream_list * | instance = 0 |
Definition at line 646 of file oct-stream.h.
typedef std::map<int, octave_stream> octave_stream_list::ostrl_map [private] |
Definition at line 685 of file oct-stream.h.
octave_stream_list::octave_stream_list | ( | void | ) | [inline, protected] |
Definition at line 652 of file oct-stream.h.
Referenced by instance_ok().
octave_stream_list::~octave_stream_list | ( | void | ) | [inline] |
Definition at line 656 of file oct-stream.h.
static void octave_stream_list::cleanup_instance | ( | void | ) | [inline, static, private] |
Definition at line 693 of file oct-stream.h.
Referenced by instance_ok().
void octave_stream_list::clear | ( | bool | flush = true |
) | [static] |
Definition at line 3968 of file oct-stream.cc.
References do_clear(), and instance.
Referenced by close_files().
void octave_stream_list::do_clear | ( | bool | flush = true |
) | [private] |
Definition at line 4147 of file oct-stream.cc.
References octave_stream::close(), octave_stream::is_valid(), list, and lookup_cache.
Referenced by clear(), and do_remove().
int octave_stream_list::do_get_file_number | ( | const octave_value & | fid | ) | const [private] |
Definition at line 4267 of file oct-stream.cc.
References convert_to_valid_int(), error(), octave_value::is_string(), list, octave_stream::name(), and octave_value::string_value().
Referenced by get_file_number().
string_vector octave_stream_list::do_get_info | ( | int | fid | ) | const [private] |
Definition at line 4174 of file oct-stream.cc.
References do_lookup(), error(), octave_stream::float_format(), oct_mach_info::float_format_as_string(), octave_stream::is_valid(), octave_stream::mode(), octave_stream::mode_as_string(), octave_stream::name(), and string_vector::resize().
Referenced by do_get_info(), and get_info().
string_vector octave_stream_list::do_get_info | ( | const octave_value & | fid | ) | const [private] |
Definition at line 4195 of file oct-stream.cc.
References convert_to_valid_int(), do_get_info(), and error().
int octave_stream_list::do_insert | ( | octave_stream & | os | ) | [private] |
Definition at line 4006 of file oct-stream.cc.
References error(), octave_stream::file_number(), and list.
Referenced by insert().
std::string octave_stream_list::do_list_open_files | ( | void | ) | const [private] |
Definition at line 4212 of file oct-stream.cc.
References octave_stream::float_format(), oct_mach_info::float_format_as_string(), left, list, octave_stream::mode(), octave_stream::mode_as_string(), and octave_stream::name().
Referenced by list_open_files().
octave_stream octave_stream_list::do_lookup | ( | const octave_value & | fid, | |
const std::string & | who = std::string () | |||
) | const [private] |
Definition at line 4075 of file oct-stream.cc.
References do_lookup(), error_state, and get_file_number().
octave_stream octave_stream_list::do_lookup | ( | int | fid, | |
const std::string & | who = std::string () | |||
) | const [private] |
Definition at line 4047 of file oct-stream.cc.
References gripe_invalid_file_id(), list, and lookup_cache.
Referenced by do_get_info(), do_lookup(), and lookup().
octave_value octave_stream_list::do_open_file_numbers | ( | void | ) | const [private] |
Definition at line 4247 of file oct-stream.cc.
References list, and Matrix::resize().
Referenced by open_file_numbers().
Definition at line 4089 of file oct-stream.cc.
References octave_stream::close(), gripe_invalid_file_id(), octave_stream::is_valid(), list, and lookup_cache.
Referenced by do_remove(), and remove().
int octave_stream_list::do_remove | ( | const octave_value & | fid, | |
const std::string & | who = std::string () | |||
) | [private] |
Definition at line 4125 of file oct-stream.cc.
References do_clear(), do_remove(), error_state, get_file_number(), octave_value::is_string(), and octave_value::string_value().
int octave_stream_list::get_file_number | ( | const octave_value & | fid | ) | [static] |
Definition at line 4000 of file oct-stream.cc.
References do_get_file_number(), instance, and instance_ok().
Referenced by DEFUN(), DEFUNX(), do_lookup(), and do_remove().
string_vector octave_stream_list::get_info | ( | int | fid | ) | [static] |
Definition at line 3975 of file oct-stream.cc.
References do_get_info(), instance, and instance_ok().
Referenced by DEFUN().
string_vector octave_stream_list::get_info | ( | const octave_value & | fid | ) | [static] |
Definition at line 3981 of file oct-stream.cc.
References do_get_info(), instance, and instance_ok().
int octave_stream_list::insert | ( | octave_stream & | os | ) | [static] |
Definition at line 3938 of file oct-stream.cc.
References do_insert(), instance, and instance_ok().
Referenced by DEFUN(), DEFUNX(), and initialize_file_io().
bool octave_stream_list::instance_ok | ( | void | ) | [static] |
Definition at line 3915 of file oct-stream.cc.
References singleton_cleanup_list::add(), cleanup_instance(), error(), instance, and octave_stream_list().
Referenced by get_file_number(), get_info(), insert(), list_open_files(), lookup(), open_file_numbers(), and remove().
std::string octave_stream_list::list_open_files | ( | void | ) | [static] |
Definition at line 3987 of file oct-stream.cc.
References do_list_open_files(), instance, and instance_ok().
Referenced by DEFUN().
octave_stream octave_stream_list::lookup | ( | int | fid, | |
const std::string & | who = std::string () | |||
) | [static] |
Definition at line 3944 of file oct-stream.cc.
References do_lookup(), instance, and instance_ok().
Referenced by DEFUN(), DEFUN_DLD(), and DEFUNX().
octave_stream octave_stream_list::lookup | ( | const octave_value & | fid, | |
const std::string & | who = std::string () | |||
) | [static] |
Definition at line 3950 of file oct-stream.cc.
References do_lookup(), instance, and instance_ok().
octave_value octave_stream_list::open_file_numbers | ( | void | ) | [static] |
Definition at line 3993 of file oct-stream.cc.
References do_open_file_numbers(), instance, instance_ok(), and octave_value().
Referenced by DEFUN().
int octave_stream_list::remove | ( | const octave_value & | fid, | |
const std::string & | who = std::string () | |||
) | [static] |
Definition at line 3962 of file oct-stream.cc.
References do_remove(), instance, and instance_ok().
Definition at line 3956 of file oct-stream.cc.
References do_remove(), instance, and instance_ok().
Referenced by DEFUN().
octave_stream_list * octave_stream_list::instance = 0 [static, private] |
Definition at line 691 of file oct-stream.h.
Referenced by clear(), get_file_number(), get_info(), insert(), instance_ok(), list_open_files(), lookup(), open_file_numbers(), and remove().
ostrl_map octave_stream_list::list [private] |
Definition at line 687 of file oct-stream.h.
Referenced by do_clear(), do_get_file_number(), do_insert(), do_list_open_files(), do_lookup(), do_open_file_numbers(), and do_remove().
ostrl_map::const_iterator octave_stream_list::lookup_cache [mutable, private] |
Definition at line 689 of file oct-stream.h.
Referenced by do_clear(), do_lookup(), and do_remove().