#include "load-path.h"
Classes | |
class | dir_info |
class | file_info |
class | package_info |
Public Types | |
typedef void(* | hook_fcn_ptr) (const std::string &dir) |
Static Public Member Functions | |
static void | execute_pkg_add (const std::string &dir) |
static void | execute_pkg_del (const std::string &dir) |
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 method_map_type::const_iterator | const_method_map_iterator |
typedef package_map_type::const_iterator | const_package_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 method_map_type::iterator | method_map_iterator |
typedef std::map< std::string, fcn_map_type > | method_map_type |
typedef package_map_type::iterator | package_map_iterator |
typedef std::map< std::string, package_info > | package_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 std::string &dir, bool at_end, bool warn) |
void | add (const dir_info &di, bool at_end, const std::string &pname="", bool updating=false) const |
bool | contains (const std::string &dir) 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) |
string_vector | get_file_list (const dir_info::fcn_file_map_type &lst) const |
package_info & | get_package (const std::string &name) const |
bool | is_package (const std::string &name) const |
void | move (dir_info_list_iterator i, bool at_end) |
void | move (const dir_info &di, bool at_end, const std::string &pname="") |
void | remove (const dir_info &di, const std::string &pname="") |
Static Private Attributes | |
static abs_dir_cache_type | abs_dir_cache |
static const int | M_FILE = 1 |
static const int | MEX_FILE = 4 |
static const int | OCT_FILE = 2 |
static std::string | sys_path |
Friends | |
dir_info::fcn_file_map_type | get_fcn_files (const std::string &d) |
Definition at line 41 of file load-path.h.
|
private |
Definition at line 347 of file load-path.h.
|
private |
Definition at line 344 of file load-path.h.
|
private |
Definition at line 346 of file load-path.h.
|
private |
Definition at line 341 of file load-path.h.
|
private |
Definition at line 357 of file load-path.h.
|
private |
Definition at line 351 of file load-path.h.
|
private |
Definition at line 370 of file load-path.h.
|
private |
Definition at line 496 of file load-path.h.
|
private |
Definition at line 364 of file load-path.h.
|
private |
Definition at line 342 of file load-path.h.
|
private |
Definition at line 339 of file load-path.h.
|
private |
Definition at line 358 of file load-path.h.
|
private |
Definition at line 355 of file load-path.h.
|
private |
Definition at line 352 of file load-path.h.
|
private |
Definition at line 349 of file load-path.h.
typedef void(* octave::load_path::hook_fcn_ptr) (const std::string &dir) |
Definition at line 53 of file load-path.h.
|
private |
Definition at line 371 of file load-path.h.
|
private |
Definition at line 368 of file load-path.h.
|
private |
Definition at line 497 of file load-path.h.
|
private |
Definition at line 494 of file load-path.h.
|
private |
Definition at line 365 of file load-path.h.
|
private |
Definition at line 362 of file load-path.h.
|
inline |
Definition at line 47 of file load-path.h.
|
delete |
|
default |
|
private |
Definition at line 931 of file load-path.cc.
References add_hook, dir_info_list, octave::sys::base_file_stat::error(), find_dir_info(), fs, i, octave::sys::base_file_stat::is_dir(), move(), string, strip_trailing_separators(), octave::sys::file_ops::tilde_expand(), warning(), and warning_with_id().
|
private |
Definition at line 1018 of file load-path.cc.
References octave::load_path::package_info::add(), add(), get_package(), octave::load_path::dir_info::package_dir_map, pname, and string.
void octave::load_path::append | ( | const std::string & | dir, |
bool | warn = false |
||
) |
void octave::load_path::clear | ( | void | ) |
Definition at line 247 of file load-path.cc.
References octave::load_path::package_info::clear(), dir_info_list, package_map, and top_level_package.
Referenced by set().
|
private |
Definition at line 887 of file load-path.cc.
References dir_info_list, and find_dir_info().
bool octave::load_path::contains_canonical | ( | const std::string & | dir_name | ) | const |
Definition at line 382 of file load-path.cc.
References d, dir_info_list, retval, and same_file().
std::list< std::string > octave::load_path::dir_list | ( | void | ) | const |
Definition at line 735 of file load-path.cc.
References dir_info_list, and retval.
Referenced by octave::load_path::package_info::display(), octave::load_path::package_info::move(), and octave::load_path::package_info::remove().
string_vector octave::load_path::dirs | ( | void | ) | const |
Definition at line 720 of file load-path.cc.
References dir_info_list, k, and retval.
Referenced by path().
void octave::load_path::display | ( | std::ostream & | os | ) | const |
Definition at line 798 of file load-path.cc.
References dir_info_list, octave::load_path::package_info::display(), string_vector::empty(), get_file_list(), string_vector::list_in_columns(), octave::load_path::dir_info::class_info::method_file_map, os, package_map, and top_level_package.
|
static |
Definition at line 837 of file load-path.cc.
References execute_pkg_add_or_del().
|
static |
Definition at line 843 of file load-path.cc.
References execute_pkg_add_or_del().
string_vector octave::load_path::fcn_names | ( | void | ) | const |
Definition at line 774 of file load-path.cc.
References octave::load_path::package_info::fcn_names(), and top_level_package.
string_vector octave::load_path::files | ( | const std::string & | dir, |
bool | omit_exts = false |
||
) | const |
Definition at line 746 of file load-path.cc.
References dir_info_list, find_dir_info(), fname, i, if(), octave_value::numel(), p, retval, and string.
string_vector octave::load_path::find_all_first_of | ( | const string_vector & | files | ) | const |
Definition at line 652 of file load-path.cc.
References octave::sys::env::absolute_pathname(), octave::sys::file_ops::concat(), dir_info_list, octave::sys::file_ops::dir_sep_chars(), octave::sys::base_file_stat::exists(), file, fs, i, Array< T >::numel(), string_vector::resize(), octave::sys::env::rooted_relative_pathname(), and string.
std::string octave::load_path::find_dir | ( | const std::string & | dir | ) | const |
Definition at line 483 of file load-path.cc.
References octave::sys::env::absolute_pathname(), dir_info_list, octave::sys::file_ops::dir_sep_chars(), octave::sys::file_ops::dir_sep_str(), octave::sys::base_file_stat::exists(), fs, octave::sys::base_file_stat::is_dir(), octave::sys::file_ops::is_dir_sep(), octave::sys::env::make_absolute(), retval, octave::sys::env::rooted_relative_pathname(), and string.
|
private |
Definition at line 851 of file load-path.cc.
References dir_info_list, retval, string, and octave::sys::file_ops::tilde_expand().
Referenced by add(), contains(), files(), and remove().
|
private |
Definition at line 869 of file load-path.cc.
References dir_info_list, retval, string, and octave::sys::file_ops::tilde_expand().
|
inline |
Definition at line 109 of file load-path.h.
References fcn.
Referenced by octave::fcn_info::fcn_info_rep::find_user_function(), octave::out_of_date_check(), and symbol_exist().
|
inline |
Definition at line 115 of file load-path.h.
|
inline |
Definition at line 129 of file load-path.h.
std::string octave::load_path::find_file | ( | const std::string & | file | ) | const |
Definition at line 428 of file load-path.cc.
References octave::sys::env::absolute_pathname(), octave::sys::file_ops::concat(), dir_info_list, octave::sys::file_ops::dir_sep_chars(), octave::sys::base_file_stat::exists(), file, find_private_file(), fs, i, Array< T >::numel(), retval, octave::sys::env::rooted_relative_pathname(), and string.
std::string octave::load_path::find_first_of | ( | const string_vector & | files | ) | const |
Definition at line 575 of file load-path.cc.
References octave::sys::env::absolute_pathname(), octave::sys::file_ops::concat(), dir_info_list, octave::sys::file_ops::dir_sep_chars(), done, octave::sys::base_file_stat::exists(), file, fs, i, Array< T >::numel(), string_vector::resize(), retval, octave::sys::env::rooted_relative_pathname(), and string.
string_vector octave::load_path::find_matching_dirs | ( | const std::string & | dir | ) | const |
Definition at line 529 of file load-path.cc.
References octave::sys::env::absolute_pathname(), dir_info_list, octave::sys::file_ops::dir_sep_chars(), octave::sys::file_ops::dir_sep_str(), octave::sys::base_file_stat::exists(), fs, octave::sys::base_file_stat::is_dir(), octave::sys::file_ops::is_dir_sep(), octave::sys::env::make_absolute(), octave::sys::env::rooted_relative_pathname(), and string.
|
inline |
Definition at line 77 of file load-path.h.
Referenced by octave::load_path::package_info::find_fcn(), octave_class::load_ascii(), octave_class::load_binary(), octave::fcn_info::fcn_info_rep::load_class_constructor(), octave::fcn_info::fcn_info_rep::load_class_method(), octave_class::load_hdf5(), octave::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().
|
inline |
Definition at line 85 of file load-path.h.
References string.
|
inline |
Definition at line 143 of file load-path.h.
|
inline |
Definition at line 136 of file load-path.h.
|
inline |
Definition at line 101 of file load-path.h.
|
inline |
Definition at line 122 of file load-path.h.
References fcn.
Referenced by octave::fcn_info::fcn_info_rep::load_private_function().
|
inline |
Definition at line 172 of file load-path.h.
std::list< std::string > octave::load_path::get_all_package_names | ( | bool | only_top_level = true | ) | const |
Definition at line 414 of file load-path.cc.
References package_map, and retval.
|
inline |
Definition at line 189 of file load-path.h.
|
private |
Definition at line 1039 of file load-path.cc.
References MEX_FILE, nm, OCT_FILE, retval, and string.
Referenced by display(), and octave::load_path::dir_info::initialize().
|
inlineprivate |
|
inline |
Definition at line 173 of file load-path.h.
Definition at line 209 of file load-path.cc.
References octave::config::fcn_file_dir(), octave::sys::env::getenv(), octave::config::local_api_fcn_file_dir(), octave::config::local_api_oct_file_dir(), octave::config::local_fcn_file_dir(), octave::config::local_oct_file_dir(), octave::config::local_ver_fcn_file_dir(), octave::config::local_ver_oct_file_dir(), m_command_line_path, maybe_add_path_elts(), octave::config::oct_data_dir(), octave::config::oct_file_dir(), octave::directory_path::path_sep_str(), string, and sys_path.
|
private |
Definition at line 1006 of file load-path.cc.
References dir_info_list, and name.
|
inline |
Definition at line 93 of file load-path.h.
|
private |
Definition at line 893 of file load-path.cc.
References dir_info_list, and i.
|
private |
Definition at line 911 of file load-path.cc.
References get_package(), octave::load_path::package_info::move(), move(), octave::load_path::dir_info::package_dir_map, pname, and string.
std::list< std::string > octave::load_path::overloads | ( | const std::string & | meth | ) | const |
Definition at line 399 of file load-path.cc.
References octave::load_path::package_info::overloads(), package_map, retval, and top_level_package.
Referenced by make_fcn_handle().
std::string octave::load_path::path | ( | void | ) | const |
Definition at line 780 of file load-path.cc.
References dirs(), i, Array< T >::numel(), octave::directory_path::path_sep_str(), and string.
void octave::load_path::prepend | ( | const std::string & | dir, |
bool | warn = false |
||
) |
bool octave::load_path::remove | ( | const std::string & | dir | ) |
Definition at line 322 of file load-path.cc.
References dir_info_list, find_dir_info(), i, remove_hook, retval, string, strip_trailing_separators(), octave::sys::file_ops::tilde_expand(), and warning().
|
private |
Definition at line 986 of file load-path.cc.
References get_package(), octave::load_path::dir_info::package_dir_map, pname, octave::load_path::package_info::remove(), and string.
void octave::load_path::set | ( | const std::string & | p, |
bool | warn = false , |
||
bool | is_init = false |
||
) |
Definition at line 257 of file load-path.cc.
References add_hook, append(), clear(), dir_info_list, frame, init_dirs, p, prepend(), octave::action_container::protect_var(), octave::unwind_protect::run_first(), split_path(), and warning_with_id().
|
inline |
Definition at line 175 of file load-path.h.
References f.
|
inline |
Definition at line 181 of file load-path.h.
References p, and octave::directory_path::path_sep_str().
|
inline |
Definition at line 176 of file load-path.h.
References f.
|
inline |
Definition at line 194 of file load-path.h.
Referenced by read_mat5_binary_element(), and octave_fcn_handle::set_fcn().
void octave::load_path::update | ( | void | ) | const |
Definition at line 363 of file load-path.cc.
References add(), octave::load_path::package_info::clear(), dir_info_list, package_map, and top_level_package.
Referenced by octave::fcn_info::fcn_info_rep::builtin_find(), octave::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 1067 of file load-path.cc.
Referenced by octave::load_path::dir_info::get_method_file_map(), and octave::load_path::dir_info::get_private_file_map().
|
staticprivate |
Definition at line 511 of file load-path.h.
Referenced by octave::load_path::dir_info::initialize(), and octave::load_path::dir_info::update().
|
private |
Definition at line 513 of file load-path.h.
|
mutableprivate |
Definition at line 503 of file load-path.h.
Referenced by add(), clear(), contains(), contains_canonical(), dir_list(), dirs(), display(), files(), find_all_first_of(), find_dir(), find_dir_info(), find_file(), find_first_of(), find_matching_dirs(), is_package(), move(), remove(), set(), and update().
|
mutableprivate |
Definition at line 505 of file load-path.h.
Referenced by set().
|
private |
Definition at line 507 of file load-path.h.
Referenced by initialize().
|
staticprivate |
Definition at line 198 of file load-path.h.
Referenced by octave::load_path::package_info::add_to_fcn_map(), octave::load_path::package_info::check_file_type(), octave::get_fcn_files(), and octave::load_path::package_info::print_types().
|
staticprivate |
Definition at line 200 of file load-path.h.
Referenced by octave::load_path::package_info::add_to_fcn_map(), octave::load_path::package_info::check_file_type(), octave::get_fcn_files(), get_file_list(), and octave::load_path::package_info::print_types().
|
staticprivate |
Definition at line 199 of file load-path.h.
Referenced by octave::load_path::package_info::add_to_fcn_map(), octave::load_path::package_info::check_file_type(), octave::get_fcn_files(), get_file_list(), and octave::load_path::package_info::print_types().
|
mutableprivate |
Definition at line 499 of file load-path.h.
Referenced by clear(), display(), get_all_package_names(), overloads(), and update().
|
private |
Definition at line 515 of file load-path.h.
Referenced by remove().
|
staticprivate |
Definition at line 509 of file load-path.h.
Referenced by octave::load_path::package_info::add_to_fcn_map(), and initialize().
|
mutableprivate |
Definition at line 501 of file load-path.h.
Referenced by clear(), display(), fcn_names(), overloads(), and update().