#include "oct-env.h"
Public Member Functions | |
env (const env &)=delete | |
env & | operator= (const env &)=delete |
Static Public Member Functions | |
static bool | absolute_pathname (const std::string &s) |
static std::string | base_pathname (const std::string &s) |
static bool | chdir (const std::string &newdir) |
static std::string | get_current_directory (void) |
static std::string | get_home_directory (void) |
static std::string | get_host_name (void) |
static std::string | get_program_invocation_name (void) |
static std::string | get_program_name (void) |
static std::string | get_temp_directory (void) |
static std::string | get_user_config_directory (void) |
static std::string | get_user_data_directory (void) |
static std::string | get_user_name (void) |
static std::string | getenv (const std::string &name) |
static bool | have_x11_display (void) |
static std::string | make_absolute (const std::string &s, const std::string &dot_path=get_current_directory()) |
static std::string | polite_directory_format (const std::string &name) |
static void | putenv (const std::string &name, const std::string &value) |
static bool | rooted_relative_pathname (const std::string &s) |
static void | set_program_name (const std::string &s) |
Protected Member Functions | |
env (void) | |
Private Member Functions | |
bool | do_absolute_pathname (const std::string &s) const |
std::string | do_base_pathname (const std::string &s) const |
bool | do_chdir (const std::string &newdir) |
std::string | do_get_home_directory (void) |
std::string | do_get_host_name (void) |
std::string | do_get_temp_directory (void) const |
std::string | do_get_user_config_directory (void) |
std::string | do_get_user_data_directory (void) |
std::string | do_get_user_name (void) |
std::string | do_getcwd (void) |
std::string | do_getenv (const std::string &name) const |
std::string | do_make_absolute (const std::string &s, const std::string &dot_path) const |
std::string | do_polite_directory_format (const std::string &name) |
void | do_putenv (const std::string &name, const std::string &value) const |
bool | do_rooted_relative_pathname (const std::string &s) const |
void | do_set_program_name (const std::string &s) |
void | error (const std::string &) const |
void | error (int) const |
void | pathname_backup (std::string &path, int n) const |
Static Private Member Functions | |
static void | cleanup_instance (void) |
static bool | instance_ok (void) |
Private Attributes | |
std::string | m_current_directory |
bool | m_follow_symbolic_links |
std::string | m_host_name |
std::string | m_prog_invocation_name |
std::string | m_prog_name |
std::string | m_user_name |
bool | m_verbatim_pwd |
Static Private Attributes | |
static env * | m_instance = nullptr |
|
protected |
Definition at line 72 of file oct-env.cc.
Referenced by instance_ok().
|
delete |
|
static |
Definition at line 110 of file oct-env.cc.
References do_absolute_pathname(), instance_ok(), and m_instance.
|
static |
Definition at line 124 of file oct-env.cc.
References do_base_pathname(), instance_ok(), and m_instance.
|
static |
Definition at line 317 of file oct-env.cc.
References do_chdir(), instance_ok(), and m_instance.
|
inlinestaticprivate |
Definition at line 139 of file oct-env.h.
Referenced by instance_ok().
|
private |
Definition at line 379 of file oct-env.cc.
References is_dir_sep(), and len.
Referenced by absolute_pathname(), do_base_pathname(), and do_make_absolute().
|
private |
Definition at line 428 of file oct-env.cc.
References dir_sep_chars, do_absolute_pathname(), and do_rooted_relative_pathname().
Referenced by base_pathname().
|
private |
Definition at line 600 of file oct-env.cc.
References chdir(), do_getcwd(), do_make_absolute(), is_dir_sep(), m_current_directory, and m_follow_symbolic_links.
Referenced by chdir().
|
private |
Definition at line 536 of file oct-env.cc.
References dir_sep_str(), do_getenv(), and getuid().
Referenced by do_get_user_config_directory(), do_get_user_data_directory(), do_polite_directory_format(), and get_home_directory().
|
private |
Definition at line 576 of file oct-env.cc.
References m_host_name, and octave_gethostname_wrapper().
Referenced by get_host_name().
|
private |
Definition at line 208 of file oct-env.cc.
References do_getenv().
Referenced by get_temp_directory().
|
private |
Definition at line 249 of file oct-env.cc.
References dir_sep_str(), do_get_home_directory(), do_getenv(), and u8_from_wstring().
Referenced by get_user_config_directory().
|
private |
Definition at line 270 of file oct-env.cc.
References data_dir(), dir_sep_str(), do_get_home_directory(), do_getenv(), and u8_from_wstring().
Referenced by get_user_data_directory().
|
private |
Definition at line 563 of file oct-env.cc.
References getuid(), and m_user_name.
Referenced by get_user_name().
|
private |
Definition at line 521 of file oct-env.cc.
References getcwd(), m_current_directory, m_follow_symbolic_links, and m_verbatim_pwd.
Referenced by do_chdir(), and get_current_directory().
|
private |
Definition at line 591 of file oct-env.cc.
References getenv_wrapper().
Referenced by do_get_home_directory(), do_get_temp_directory(), do_get_user_config_directory(), do_get_user_data_directory(), and getenv().
|
private |
Definition at line 445 of file oct-env.cc.
References dir_sep_chars, dir_sep_str(), do_absolute_pathname(), is_dir_sep(), and pathname_backup().
Referenced by do_chdir(), and make_absolute().
|
private |
Definition at line 358 of file oct-env.cc.
References do_get_home_directory(), is_dir_sep(), and len.
Referenced by polite_directory_format().
|
private |
|
private |
Definition at line 400 of file oct-env.cc.
References is_dir_sep(), and len.
Referenced by do_base_pathname(), and rooted_relative_pathname().
|
private |
Definition at line 324 of file oct-env.cc.
References dir_sep_chars, m_prog_invocation_name, m_prog_name, octave_set_program_name_wrapper(), and strsave().
Referenced by set_program_name().
|
private |
Definition at line 673 of file oct-env.cc.
|
private |
Definition at line 667 of file oct-env.cc.
|
static |
Definition at line 138 of file oct-env.cc.
References do_getcwd(), instance_ok(), and m_instance.
|
static |
Definition at line 145 of file oct-env.cc.
References do_get_home_directory(), instance_ok(), and m_instance.
|
static |
Definition at line 201 of file oct-env.cc.
References do_get_host_name(), instance_ok(), and m_instance.
|
static |
Definition at line 180 of file oct-env.cc.
References instance_ok(), m_instance, and m_prog_invocation_name.
|
static |
Definition at line 173 of file oct-env.cc.
References instance_ok(), m_instance, and m_prog_name.
|
static |
Definition at line 152 of file oct-env.cc.
References do_get_temp_directory(), instance_ok(), and m_instance.
Referenced by tempnam().
|
static |
Definition at line 159 of file oct-env.cc.
References do_get_user_config_directory(), instance_ok(), and m_instance.
|
static |
Definition at line 166 of file oct-env.cc.
References do_get_user_data_directory(), instance_ok(), and m_instance.
|
static |
Definition at line 194 of file oct-env.cc.
References do_get_user_name(), instance_ok(), and m_instance.
|
static |
Definition at line 296 of file oct-env.cc.
References do_getenv(), instance_ok(), and m_instance.
Referenced by have_x11_display().
|
static |
Definition at line 309 of file oct-env.cc.
References getenv().
|
staticprivate |
Definition at line 89 of file oct-env.cc.
References env(), singleton_cleanup_list::add(), cleanup_instance(), and m_instance.
Referenced by absolute_pathname(), base_pathname(), chdir(), get_current_directory(), get_home_directory(), get_host_name(), get_program_invocation_name(), get_program_name(), get_temp_directory(), get_user_config_directory(), get_user_data_directory(), get_user_name(), getenv(), make_absolute(), polite_directory_format(), rooted_relative_pathname(), and set_program_name().
|
static |
Definition at line 131 of file oct-env.cc.
References do_make_absolute(), instance_ok(), and m_instance.
|
private |
Definition at line 635 of file oct-env.cc.
References is_dir_sep(), min(), and n.
Referenced by do_make_absolute().
|
static |
Definition at line 103 of file oct-env.cc.
References do_polite_directory_format(), instance_ok(), and m_instance.
|
static |
Definition at line 303 of file oct-env.cc.
References putenv_wrapper().
|
static |
Definition at line 117 of file oct-env.cc.
References do_rooted_relative_pathname(), instance_ok(), and m_instance.
|
static |
Definition at line 187 of file oct-env.cc.
References do_set_program_name(), instance_ok(), and m_instance.
|
private |
Definition at line 151 of file oct-env.h.
Referenced by do_chdir(), and do_getcwd().
|
private |
Definition at line 144 of file oct-env.h.
Referenced by do_chdir(), and do_getcwd().
|
private |
Definition at line 160 of file oct-env.h.
Referenced by do_get_host_name().
|
staticprivate |
Definition at line 137 of file oct-env.h.
Referenced by absolute_pathname(), base_pathname(), chdir(), get_current_directory(), get_home_directory(), get_host_name(), get_program_invocation_name(), get_program_name(), get_temp_directory(), get_user_config_directory(), get_user_data_directory(), get_user_name(), getenv(), instance_ok(), make_absolute(), polite_directory_format(), rooted_relative_pathname(), and set_program_name().
|
private |
Definition at line 156 of file oct-env.h.
Referenced by do_set_program_name(), and get_program_invocation_name().
|
private |
Definition at line 154 of file oct-env.h.
Referenced by do_set_program_name(), and get_program_name().
|
private |
Definition at line 158 of file oct-env.h.
Referenced by do_get_user_name().
|
private |
Definition at line 148 of file oct-env.h.
Referenced by do_getcwd().