GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "load-path.h"
Classes | |
class | dir_info |
class | file_info |
class | loader |
Public Types | |
typedef void(* | hook_fcn_ptr )(const std::string &dir) |
Public Member Functions | |
~load_path (void) | |
Static Public Member Functions | |
static void | append (const std::string &dir, bool warn=false) |
static void | clear (void) |
static bool | contains_canonical (const std::string &dir_name) |
static std::list< std::string > | dir_list (void) |
static string_vector | dirs (void) |
static void | display (std::ostream &os) |
static string_vector | fcn_names (void) |
static string_vector | files (const std::string &dir, bool omit_exts=false) |
static string_vector | find_all_first_of (const string_vector &files) |
static std::string | find_dir (const std::string &dir) |
static std::string | find_fcn (const std::string &fcn, std::string &dir_name, const std::string &pack_name=std::string()) |
static std::string | find_fcn (const std::string &fcn, const std::string &pack_name=std::string()) |
static std::string | find_fcn_file (const std::string &fcn, const std::string &pack_name=std::string()) |
static std::string | find_file (const std::string &file) |
static std::string | find_first_of (const string_vector &files) |
static string_vector | find_matching_dirs (const std::string &dir) |
static std::string | find_method (const std::string &class_name, const std::string &meth, std::string &dir_name, const std::string &pack_name=std::string()) |
static std::string | find_method (const std::string &class_name, const std::string &meth, const std::string &pack_name=std::string()) |
static std::string | find_mex_file (const std::string &fcn, const std::string &pack_name=std::string()) |
static std::string | find_oct_file (const std::string &fcn, const std::string &pack_name=std::string()) |
static bool | find_package (const std::string &package_name) |
static std::string | find_private_fcn (const std::string &dir, const std::string &fcn, const std::string &pack_name=std::string()) |
static std::list< std::string > | get_all_package_names (bool only_top_level=true) |
static std::string | get_command_line_path (void) |
static void | initialize (bool set_initial_path=false) |
static std::list< std::string > | methods (const std::string &class_name, const std::string &pack_name=std::string()) |
static std::list< std::string > | overloads (const std::string &meth) |
static std::string | path (void) |
static void | prepend (const std::string &dir, bool warn=false) |
static bool | remove (const std::string &dir) |
static void | set (const std::string &p, bool warn=false) |
static void | set_add_hook (hook_fcn_ptr f) |
static void | set_command_line_path (const std::string &p) |
static void | set_remove_hook (hook_fcn_ptr f) |
static std::string | system_path (void) |
static void | update (void) |
Protected Member Functions | |
load_path (void) | |
Private Types | |
typedef abs_dir_cache_type::iterator | abs_dir_cache_iterator |
typedef std::map< std::string, dir_info > | abs_dir_cache_type |
typedef abs_dir_cache_type::const_iterator | const_abs_dir_cache_iterator |
typedef dir_info_list_type::const_iterator | const_dir_info_list_iterator |
typedef fcn_map_type::const_iterator | const_fcn_map_iterator |
typedef file_info_list_type::const_iterator | const_file_info_list_iterator |
typedef loader_map_type::const_iterator | const_loader_map_iterator |
typedef method_map_type::const_iterator | const_method_map_iterator |
typedef private_fcn_map_type::const_iterator | const_private_fcn_map_iterator |
typedef dir_info_list_type::iterator | dir_info_list_iterator |
typedef std::list< dir_info > | dir_info_list_type |
typedef fcn_map_type::iterator | fcn_map_iterator |
typedef std::map< std::string, file_info_list_type > | fcn_map_type |
typedef file_info_list_type::iterator | file_info_list_iterator |
typedef std::list< file_info > | file_info_list_type |
typedef loader_map_type::iterator | loader_map_iterator |
typedef std::map< std::string, loader > | loader_map_type |
typedef method_map_type::iterator | method_map_iterator |
typedef std::map< std::string, fcn_map_type > | method_map_type |
typedef private_fcn_map_type::iterator | private_fcn_map_iterator |
typedef std::map< std::string, dir_info::fcn_file_map_type > | private_fcn_map_type |
Private Member Functions | |
void | add (const dir_info &di, bool at_end, const std::string &pname=std::string()) const |
bool | contains (const std::string &dir) const |
void | do_add (const std::string &dir, bool at_end, bool warn) |
void | do_append (const std::string &dir, bool warn) |
void | do_clear (void) |
bool | do_contains_canonical (const std::string &dir) const |
std::list< std::string > | do_dir_list (void) const |
string_vector | do_dirs (void) const |
void | do_display (std::ostream &os) const |
string_vector | do_fcn_names (void) const |
string_vector | do_files (const std::string &dir, bool omit_exts) const |
string_vector | do_find_all_first_of (const string_vector &files) const |
std::string | do_find_dir (const std::string &dir) const |
std::string | do_find_file (const std::string &file) const |
std::string | do_find_first_of (const string_vector &files) const |
string_vector | do_find_matching_dirs (const std::string &dir) const |
bool | do_find_package (const std::string &package_name) const |
std::list< std::string > | do_get_all_package_names (bool only_top_level) const |
std::string | do_get_command_line_path (void) const |
void | do_initialize (bool set_initial_path) |
void | do_move (dir_info_list_iterator i, bool at_end) |
std::list< std::string > | do_overloads (const std::string &meth) const |
std::string | do_path (void) const |
void | do_prepend (const std::string &dir, bool warn) |
bool | do_remove (const std::string &dir) |
void | do_set (const std::string &p, bool warn, bool is_init=false) |
std::string | do_system_path (void) const |
void | do_update (void) const |
const_dir_info_list_iterator | find_dir_info (const std::string &dir) const |
dir_info_list_iterator | find_dir_info (const std::string &dir) |
loader & | get_loader (const std::string &name) const |
bool | is_package (const std::string &name) const |
void | move (const dir_info &di, bool at_end, const std::string &pname=std::string()) |
void | remove (const dir_info &di, const std::string &pname=std::string()) |
Static Private Member Functions | |
static bool | check_file_type (std::string &fname, int type, int possible_types, const std::string &fcn, const char *who) |
static void | cleanup_instance (void) |
static bool | instance_ok (void) |
Private Attributes | |
loader | default_loader |
dir_info_list_type | dir_info_list |
std::set< std::string > | init_dirs |
loader_map_type | loader_map |
Static Private Attributes | |
static abs_dir_cache_type | abs_dir_cache |
static hook_fcn_ptr | add_hook = execute_pkg_add |
static std::string | command_line_path |
static load_path * | instance = 0 |
static const int | M_FILE = 1 |
static const int | MEX_FILE = 4 |
static const int | OCT_FILE = 2 |
static hook_fcn_ptr | remove_hook = execute_pkg_del |
static std::string | sys_path |
Friends | |
dir_info::fcn_file_map_type | get_fcn_files (const std::string &d) |
string_vector | get_file_list (const dir_info::fcn_file_map_type &lst) |
void | print_fcn_list (std::ostream &os, const dir_info::fcn_file_map_type &lst) |
void | print_types (std::ostream &os, int types) |
Definition at line 35 of file load-path.h.
|
private |
Definition at line 464 of file load-path.h.
|
private |
Definition at line 461 of file load-path.h.
|
private |
Definition at line 463 of file load-path.h.
|
private |
Definition at line 458 of file load-path.h.
|
private |
Definition at line 474 of file load-path.h.
|
private |
Definition at line 468 of file load-path.h.
|
private |
Definition at line 601 of file load-path.h.
|
private |
Definition at line 487 of file load-path.h.
|
private |
Definition at line 481 of file load-path.h.
|
private |
Definition at line 459 of file load-path.h.
|
private |
Definition at line 456 of file load-path.h.
|
private |
Definition at line 475 of file load-path.h.
|
private |
Definition at line 472 of file load-path.h.
|
private |
Definition at line 469 of file load-path.h.
|
private |
Definition at line 466 of file load-path.h.
typedef void(* load_path::hook_fcn_ptr)(const std::string &dir) |
Definition at line 46 of file load-path.h.
|
private |
Definition at line 602 of file load-path.h.
|
private |
Definition at line 599 of file load-path.h.
|
private |
Definition at line 488 of file load-path.h.
|
private |
Definition at line 485 of file load-path.h.
|
private |
Definition at line 482 of file load-path.h.
|
private |
Definition at line 479 of file load-path.h.
|
inlineprotected |
Definition at line 41 of file load-path.h.
Referenced by instance_ok().
|
inline |
Definition at line 48 of file load-path.h.
|
private |
Definition at line 1868 of file load-path.cc.
References load_path::loader::add(), get_loader(), and load_path::dir_info::package_dir_map.
Referenced by do_add(), and do_update().
|
inlinestatic |
Definition at line 68 of file load-path.h.
Referenced by Faddpath().
|
staticprivate |
Definition at line 993 of file load-path.cc.
References error(), M_FILE, MEX_FILE, and OCT_FILE.
Referenced by load_path::loader::find_fcn(), load_path::loader::find_method(), and load_path::loader::find_private_fcn().
|
inlinestaticprivate |
Definition at line 614 of file load-path.h.
Referenced by instance_ok().
|
inlinestatic |
Definition at line 56 of file load-path.h.
|
private |
Definition at line 383 of file load-path.cc.
References dir_info_list, and find_dir_info().
|
inlinestatic |
Definition at line 91 of file load-path.h.
Referenced by octave_qt_link::file_in_path().
|
inlinestatic |
Definition at line 232 of file load-path.h.
Referenced by load_path::loader::display(), load_path::loader::move(), and load_path::loader::remove().
|
inlinestatic |
Definition at line 227 of file load-path.h.
|
inlinestatic |
Definition at line 254 of file load-path.h.
Referenced by F__dump_load_path__().
Definition at line 745 of file load-path.cc.
References add(), add_hook, dir_info_list, do_move(), base_file_stat::error(), error_state, find_dir_info(), base_file_stat::is_dir(), strip_trailing_separators(), file_ops::tilde_expand(), warning(), and warning_with_id().
Referenced by do_append(), and do_prepend().
|
private |
|
private |
Definition at line 617 of file load-path.cc.
References load_path::loader::clear(), default_loader, dir_info_list, and loader_map.
Referenced by do_set().
|
private |
Definition at line 389 of file load-path.cc.
References dir_info_list, and same_file().
|
private |
Definition at line 1649 of file load-path.cc.
References dir_info_list.
|
private |
Definition at line 1632 of file load-path.cc.
References dir_info_list.
|
private |
Definition at line 1805 of file load-path.cc.
References default_loader, dir_info_list, load_path::loader::display(), string_vector::empty(), get_file_list, string_vector::list_in_columns(), loader_map, and load_path::dir_info::class_info::method_file_map.
|
private |
Definition at line 1690 of file load-path.cc.
References default_loader, and load_path::loader::fcn_names().
|
private |
Definition at line 1662 of file load-path.cc.
References dir_info_list, find_dir_info(), and Array< T >::length().
|
private |
Definition at line 1563 of file load-path.cc.
References octave_env::absolute_pathname(), file_ops::concat(), dir_info_list, file_ops::dir_sep_chars(), base_file_stat::exists(), Array< T >::length(), string_vector::resize(), and octave_env::rooted_relative_pathname().
|
private |
Definition at line 1390 of file load-path.cc.
References octave_env::absolute_pathname(), dir_info_list, file_ops::dir_sep_chars(), file_ops::dir_sep_str(), base_file_stat::exists(), base_file_stat::is_dir(), file_ops::is_dir_sep(), octave_env::make_absolute(), and octave_env::rooted_relative_pathname().
|
private |
Definition at line 1330 of file load-path.cc.
References octave_env::absolute_pathname(), file_ops::concat(), dir_info_list, file_ops::dir_sep_chars(), base_file_stat::exists(), find_private_file(), Array< T >::length(), and octave_env::rooted_relative_pathname().
|
private |
Definition at line 1484 of file load-path.cc.
References octave_env::absolute_pathname(), file_ops::concat(), dir_info_list, file_ops::dir_sep_chars(), base_file_stat::exists(), Array< T >::length(), string_vector::resize(), and octave_env::rooted_relative_pathname().
|
private |
Definition at line 1437 of file load-path.cc.
References octave_env::absolute_pathname(), dir_info_list, file_ops::dir_sep_chars(), file_ops::dir_sep_str(), base_file_stat::exists(), base_file_stat::is_dir(), file_ops::is_dir_sep(), octave_env::make_absolute(), and octave_env::rooted_relative_pathname().
|
inlineprivate |
Definition at line 683 of file load-path.h.
|
private |
Definition at line 2188 of file load-path.cc.
References loader_map.
|
inlineprivate |
Definition at line 721 of file load-path.h.
References command_line_path.
|
private |
Definition at line 579 of file load-path.cc.
References command_line_path, do_set(), octave_env::getenv(), maybe_add_path_elts(), dir_path::path_sep_str(), sys_path, Vfcn_file_dir, Vlocal_api_fcn_file_dir, Vlocal_api_oct_file_dir, Vlocal_fcn_file_dir, Vlocal_oct_file_dir, Vlocal_ver_fcn_file_dir, Vlocal_ver_oct_file_dir, Voct_data_dir, and Voct_file_dir.
|
private |
Definition at line 501 of file load-path.cc.
References dir_info_list, and move().
Referenced by do_add().
|
private |
Definition at line 1257 of file load-path.cc.
References default_loader, loader_map, and load_path::loader::overloads().
|
private |
Definition at line 1713 of file load-path.cc.
References dirs(), Array< T >::length(), and dir_path::path_sep_str().
|
private |
|
private |
Definition at line 892 of file load-path.cc.
References dir_info_list, find_dir_info(), remove_hook, strip_trailing_separators(), file_ops::tilde_expand(), and warning().
Definition at line 660 of file load-path.cc.
References add_hook, dir_info_list, do_append(), do_clear(), do_prepend(), init_dirs, action_container::protect_var(), unwind_protect::run_first(), split_path(), and warning_with_id().
Referenced by do_initialize().
|
inlineprivate |
Definition at line 719 of file load-path.h.
|
private |
Definition at line 970 of file load-path.cc.
References add(), load_path::loader::clear(), default_loader, dir_info_list, loader_map, and load_path::dir_info::update().
|
inlinestatic |
Definition at line 244 of file load-path.h.
Referenced by F__list_functions__(), and make_name_list().
|
inlinestatic |
Definition at line 238 of file load-path.h.
Referenced by F__list_functions__().
|
inlinestatic |
Definition at line 221 of file load-path.h.
Referenced by Ffile_in_loadpath().
|
inlinestatic |
Definition at line 203 of file load-path.h.
Referenced by contents_file_in_path(), and Fdir_in_loadpath().
|
private |
Definition at line 347 of file load-path.cc.
References dir_info_list, and file_ops::tilde_expand().
Referenced by contains(), do_add(), do_files(), and do_remove().
|
private |
Definition at line 365 of file load-path.cc.
References dir_info_list, and file_ops::tilde_expand().
|
inlinestatic |
Definition at line 143 of file load-path.h.
Referenced by symbol_table::fcn_info::fcn_info_rep::find_user_function(), out_of_date_check(), and symbol_exist().
|
inlinestatic |
Definition at line 151 of file load-path.h.
|
inlinestatic |
Definition at line 167 of file load-path.h.
Referenced by do_which(), and fcn_file_in_path().
|
inlinestatic |
Definition at line 197 of file load-path.h.
Referenced by do_which(), file_in_path(), octave_qt_link::file_in_path(), find_data_file_in_load_path(), and lookup_autoload().
|
inlinestatic |
Definition at line 215 of file load-path.h.
Referenced by Ffile_in_loadpath().
|
inlinestatic |
Definition at line 209 of file load-path.h.
Referenced by Fdir_in_loadpath().
|
inlinestatic |
Definition at line 96 of file load-path.h.
Referenced by cdef_method::cdef_method_rep::check_method(), load_path::loader::find_fcn(), Fismethod(), octave_class::load_ascii(), octave_class::load_binary(), symbol_table::fcn_info::fcn_info_rep::load_class_constructor(), symbol_table::fcn_info::fcn_info_rep::load_class_method(), octave_class::load_hdf5(), out_of_date_check(), read_mat5_binary_element(), octave_class::save_ascii(), octave_class::save_binary(), octave_class::save_hdf5(), and save_mat5_binary_element().
|
inlinestatic |
Definition at line 107 of file load-path.h.
|
inlinestatic |
Definition at line 187 of file load-path.h.
Referenced by mex_file_in_path().
|
inlinestatic |
Definition at line 177 of file load-path.h.
Referenced by oct_file_in_path().
|
inlinestatic |
Definition at line 129 of file load-path.h.
Referenced by cdef_manager::do_find_package().
|
inlinestatic |
Definition at line 158 of file load-path.h.
Referenced by symbol_table::fcn_info::fcn_info_rep::load_private_function().
|
inlinestatic |
Definition at line 136 of file load-path.h.
Referenced by package_getAllPackages().
|
inlinestatic |
Definition at line 272 of file load-path.h.
Referenced by Fcommand_line_path().
|
inlineprivate |
Definition at line 665 of file load-path.h.
|
inlinestatic |
Definition at line 50 of file load-path.h.
References set_initial_path.
Referenced by Frestoredefaultpath(), and octave_initialize_interpreter().
|
staticprivate |
Definition at line 322 of file load-path.cc.
References singleton_cleanup_list::add(), cleanup_instance(), error(), instance, and load_path().
|
private |
Definition at line 1243 of file load-path.cc.
References dir_info_list.
|
inlinestatic |
Definition at line 115 of file load-path.h.
Referenced by F__methods__(), and cdef_class::make_meta_class().
|
private |
Definition at line 519 of file load-path.cc.
References get_loader(), load_path::loader::move(), and load_path::dir_info::package_dir_map.
Referenced by do_move().
|
inlinestatic |
Definition at line 123 of file load-path.h.
Referenced by make_fcn_handle().
|
inlinestatic |
Definition at line 249 of file load-path.h.
Referenced by Faddpath(), Fpath(), and Frmpath().
|
inlinestatic |
Definition at line 74 of file load-path.h.
Referenced by Faddpath(), and octave_qt_link::file_in_path().
|
inlinestatic |
Definition at line 80 of file load-path.h.
Referenced by Frmpath().
|
private |
Definition at line 933 of file load-path.cc.
References get_loader(), load_path::dir_info::package_dir_map, and load_path::loader::remove().
|
inlinestatic |
Definition at line 62 of file load-path.h.
Referenced by Fpath().
|
inlinestatic |
Definition at line 260 of file load-path.h.
References f.
|
inlinestatic |
Definition at line 264 of file load-path.h.
References command_line_path, and dir_path::path_sep_str().
Referenced by octave_initialize_interpreter().
|
inlinestatic |
Definition at line 262 of file load-path.h.
References f.
|
inlinestatic |
Definition at line 278 of file load-path.h.
Referenced by F__pathorig__(), Frestoredefaultpath(), read_mat5_binary_element(), and octave_fcn_handle::set_fcn().
|
inlinestatic |
Definition at line 85 of file load-path.h.
Referenced by symbol_table::fcn_info::fcn_info_rep::builtin_find(), symbol_table::fcn_info::fcn_info_rep::find(), make_fcn_handle(), octave_change_to_directory(), octave_base_reader::octave_gets(), and rehash_internal().
|
friend |
Definition at line 243 of file load-path.cc.
Referenced by load_path::dir_info::get_method_file_map(), and load_path::dir_info::get_private_file_map().
|
friend |
Definition at line 1775 of file load-path.cc.
Referenced by do_display(), and load_path::dir_info::initialize().
|
friend |
Definition at line 1759 of file load-path.cc.
Referenced by load_path::loader::display().
|
friend |
Definition at line 1731 of file load-path.cc.
Referenced by load_path::loader::display(), and print_fcn_list().
|
staticprivate |
Definition at line 624 of file load-path.h.
Referenced by load_path::dir_info::initialize(), and load_path::dir_info::update().
|
staticprivate |
Definition at line 616 of file load-path.h.
|
staticprivate |
Definition at line 620 of file load-path.h.
Referenced by do_initialize().
|
mutableprivate |
Definition at line 606 of file load-path.h.
Referenced by do_clear(), do_display(), do_fcn_names(), do_overloads(), and do_update().
|
mutableprivate |
Definition at line 608 of file load-path.h.
Referenced by contains(), do_add(), do_clear(), do_contains_canonical(), do_dir_list(), do_dirs(), do_display(), do_files(), do_find_all_first_of(), do_find_dir(), do_find_file(), do_find_first_of(), do_find_matching_dirs(), do_move(), do_remove(), do_set(), do_update(), find_dir_info(), and is_package().
|
mutableprivate |
Definition at line 610 of file load-path.h.
Referenced by do_set().
|
staticprivate |
Definition at line 612 of file load-path.h.
Referenced by instance_ok().
|
mutableprivate |
Definition at line 604 of file load-path.h.
Referenced by do_clear(), do_display(), do_get_all_package_names(), do_overloads(), and do_update().
|
staticprivate |
Definition at line 285 of file load-path.h.
Referenced by load_path::loader::add_to_fcn_map(), check_file_type(), get_fcn_files(), and print_types().
|
staticprivate |
Definition at line 287 of file load-path.h.
Referenced by load_path::loader::add_to_fcn_map(), check_file_type(), get_fcn_files(), get_file_list(), and print_types().
|
staticprivate |
Definition at line 286 of file load-path.h.
Referenced by load_path::loader::add_to_fcn_map(), check_file_type(), get_fcn_files(), get_file_list(), and print_types().
|
staticprivate |
Definition at line 618 of file load-path.h.
Referenced by do_remove().
|
staticprivate |
Definition at line 622 of file load-path.h.
Referenced by load_path::loader::add_to_fcn_map(), and do_initialize().