26 #if ! defined (octave_octave_h)
27 #define octave_octave_h 1
29 #include "octave-config.h"
53 int sys_argc ()
const {
return m_all_args.numel (); }
54 char **
sys_argv ()
const {
return m_all_args.c_str_vec (); }
59 {
return m_experimental_terminal_widget; }
62 bool gui ()
const {
return m_gui; }
64 {
return m_inhibit_startup_message; }
68 bool persist ()
const {
return m_persist; }
72 bool server ()
const {
return m_server; }
78 {
return m_command_line_path; }
81 std::string
exec_path ()
const {
return m_exec_path; }
83 std::string
info_file ()
const {
return m_info_file; }
92 { m_experimental_terminal_widget =
arg; }
110 { m_command_line_path =
arg; }
127 bool m_echo_commands =
false;
131 bool m_experimental_terminal_widget =
false;
139 bool m_forced_interactive =
false;
143 bool m_forced_line_editing =
false;
147 bool m_inhibit_startup_message =
false;
151 bool m_line_editing =
true;
155 bool m_no_window_system =
false;
159 bool m_persist =
false;
163 bool m_read_history_file =
true;
167 bool m_read_init_files =
true;
171 bool m_read_site_files =
true;
175 bool m_server =
false;
179 bool m_set_initial_path =
true;
183 bool m_traditional =
false;
187 bool m_verbose_flag =
false;
191 std::string m_code_to_eval;
195 std::list<std::string> m_command_line_path;
200 std::string m_docstrings_file;
204 std::string m_doc_cache_file;
208 std::string m_exec_path;
212 std::string m_image_path;
216 std::string m_info_file;
220 std::string m_info_program;
224 std::string m_texi_macros_file;
254 int sys_argc ()
const {
return m_options.sys_argc (); }
255 char **
sys_argv ()
const {
return m_options.sys_argv (); }
257 void set_program_names (
const std::string& pname);
269 bool interpreter_is_initialized ()
const;
271 OCTAVE_DEPRECATED (9,
"use octave::interpreter_is_initialized instead")
272 bool interpreter_initialized ()
274 return interpreter_is_initialized ();
279 virtual void initialize_interpreter ();
281 virtual int execute_interpreter ();
283 virtual void delete_interpreter ();
291 { m_program_invocation_name = nm; }
299 bool experimental_terminal_widget ()
const;
305 return s_instance ? s_instance->m_program_invocation_name :
"";
310 return s_instance ? s_instance->m_program_name :
"";
320 return s_instance ? s_instance->gui_running () :
false;
325 static bool forced_interactive ();
351 bool m_have_eval_option_code =
false;
355 bool m_have_script_file =
false;
360 bool m_is_octave_program =
false;
384 OCTAVE_END_NAMESPACE(
octave)
void forced_interactive(bool arg)
void program_name(const std::string &nm)
virtual bool gui_running() const
virtual void gui_running(bool)
bool have_eval_option_code() const
void program_invocation_name(const std::string &nm)
static application * app()
cmdline_options options() const
static std::string program_name()
static string_vector argv()
std::string m_program_name
static bool is_gui_running()
bool is_octave_program() const
bool have_script_file() const
std::unique_ptr< interpreter > m_interpreter
static std::string program_invocation_name()
cmdline_options m_options
std::string m_program_invocation_name
cli_application(const cmdline_options &opts=cmdline_options())
cli_application(int argc, char **argv)
~cli_application()=default
bool line_editing() const
bool forced_interactive() const
bool experimental_terminal_widget() const
std::string texi_macros_file() const
bool inhibit_startup_message() const
std::string doc_cache_file() const
void forced_interactive(bool arg)
std::string image_path() const
bool read_site_files() const
string_vector remaining_args() const
void info_program(const std::string &arg)
void image_path(const std::string &arg)
std::string info_program() const
void traditional(bool arg)
void doc_cache_file(const std::string &arg)
bool read_history_file() const
std::string exec_path() const
bool no_window_system() const
std::list< std::string > command_line_path() const
void docstrings_file(const std::string &arg)
std::string code_to_eval() const
string_vector all_args() const
void all_args(const string_vector &arg)
void inhibit_startup_message(bool arg)
void echo_commands(bool arg)
std::string info_file() const
bool verbose_flag() const
void set_initial_path(bool arg)
void remaining_args(const string_vector &arg)
void experimental_terminal_widget(bool arg)
std::string docstrings_file() const
bool echo_commands() const
void read_site_files(bool arg)
void code_to_eval(const std::string &arg)
void verbose_flag(bool arg)
void read_history_file(bool arg)
void forced_line_editing(bool arg)
bool read_init_files() const
void command_line_path(const std::list< std::string > &arg)
bool set_initial_path() const
bool forced_line_editing() const
void line_editing(bool arg)
void texi_macros_file(const std::string &arg)
void read_init_files(bool arg)
void info_file(const std::string &arg)
void exec_path(const std::string &arg)
void no_window_system(bool arg)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn