23 #if ! defined (octave_octave_h)
24 #define octave_octave_h 1
26 #include "octave-config.h"
28 #if defined (__cplusplus)
43 cmdline_options (
void);
45 cmdline_options (
int argc,
char **
argv);
47 cmdline_options (
const cmdline_options& opts);
49 cmdline_options& operator = (
const cmdline_options& opts);
51 bool force_gui (
void)
const {
return m_force_gui; }
52 bool forced_interactive (
void)
const {
return m_forced_interactive; }
53 bool forced_line_editing (
void)
const {
return m_forced_line_editing; }
54 bool inhibit_startup_message (
void)
const {
return m_inhibit_startup_message; }
55 bool line_editing (
void)
const {
return m_line_editing; }
56 bool no_gui (
void)
const {
return m_no_gui; }
57 bool no_window_system (
void)
const {
return m_no_window_system; }
58 bool persist (
void)
const {
return m_persist; }
59 bool read_history_file (
void)
const {
return m_read_history_file; }
60 bool read_init_files (
void)
const {
return m_read_init_files; }
61 bool read_site_files (
void)
const {
return m_read_site_files; }
62 bool set_initial_path (
void)
const {
return m_set_initial_path; }
63 bool traditional (
void)
const {
return m_traditional; }
64 bool verbose_flag (
void)
const {
return m_verbose_flag; }
65 std::string code_to_eval (
void)
const {
return m_code_to_eval; }
66 std::list<std::string> command_line_path (
void)
const {
return m_command_line_path; }
67 std::string exec_path (
void)
const {
return m_exec_path; }
68 std::string image_path (
void)
const {
return m_image_path; }
70 string_vector remaining_args (
void)
const {
return m_remaining_args; }
72 void force_gui (
bool arg) { m_force_gui =
arg; }
73 void forced_line_editing (
bool arg) { m_forced_line_editing =
arg; }
74 void forced_interactive (
bool arg) { m_forced_interactive =
arg; }
75 void inhibit_startup_message (
bool arg) { m_inhibit_startup_message =
arg; }
76 void line_editing (
bool arg) { m_line_editing =
arg; }
77 void no_gui (
bool arg) { m_no_gui =
arg; }
78 void no_window_system (
bool arg) { m_no_window_system =
arg; }
79 void persist (
bool arg) { m_persist =
arg; }
80 void read_history_file (
bool arg) { m_read_history_file =
arg; }
81 void read_init_files (
bool arg) { m_read_init_files =
arg; }
82 void read_site_files (
bool arg) { m_read_site_files =
arg; }
83 void set_initial_path (
bool arg) { m_set_initial_path =
arg; }
84 void traditional (
bool arg) { m_traditional =
arg; }
85 void verbose_flag (
bool arg) { m_verbose_flag =
arg; }
87 void command_line_path (
const std::list<std::string>&
arg) { m_command_line_path =
arg; }
97 bool m_force_gui =
false;
101 bool m_forced_interactive =
false;
105 bool m_forced_line_editing =
false;
109 bool m_inhibit_startup_message =
false;
113 bool m_line_editing =
true;
117 bool m_no_gui =
false;
121 bool m_no_window_system =
false;
125 bool m_persist =
false;
129 bool m_read_history_file =
true;
133 bool m_read_init_files =
true;
137 bool m_read_site_files =
true;
141 bool m_set_initial_path =
true;
145 bool m_traditional =
false;
149 bool m_verbose_flag =
false;
157 std::list<std::string> m_command_line_path;
187 application (
const cmdline_options& opts = cmdline_options ());
197 cmdline_options
options (
void)
const {
return m_options; }
199 bool have_script_file (
void)
const {
return m_have_script_file; }
201 bool is_octave_program (
void)
const {
return m_is_octave_program; }
203 virtual void create_interpreter (
void);
205 virtual int execute_interpreter (
void);
207 virtual int execute (
void) = 0;
209 virtual bool gui_running (
void)
const {
return false; }
210 virtual void gui_running (
bool) { }
212 void program_invocation_name (
const std::string&
nm) { m_program_invocation_name =
nm; }
216 void forced_interactive (
bool arg) { m_options.forced_interactive (arg); }
218 void interactive (
bool arg);
221 static application *app (
void) {
return instance; }
223 static std::string program_invocation_name (
void) {
return instance->m_program_invocation_name; }
225 static std::string program_name (
void) {
return instance->m_program_name; }
229 static bool is_gui_running (
void) {
return instance->gui_running (); }
231 static interpreter *the_interpreter (
void) {
return instance->m_interpreter; }
235 static bool forced_interactive (
void);
236 static bool interactive (
void);
265 cmdline_options m_options;
269 bool m_have_script_file =
false;
274 bool m_is_octave_program =
false;
277 bool m_gui_running =
false;
279 interpreter *m_interpreter = 0;
286 cli_application (
const cmdline_options& opts = cmdline_options ())
290 cli_application (
int argc,
char **
argv)
294 ~cli_application (
void) { }
302 cli_application (
const cli_application&);
304 cli_application& operator = (
const cli_application&);
311 embedded_application (
const cmdline_options& opts = cmdline_options ())
315 embedded_application (
int argc,
char **
argv)
319 ~embedded_application (
void) { }
321 void create_interpreter (
void);
329 embedded_application (
const embedded_application&);
331 embedded_application& operator = (
const embedded_application&);
337 #if defined (__cplusplus)
343 #if defined (__cplusplus)
Octave interface to the compression and uncompression libraries.
OCTINTERP_API int octave_main(int argc, char **argv, int embedded)
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
OCTAVE_EXPORT octave_value_list only variables visible in the local scope are displayed The following are valid options
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string