Mercurial > octave
annotate libinterp/corefcn/interpreter.h @ 32060:1203a2d81a42
Add BIST tests for Matlab compatibility for functions which accept negative dimensions.
* data.cc (Fones, Finf, Feps, Feye): Add BIST test for negative dimensions.
* rand.cc (Frand): Add BIST test for negative dimensions.
* ov-cell.cc (Fcell): Add BIST test for negative dimensions.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 26 Apr 2023 16:26:32 -0700 |
parents | 5f0b8101234e |
children | 2e484f9f1f18 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
31706
597f3ee61a48
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
31635
diff
changeset
|
3 // Copyright (C) 2002-2023 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 #if ! defined (octave_interpreter_h) |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 #define octave_interpreter_h 1 |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 #include "octave-config.h" |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 |
31846
5f0b8101234e
Remove several race conditions with signal handler (bug #61370).
Reinhard Resch <r_resch@a1.net>
parents:
31845
diff
changeset
|
31 #include <atomic> |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
32 #include <map> |
29446
435fc29162c0
maintain a set of watch expressions for possible use in tracing/debugging
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
33 #include <set> |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
34 #include <stack> |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 #include <string> |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 |
24734
5d8c4cbc56d7
don't use singleton pattern for child_list
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
37 #include "child-list.h" |
27408
9b19eec60931
move change directory function to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27321
diff
changeset
|
38 #include "oct-time.h" |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 #include "quit.h" |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 #include "str-vec.h" |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 |
26769
2f847e3e8d6b
split classdef into multiple smaller source files
John W. Eaton <jwe@octave.org>
parents:
26722
diff
changeset
|
42 #include "cdef-manager.h" |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
27263
diff
changeset
|
43 #include "display.h" |
23627
0a6e87804cab
don't use singleton pattern for dynamic_loader class
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
44 #include "dynamic-ld.h" |
23719
69a111259a2c
eliminate some global variables
John W. Eaton <jwe@octave.org>
parents:
23703
diff
changeset
|
45 #include "environment.h" |
27160
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27020
diff
changeset
|
46 #include "error.h" |
27263
99aa1bcb8848
rename octave_link and octave_link_events classes, move inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
27261
diff
changeset
|
47 #include "event-manager.h" |
31663
a74935a6cc75
move gh_manager class out of graphics.in.h and graphics.cc to separate files
John W. Eaton <jwe@octave.org>
parents:
31635
diff
changeset
|
48 #include "gh-manager.h" |
27321
eddce82a57cc
don't use singleton pattern for gh_manager object
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
49 #include "graphics.h" |
23774
41795b504a8b
don't use singleton for gtk_manager
John W. Eaton <jwe@octave.org>
parents:
23753
diff
changeset
|
50 #include "gtk-manager.h" |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23719
diff
changeset
|
51 #include "help.h" |
25407
ab10403a0b50
new input_system class to manage user input for the interpreter
John W. Eaton <jwe@octave.org>
parents:
25392
diff
changeset
|
52 #include "input.h" |
23438
d24d01273bd0
eliminate load-path singleton
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
53 #include "load-path.h" |
25993
f75bb9d659e0
eliminate global and file-scope static variables from load-save.cc (bug #54571)
John W. Eaton <jwe@octave.org>
parents:
25460
diff
changeset
|
54 #include "load-save.h" |
25994
f881d3e271d2
eliminate global and file-scope static variables in oct-hist.cc
John W. Eaton <jwe@octave.org>
parents:
25993
diff
changeset
|
55 #include "oct-hist.h" |
23738
8acd390d16c9
don't use singleton for stream_list object
John W. Eaton <jwe@octave.org>
parents:
23723
diff
changeset
|
56 #include "oct-stream.h" |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24538
diff
changeset
|
57 #include "ov-typeinfo.h" |
25435
a52e6fb674b1
eliminate some singletons and static & global variables
John W. Eaton <jwe@octave.org>
parents:
25407
diff
changeset
|
58 #include "pager.h" |
23630
8a47d4735655
avoid memory leak in interpreter
John W. Eaton <jwe@octave.org>
parents:
23627
diff
changeset
|
59 #include "pt-eval.h" |
25443
2fa7cd178c4a
new class for miscellaneous interpreter settings
John W. Eaton <jwe@octave.org>
parents:
25440
diff
changeset
|
60 #include "settings.h" |
23599
5cb3a2bb5e1e
don't use singleton for symbol_table
John W. Eaton <jwe@octave.org>
parents:
23553
diff
changeset
|
61 #include "symtab.h" |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
23738
diff
changeset
|
62 #include "url-handle-manager.h" |
23438
d24d01273bd0
eliminate load-path singleton
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
63 |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 extern OCTINTERP_API bool quit_allowed; |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 // TRUE means we are ready to interpret commands, but not everything |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 // is ready for interactive use. |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 extern OCTINTERP_API bool octave_interpreter_ready; |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 // TRUE means we've processed all the init code and we are good to go. |
31846
5f0b8101234e
Remove several race conditions with signal handler (bug #61370).
Reinhard Resch <r_resch@a1.net>
parents:
31845
diff
changeset
|
71 extern OCTINTERP_API std::atomic<bool> octave_initialized; |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 |
27408
9b19eec60931
move change directory function to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27321
diff
changeset
|
73 #include "oct-time.h" |
9b19eec60931
move change directory function to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27321
diff
changeset
|
74 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31555
diff
changeset
|
75 OCTAVE_BEGIN_NAMESPACE(octave) |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
76 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
77 class profiler; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
78 class child_list; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
79 class push_parser; |
23127
5a91168a30be
avoid including parse tree headers in other header files unnecessarily
John W. Eaton <jwe@octave.org>
parents:
23117
diff
changeset
|
80 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
81 // The time we last time we changed directories. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
82 extern sys::time Vlast_chdir_time; |
27408
9b19eec60931
move change directory function to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27321
diff
changeset
|
83 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
84 // The application object contains a pointer to the current |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
85 // interpreter and the interpreter contains a pointer back to the |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
86 // application context so we need a forward declaration for one (or |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
87 // both) of them... |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
88 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
89 class application; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
90 |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
91 class temporary_file_list |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
92 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
93 public: |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
94 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
95 temporary_file_list () : m_files () { } |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
96 |
31837
febd82d1a8de
use new macros to consistently delete copy and move member functions
John W. Eaton <jwe@octave.org>
parents:
31771
diff
changeset
|
97 OCTAVE_DISABLE_COPY_MOVE (temporary_file_list) |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
98 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
99 ~temporary_file_list (); |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
100 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
101 void insert (const std::string& file); |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
102 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
103 void cleanup (); |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
104 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
105 private: |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
106 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
107 // List of temporary files to delete when we exit. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
108 std::set<std::string> m_files; |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
109 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
110 }; |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
111 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
112 class OCTINTERP_API interpreter |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
113 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
114 public: |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
115 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
116 // Create an interpreter object and perform basic initialization. |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
117 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
118 interpreter (application *app_context = nullptr); |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
119 |
31837
febd82d1a8de
use new macros to consistently delete copy and move member functions
John W. Eaton <jwe@octave.org>
parents:
31771
diff
changeset
|
120 OCTAVE_DISABLE_COPY_MOVE (interpreter) |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
121 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
122 // Clean up the interpreter object. |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22865
diff
changeset
|
123 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
124 ~interpreter (); |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
126 void intern_nargin (octave_idx_type nargs); |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
127 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
128 // If creating an embedded interpreter, you may inhibit reading |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
129 // the command history file by calling initialize_history with |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
130 // read_history_file = false prior to calling initialize. |
23599
5cb3a2bb5e1e
don't use singleton for symbol_table
John W. Eaton <jwe@octave.org>
parents:
23553
diff
changeset
|
131 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
132 void initialize_history (bool read_history_file = false); |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
133 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
134 // If creating an embedded interpreter, you may inhibit setting |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
135 // the default compiled-in path by calling initialize_load_path |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
136 // with set_initial_path = false prior calling initialize. After |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
137 // that, you can add directories to the load path to set up a |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
138 // custom path. |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
139 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
140 void initialize_load_path (bool set_initial_path = true); |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
141 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
142 // Load command line history, set the load path. |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
143 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
144 void initialize (); |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
145 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
146 // Note: GET_LINE_AND_EVAL is only used by new experimental terminal |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
147 // widget. |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
148 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
149 void get_line_and_eval (); |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29446
diff
changeset
|
150 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
151 // Parse a line of input. If input ends at a complete statement |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
152 // boundary, execute the resulting parse tree. Useful to handle |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
153 // parsing user input when running in server mode. |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29446
diff
changeset
|
154 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
155 void parse_and_execute (const std::string& input, bool& incomplete_parse); |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29171
diff
changeset
|
156 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
157 // Initialize the interpreter (if not already done by an explicit |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
158 // call to initialize), execute startup files, --eval option code, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
159 // script files, and/or interactive commands. |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29171
diff
changeset
|
160 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
161 int execute (); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
162 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
163 bool server_mode () const { return m_evaluator.server_mode (); } |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
164 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
165 bool interactive () const |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
166 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
167 return m_interactive; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
168 } |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29171
diff
changeset
|
169 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
170 void interactive (bool arg) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
171 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
172 m_interactive = arg; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
173 } |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
174 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
175 void read_site_files (bool flag) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
176 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
177 m_read_site_files = flag; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
178 } |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
179 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
180 void read_init_files (bool flag) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
181 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
182 m_read_init_files = flag; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
183 } |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
184 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
185 void verbose (bool flag) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
186 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
187 m_verbose = flag; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
188 } |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
189 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
190 void traditional (bool flag) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
191 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
192 m_traditional = flag; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
193 } |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
194 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
195 bool traditional () const |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
196 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
197 return m_traditional; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
198 } |
28380
548556e78bdf
make --traditional option easily accessible to the interpreter
John W. Eaton <jwe@octave.org>
parents:
28347
diff
changeset
|
199 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
200 void inhibit_startup_message (bool flag) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
201 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
202 m_inhibit_startup_message = flag; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
203 } |
28380
548556e78bdf
make --traditional option easily accessible to the interpreter
John W. Eaton <jwe@octave.org>
parents:
28347
diff
changeset
|
204 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
205 bool in_top_level_repl () const |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
206 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
207 return m_evaluator.in_top_level_repl (); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
208 } |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
209 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
210 bool initialized () const |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
211 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
212 return m_initialized; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
213 } |
27519
804e5d42b728
move reader and parser from evaluator repl to interpreter main_loop
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
214 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
215 void interrupt_all_in_process_group (bool b) |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
216 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
217 m_interrupt_all_in_process_group = b; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
218 } |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
219 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
220 bool interrupt_all_in_process_group () const |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
221 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
222 return m_interrupt_all_in_process_group; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
223 } |
29295
b73ddb964093
allow interrupts to be sent to all processes in process group or just octave
John W. Eaton <jwe@octave.org>
parents:
29292
diff
changeset
|
224 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
225 application * get_app_context () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
226 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
227 return m_app_context; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
228 } |
29295
b73ddb964093
allow interrupts to be sent to all processes in process group or just octave
John W. Eaton <jwe@octave.org>
parents:
29292
diff
changeset
|
229 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
230 display_info& get_display_info () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
231 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
232 return m_display_info; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
233 } |
29291
21ddf8439943
allow access to application context from interpreter object
John W. Eaton <jwe@octave.org>
parents:
29281
diff
changeset
|
234 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
235 environment& get_environment () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
236 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
237 return m_environment; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
238 } |
23719
69a111259a2c
eliminate some global variables
John W. Eaton <jwe@octave.org>
parents:
23703
diff
changeset
|
239 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
240 settings& get_settings () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
241 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
242 return m_settings; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
243 } |
25443
2fa7cd178c4a
new class for miscellaneous interpreter settings
John W. Eaton <jwe@octave.org>
parents:
25440
diff
changeset
|
244 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
245 error_system& get_error_system () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
246 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
247 return m_error_system; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
248 } |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
249 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
250 tree_evaluator& get_evaluator (); |
27160
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27020
diff
changeset
|
251 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
252 help_system& get_help_system () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
253 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
254 return m_help_system; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
255 } |
31555
9d0d37acafbe
delete m_evaluator after m_output_system (bug #63416)
John W. Eaton <jwe@octave.org>
parents:
30737
diff
changeset
|
256 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
257 input_system& get_input_system () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
258 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
259 return m_input_system; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
260 } |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23719
diff
changeset
|
261 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
262 output_system& get_output_system () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
263 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
264 return m_output_system; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
265 } |
25407
ab10403a0b50
new input_system class to manage user input for the interpreter
John W. Eaton <jwe@octave.org>
parents:
25392
diff
changeset
|
266 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
267 history_system& get_history_system () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
268 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
269 return m_history_system; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
270 } |
25435
a52e6fb674b1
eliminate some singletons and static & global variables
John W. Eaton <jwe@octave.org>
parents:
25407
diff
changeset
|
271 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
272 dynamic_loader& get_dynamic_loader () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
273 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
274 return m_dynamic_loader; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
275 } |
25994
f881d3e271d2
eliminate global and file-scope static variables in oct-hist.cc
John W. Eaton <jwe@octave.org>
parents:
25993
diff
changeset
|
276 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
277 load_path& get_load_path () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
278 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
279 return m_load_path; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
280 } |
23627
0a6e87804cab
don't use singleton pattern for dynamic_loader class
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
281 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
282 load_save_system& get_load_save_system () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
283 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
284 return m_load_save_system; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
285 } |
23438
d24d01273bd0
eliminate load-path singleton
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
286 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
287 type_info& get_type_info () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
288 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
289 return m_type_info; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
290 } |
25993
f75bb9d659e0
eliminate global and file-scope static variables from load-save.cc (bug #54571)
John W. Eaton <jwe@octave.org>
parents:
25460
diff
changeset
|
291 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
292 symbol_table& get_symbol_table () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
293 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
294 return m_symbol_table; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
295 } |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
296 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
297 symbol_scope get_top_scope () const; |
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
298 symbol_scope get_current_scope () const; |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
299 symbol_scope require_current_scope (const std::string& who) const; |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
300 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
301 profiler& get_profiler (); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
302 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
303 stream_list& get_stream_list (); |
23599
5cb3a2bb5e1e
don't use singleton for symbol_table
John W. Eaton <jwe@octave.org>
parents:
23553
diff
changeset
|
304 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
305 child_list& get_child_list () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
306 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
307 return m_child_list; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
308 } |
23553
14723784b9f2
don't use singleton for call_stack
John W. Eaton <jwe@octave.org>
parents:
23532
diff
changeset
|
309 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
310 url_handle_manager& get_url_handle_manager (); |
23753
c3828bd031cd
move profiler inside evaluator and inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23742
diff
changeset
|
311 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
312 cdef_manager& get_cdef_manager () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
313 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
314 return m_cdef_manager; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
315 } |
23738
8acd390d16c9
don't use singleton for stream_list object
John W. Eaton <jwe@octave.org>
parents:
23723
diff
changeset
|
316 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
317 gtk_manager& get_gtk_manager () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
318 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
319 return m_gtk_manager; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
320 } |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
23738
diff
changeset
|
321 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
322 event_manager& get_event_manager () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
323 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
324 return m_event_manager; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
325 } |
23651
5c6cceef132b
don't use singleton for cdef_manager object
John W. Eaton <jwe@octave.org>
parents:
23630
diff
changeset
|
326 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
327 gh_manager& get_gh_manager () |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
328 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
329 return *m_gh_manager; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
330 } |
23774
41795b504a8b
don't use singleton for gtk_manager
John W. Eaton <jwe@octave.org>
parents:
23753
diff
changeset
|
331 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
332 // Any Octave code that needs to change the current directory should |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
333 // call this function instead of calling the system chdir function |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
334 // directly so that the load-path and GUI may be notified of the |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
335 // change. |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27214
diff
changeset
|
336 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
337 int chdir (const std::string& dir); |
23703
6eb5f6199a5a
move mlock, munlock, and mislocked to interpreter class
John W. Eaton <jwe@octave.org>
parents:
23651
diff
changeset
|
338 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
339 void mlock (bool skip_first = false) const; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
340 void munlock (bool skip_first = false) const; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
341 bool mislocked (bool skip_first = false) const; |
27408
9b19eec60931
move change directory function to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27321
diff
changeset
|
342 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
343 // NOTE: since we have a version that accepts a bool argument, we |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
344 // can't rely on automatic conversion from char* to std::string. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
345 void munlock (const char *nm); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
346 void munlock (const std::string& nm); |
27408
9b19eec60931
move change directory function to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27321
diff
changeset
|
347 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
348 bool mislocked (const char *nm); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
349 bool mislocked (const std::string& nm); |
23703
6eb5f6199a5a
move mlock, munlock, and mislocked to interpreter class
John W. Eaton <jwe@octave.org>
parents:
23651
diff
changeset
|
350 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
351 std::string mfilename (const std::string& opt = "") const; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
352 |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
353 octave_value_list eval_string (const std::string& eval_str, bool silent, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
354 int& parse_status, int nargout); |
23703
6eb5f6199a5a
move mlock, munlock, and mislocked to interpreter class
John W. Eaton <jwe@octave.org>
parents:
23651
diff
changeset
|
355 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
356 octave_value eval_string (const std::string& eval_str, bool silent, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
357 int& parse_status); |
23703
6eb5f6199a5a
move mlock, munlock, and mislocked to interpreter class
John W. Eaton <jwe@octave.org>
parents:
23651
diff
changeset
|
358 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
359 octave_value_list eval_string (const octave_value& arg, bool silent, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
360 int& parse_status, int nargout); |
27015
4d9e1a832a55
move core of mfilename function to evaluator
John W. Eaton <jwe@octave.org>
parents:
27014
diff
changeset
|
361 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
362 octave_value_list eval (const std::string& try_code, int nargout); |
26113
8a15f3bace49
move eval_string inside interpreter/evaluator class
John W. Eaton <jwe@octave.org>
parents:
25994
diff
changeset
|
363 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
364 octave_value_list eval (const std::string& try_code, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
365 const std::string& catch_code, int nargout); |
26113
8a15f3bace49
move eval_string inside interpreter/evaluator class
John W. Eaton <jwe@octave.org>
parents:
25994
diff
changeset
|
366 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
367 octave_value_list evalin (const std::string& context, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
368 const std::string& try_code, int nargout); |
26113
8a15f3bace49
move eval_string inside interpreter/evaluator class
John W. Eaton <jwe@octave.org>
parents:
25994
diff
changeset
|
369 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
370 octave_value_list evalin (const std::string& context, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
371 const std::string& try_code, |
27019
6cb675912f2b
move core of eval function to evaluator
John W. Eaton <jwe@octave.org>
parents:
27018
diff
changeset
|
372 const std::string& catch_code, int nargout); |
6cb675912f2b
move core of eval function to evaluator
John W. Eaton <jwe@octave.org>
parents:
27018
diff
changeset
|
373 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
374 octave_value_list |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
375 feval (const char *name, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
376 const octave_value_list& args = octave_value_list (), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
377 int nargout = 0); |
27018
a20ead51515d
move core of evalin function to evaluator
John W. Eaton <jwe@octave.org>
parents:
27017
diff
changeset
|
378 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
379 octave_value_list |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
380 feval (const std::string& name, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
381 const octave_value_list& args = octave_value_list (), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
382 int nargout = 0); |
27020
30e9204de313
move feval functions to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27019
diff
changeset
|
383 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
384 octave_value_list |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
385 feval (octave_function *fcn, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
386 const octave_value_list& args = octave_value_list (), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
387 int nargout = 0); |
27020
30e9204de313
move feval functions to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27019
diff
changeset
|
388 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
389 octave_value_list |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
390 feval (const octave_value& f_arg, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
391 const octave_value_list& args = octave_value_list (), |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
392 int nargout = 0); |
27020
30e9204de313
move feval functions to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27019
diff
changeset
|
393 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
394 octave_value_list feval (const octave_value_list& args, int nargout = 0); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
395 |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
396 octave_value make_function_handle (const std::string& name); |
27020
30e9204de313
move feval functions to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27019
diff
changeset
|
397 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
398 void install_variable (const std::string& name, const octave_value& value, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
399 bool global); |
27020
30e9204de313
move feval functions to interpreter class
John W. Eaton <jwe@octave.org>
parents:
27019
diff
changeset
|
400 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
401 void set_global_value (const std::string& name, const octave_value& value); |
28433
d05a4194f1ad
move make_fcn_handle to tree_evaluator class
John W. Eaton <jwe@octave.org>
parents:
28347
diff
changeset
|
402 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
403 octave_value global_varval (const std::string& name) const; |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
404 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
405 void global_assign (const std::string& name, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
406 const octave_value& val = octave_value ()); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
407 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
408 octave_value top_level_varval (const std::string& name) const; |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
409 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
410 void top_level_assign (const std::string& name, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
411 const octave_value& val = octave_value ()); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
412 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
413 bool is_variable (const std::string& name) const; |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
414 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
415 bool is_local_variable (const std::string& name) const; |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
416 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
417 octave_value varval (const std::string& name) const; |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
418 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
419 void assign (const std::string& name, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
420 const octave_value& val = octave_value ()); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
421 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
422 void assignin (const std::string& context, const std::string& varname, |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
423 const octave_value& val = octave_value ()); |
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
424 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
425 void source_file (const std::string& file_name, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
426 const std::string& context = "", |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
427 bool verbose = false, bool require_file = true); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
428 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
429 bool at_top_level () const; |
27014
daab1b311a98
move core of assignin function to evaluator
John W. Eaton <jwe@octave.org>
parents:
26769
diff
changeset
|
430 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
431 bool isglobal (const std::string& name) const; |
27017
24b7e6326e26
move parse_fcn_file to interpreter; source_file to evaluator
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
432 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
433 octave_value find (const std::string& name); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
434 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
435 void clear_all (bool force = false); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
436 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
437 void clear_objects (); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
438 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
439 void clear_variable (const std::string& name); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
440 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
441 void clear_variable_pattern (const std::string& pattern); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
442 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
443 void clear_variable_regexp (const std::string& pattern); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
444 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
445 void clear_variables (); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
446 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
447 void clear_global_variable (const std::string& name); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
448 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
449 void clear_global_variable_pattern (const std::string& pattern); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
450 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
451 void clear_global_variable_regexp (const std::string& pattern); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
452 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
453 void clear_global_variables (); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
454 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
455 void clear_functions (bool force = false); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
456 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
457 void clear_function (const std::string& name); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
458 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
459 void clear_symbol (const std::string& name); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
460 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
461 void clear_function_pattern (const std::string& pat); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
462 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
463 void clear_function_regexp (const std::string& pat); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
464 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
465 void clear_symbol_pattern (const std::string& pat); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
466 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
467 void clear_symbol_regexp (const std::string& pat); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
468 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
469 std::list<std::string> variable_names (); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
470 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
471 std::list<std::string> top_level_variable_names (); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
472 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
473 std::list<std::string> global_variable_names (); |
27594
e091e09d26f0
restore some symbol table functions for backward compatibility
John W. Eaton <jwe@octave.org>
parents:
27588
diff
changeset
|
474 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
475 std::list<std::string> user_function_names (); |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
476 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
477 std::list<std::string> autoloaded_functions () const; |
26661
cf9e10ce3351
move variable values from symbol_record objects to stack_frame objects
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
478 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
479 void interrupt (); |
29292
eb1e10abe9d5
use method in interpreter class to interrupt interpreter execution in GUI
John W. Eaton <jwe@octave.org>
parents:
29291
diff
changeset
|
480 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
481 // Pause interpreter execution at the next available statement and |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
482 // enter the debugger. |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
483 void pause (); |
29306
0231189f630d
provide interpreter methods for pausing, resuming, and stopping evaluation
John W. Eaton <jwe@octave.org>
parents:
29295
diff
changeset
|
484 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
485 // Exit debugger or stop execution and return to the top-level REPL |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
486 // or server loop. |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
487 void stop (); |
29306
0231189f630d
provide interpreter methods for pausing, resuming, and stopping evaluation
John W. Eaton <jwe@octave.org>
parents:
29295
diff
changeset
|
488 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
489 // Add EXPR to the set of expressions that may be evaluated when the |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
490 // debugger stops at a breakpoint. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
491 void add_debug_watch_expression (const std::string& expr); |
29446
435fc29162c0
maintain a set of watch expressions for possible use in tracing/debugging
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
492 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
493 // Remove EXPR from the set of expressions that may be evaluated |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
494 // when the debugger stops at a breakpoint. |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
495 void remove_debug_watch_expression (const std::string& expr); |
29446
435fc29162c0
maintain a set of watch expressions for possible use in tracing/debugging
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
496 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
497 // Clear the set of expressions that may be evaluated when the |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
498 // debugger stops at a breakpoint. |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
499 void clear_debug_watch_expressions (); |
29446
435fc29162c0
maintain a set of watch expressions for possible use in tracing/debugging
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
500 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
501 // Return the set of expressions that may be evaluated when the |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
502 // debugger stops at a breakpoint. |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
503 std::set<std::string> debug_watch_expressions () const; |
29446
435fc29162c0
maintain a set of watch expressions for possible use in tracing/debugging
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
504 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
505 // Resume interpreter execution if paused. |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
506 void resume (); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
507 |
31727
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
508 octave_value PS1 (const octave_value_list& args, int nargout); |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
509 std::string PS1 () const; |
31727
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
510 std::string PS1 (const std::string& s); |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
511 void set_PS1 (const std::string& s); |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
512 |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
513 octave_value PS2 (const octave_value_list& args, int nargout); |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
514 std::string PS2 () const; |
31727
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
515 std::string PS2 (const std::string& s); |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
516 void set_PS2 (const std::string& s); |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
517 |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
518 octave_value PS4 (const octave_value_list& args, int nargout); |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
519 std::string PS4 () const; |
31727
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
520 std::string PS4 (const std::string& s); |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
521 void set_PS4 (const std::string& s); |
1f04951057bf
avoid some calls to get_input_system and get_evaluator
John W. Eaton <jwe@octave.org>
parents:
31707
diff
changeset
|
522 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
523 // Provided for convenience. Will be removed once we eliminate the |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
524 // old terminal widget. |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
525 bool experimental_terminal_widget () const; |
29306
0231189f630d
provide interpreter methods for pausing, resuming, and stopping evaluation
John W. Eaton <jwe@octave.org>
parents:
29295
diff
changeset
|
526 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
527 void handle_exception (const execution_exception& ee); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
528 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
529 void recover_from_exception (); |
29503
3bfec185c9e2
experimental command window widget with server loop
John W. Eaton <jwe@octave.org>
parents:
29446
diff
changeset
|
530 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
531 void mark_for_deletion (const std::string& file); |
27471 | 532 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
533 void cleanup_tmp_files (); |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
534 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
535 void quit (int exit_status, bool force = false, bool confirm = true); |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
536 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
537 void cancel_quit (bool flag) { m_cancel_quit = flag; } |
27587
494d6243c188
improve compatibility of quit function
John W. Eaton <jwe@octave.org>
parents:
27542
diff
changeset
|
538 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
539 bool executing_finish_script () const |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
540 { |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
541 return m_executing_finish_script; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
542 } |
27587
494d6243c188
improve compatibility of quit function
John W. Eaton <jwe@octave.org>
parents:
27542
diff
changeset
|
543 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
544 void add_atexit_fcn (const std::string& fname); |
27689
4f32af6abd4b
don't use static variable for list of interpreter atexit functions
John W. Eaton <jwe@octave.org>
parents:
27594
diff
changeset
|
545 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
546 bool remove_atexit_fcn (const std::string& fname); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
547 |
31845
2da025d5e98d
maint: Use 's_' prefix for static private class variables.
Rik <rik@octave.org>
parents:
31837
diff
changeset
|
548 static interpreter * the_interpreter () { return s_instance; } |
27689
4f32af6abd4b
don't use static variable for list of interpreter atexit functions
John W. Eaton <jwe@octave.org>
parents:
27594
diff
changeset
|
549 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
550 private: |
23511
232c8d69d934
manage interpreter instance in interpreter object
John W. Eaton <jwe@octave.org>
parents:
23457
diff
changeset
|
551 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
552 void display_startup_message () const; |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
553 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
554 int execute_startup_files (); |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
555 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
556 int execute_eval_option_code (); |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
557 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
558 int execute_command_line_file (); |
23102
373771419d51
refactor interpreter::execute
John W. Eaton <jwe@octave.org>
parents:
23092
diff
changeset
|
559 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
560 int main_loop (); |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
561 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
562 int server_loop (); |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
563 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
564 void shutdown (); |
29254
11343ca3c125
allow Octave to operate as a server, executing commands from a queue
John W. Eaton <jwe@octave.org>
parents:
29171
diff
changeset
|
565 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
566 void execute_atexit_fcns (); |
30736
dadbfe6fddd6
don't perform interpreter shutdown actions in destructor (bug #61994)
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
567 |
31771
21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
Rik <rik@octave.org>
parents:
31731
diff
changeset
|
568 void maximum_braindamage (); |
30156
c8d5ec1f5618
maint: use "m_" prefix for member variable "instance" in class interpreter.
Rik <rik@octave.org>
parents:
30020
diff
changeset
|
569 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
570 void execute_pkg_add (const std::string& dir); |
30156
c8d5ec1f5618
maint: use "m_" prefix for member variable "instance" in class interpreter.
Rik <rik@octave.org>
parents:
30020
diff
changeset
|
571 |
31731
06bd4e4d4a92
make safe_source_file a private member function instead of a static function
John W. Eaton <jwe@octave.org>
parents:
31727
diff
changeset
|
572 int safe_source_file (const std::string& file_name, |
06bd4e4d4a92
make safe_source_file a private member function instead of a static function
John W. Eaton <jwe@octave.org>
parents:
31727
diff
changeset
|
573 const std::string& context = "", |
06bd4e4d4a92
make safe_source_file a private member function instead of a static function
John W. Eaton <jwe@octave.org>
parents:
31727
diff
changeset
|
574 bool verbose = false, bool require_file = true); |
06bd4e4d4a92
make safe_source_file a private member function instead of a static function
John W. Eaton <jwe@octave.org>
parents:
31727
diff
changeset
|
575 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
576 //-------- |
30156
c8d5ec1f5618
maint: use "m_" prefix for member variable "instance" in class interpreter.
Rik <rik@octave.org>
parents:
30020
diff
changeset
|
577 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
578 // The interpreter instance; Currently it is only possible to |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
579 // have one, so OCTAVE_THREAD_LOCAL will normally be defined to be |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
580 // empty. Eventually we would like to allow multiple interpreters |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
581 // to be active at once, but they will still be limited to one per |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
582 // thread. When that is possible, OCTAVE_THREAD_LOCAL can be |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
583 // replaced by the C++ thread_local keyword. For now, use a macro |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
584 // to allow experimenting with thread_local storage. |
30156
c8d5ec1f5618
maint: use "m_" prefix for member variable "instance" in class interpreter.
Rik <rik@octave.org>
parents:
30020
diff
changeset
|
585 |
31845
2da025d5e98d
maint: Use 's_' prefix for static private class variables.
Rik <rik@octave.org>
parents:
31837
diff
changeset
|
586 OCTAVE_THREAD_LOCAL static interpreter *s_instance; |
30156
c8d5ec1f5618
maint: use "m_" prefix for member variable "instance" in class interpreter.
Rik <rik@octave.org>
parents:
30020
diff
changeset
|
587 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
588 application *m_app_context; |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
589 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
590 temporary_file_list m_tmp_files; |
27542
b8aa62c1deb5
eliminate global tmp_files variable
John W. Eaton <jwe@octave.org>
parents:
27519
diff
changeset
|
591 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
592 std::list<std::string> m_atexit_fcns; |
27689
4f32af6abd4b
don't use static variable for list of interpreter atexit functions
John W. Eaton <jwe@octave.org>
parents:
27594
diff
changeset
|
593 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
594 display_info m_display_info; |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
27263
diff
changeset
|
595 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
596 environment m_environment; |
23719
69a111259a2c
eliminate some global variables
John W. Eaton <jwe@octave.org>
parents:
23703
diff
changeset
|
597 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
598 settings m_settings; |
25443
2fa7cd178c4a
new class for miscellaneous interpreter settings
John W. Eaton <jwe@octave.org>
parents:
25440
diff
changeset
|
599 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
600 error_system m_error_system; |
27160
6b0c61a5a0f0
move global error configuration and status variables inside a class
John W. Eaton <jwe@octave.org>
parents:
27020
diff
changeset
|
601 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
602 tree_evaluator m_evaluator; |
31555
9d0d37acafbe
delete m_evaluator after m_output_system (bug #63416)
John W. Eaton <jwe@octave.org>
parents:
30737
diff
changeset
|
603 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
604 help_system m_help_system; |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23719
diff
changeset
|
605 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
606 input_system m_input_system; |
25407
ab10403a0b50
new input_system class to manage user input for the interpreter
John W. Eaton <jwe@octave.org>
parents:
25392
diff
changeset
|
607 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
608 output_system m_output_system; |
25435
a52e6fb674b1
eliminate some singletons and static & global variables
John W. Eaton <jwe@octave.org>
parents:
25407
diff
changeset
|
609 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
610 history_system m_history_system; |
25994
f881d3e271d2
eliminate global and file-scope static variables in oct-hist.cc
John W. Eaton <jwe@octave.org>
parents:
25993
diff
changeset
|
611 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
612 dynamic_loader m_dynamic_loader; |
23627
0a6e87804cab
don't use singleton pattern for dynamic_loader class
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
613 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
614 load_path m_load_path; |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
22157
diff
changeset
|
615 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
616 load_save_system m_load_save_system; |
25993
f75bb9d659e0
eliminate global and file-scope static variables from load-save.cc (bug #54571)
John W. Eaton <jwe@octave.org>
parents:
25460
diff
changeset
|
617 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
618 type_info m_type_info; |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24538
diff
changeset
|
619 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
620 symbol_table m_symbol_table; |
23599
5cb3a2bb5e1e
don't use singleton for symbol_table
John W. Eaton <jwe@octave.org>
parents:
23553
diff
changeset
|
621 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
622 stream_list m_stream_list; |
23738
8acd390d16c9
don't use singleton for stream_list object
John W. Eaton <jwe@octave.org>
parents:
23723
diff
changeset
|
623 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
624 child_list m_child_list; |
24734
5d8c4cbc56d7
don't use singleton pattern for child_list
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
625 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
626 url_handle_manager m_url_handle_manager; |
23742
1f0daaf81955
don't use singleton for ch_manager, rename to url_handle_manager
John W. Eaton <jwe@octave.org>
parents:
23738
diff
changeset
|
627 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
628 cdef_manager m_cdef_manager; |
23651
5c6cceef132b
don't use singleton for cdef_manager object
John W. Eaton <jwe@octave.org>
parents:
23630
diff
changeset
|
629 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
630 gtk_manager m_gtk_manager; |
23774
41795b504a8b
don't use singleton for gtk_manager
John W. Eaton <jwe@octave.org>
parents:
23753
diff
changeset
|
631 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
632 event_manager m_event_manager; |
27261
dccdc3b001a2
eliminate static functions from octave_link class
John W. Eaton <jwe@octave.org>
parents:
27214
diff
changeset
|
633 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
634 gh_manager *m_gh_manager; |
27321
eddce82a57cc
don't use singleton pattern for gh_manager object
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
635 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
636 // TRUE means this is an interactive interpreter (forced or not). |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
637 bool m_interactive; |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
638 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
639 bool m_read_site_files; |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
640 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
641 bool m_read_init_files; |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
642 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
643 bool m_verbose; |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
644 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
645 bool m_traditional; |
28380
548556e78bdf
make --traditional option easily accessible to the interpreter
John W. Eaton <jwe@octave.org>
parents:
28347
diff
changeset
|
646 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
647 bool m_inhibit_startup_message; |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
648 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
649 bool m_load_path_initialized; |
23111
252975fdc444
more refactoring of interpreter and application classes
John W. Eaton <jwe@octave.org>
parents:
23110
diff
changeset
|
650 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
651 bool m_history_initialized; |
23117
17a3567a7b01
separate final interpreter initialization from execution
John W. Eaton <jwe@octave.org>
parents:
23111
diff
changeset
|
652 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
653 bool m_interrupt_all_in_process_group; |
27519
804e5d42b728
move reader and parser from evaluator repl to interpreter main_loop
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
654 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
655 bool m_cancel_quit; |
27587
494d6243c188
improve compatibility of quit function
John W. Eaton <jwe@octave.org>
parents:
27542
diff
changeset
|
656 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
657 bool m_executing_finish_script; |
27587
494d6243c188
improve compatibility of quit function
John W. Eaton <jwe@octave.org>
parents:
27542
diff
changeset
|
658 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
659 bool m_executing_atexit; |
27690
c81139d8dcc3
prevent atexit functions from adding new atexit functions
John W. Eaton <jwe@octave.org>
parents:
27689
diff
changeset
|
660 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
661 bool m_initialized; |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
31605
diff
changeset
|
662 }; |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
663 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31555
diff
changeset
|
664 OCTAVE_END_NAMESPACE(octave) |
22094
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
665 |
9203833cab7d
move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
666 #endif |