Mercurial > octave
comparison libinterp/corefcn/interpreter.h @ 31771:21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
* mk-opts.pl, external.txi, embedded.cc, make_int.cc, standalone.cc,
standalonebuiltin.cc, BaseControl.cc, BaseControl.h, ButtonControl.cc,
ButtonControl.h, ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h,
CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h,
ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h, Figure.cc,
Figure.h, FigureWindow.cc, FigureWindow.h, GLCanvas.cc, GLCanvas.h,
GenericEventNotify.h, KeyMap.cc, ListBoxControl.cc, ListBoxControl.h,
Logger.cc, Logger.h, Menu.cc, Menu.h, MenuContainer.h, Object.cc, Object.h,
ObjectProxy.cc, ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc,
PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc,
PushTool.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc,
SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h, TextEdit.h,
ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h,
ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, gl-select.cc,
gl-select.h, qopengl-functions.h, qt-graphics-toolkit.h, qdialog.cpp,
qfontdialog.cpp, qprintdialog_win.cpp, liboctgui-build-info.h,
liboctgui-build-info.in.cc, color-picker.cc, color-picker.h, command-widget.cc,
command-widget.h, community-news.cc, community-news.h, dialog.cc, dialog.h,
documentation-bookmarks.cc, documentation-bookmarks.h,
documentation-dock-widget.cc, documentation-dock-widget.h, documentation.cc,
documentation.h, dw-main-window.cc, dw-main-window.h,
external-editor-interface.cc, external-editor-interface.h,
files-dock-widget.cc, files-dock-widget.h, find-files-dialog.cc,
find-files-dialog.h, find-files-model.cc, find-files-model.h,
gui-preferences.cc, gui-preferences.h, gui-settings.cc, gui-settings.h,
history-dock-widget.cc, history-dock-widget.h, interpreter-qobject.cc,
interpreter-qobject.h, file-editor-interface.h, file-editor-tab.cc,
file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc,
find-dialog.h, marker.cc, marker.h, octave-qscintilla.cc, octave-qscintilla.h,
octave-txt-lexer.cc, octave-txt-lexer.h, main-window.cc, main-window.h,
news-reader.cc, news-reader.h, octave-dock-widget.cc, octave-dock-widget.h,
octave-qobject.cc, octave-qobject.h, qt-application.cc, qt-application.h,
qt-interpreter-events.cc, qt-interpreter-events.h, release-notes.cc,
release-notes.h, set-path-dialog.cc, set-path-dialog.h, set-path-model.cc,
set-path-model.h, settings-dialog.cc, settings-dialog.h,
shortcuts-tree-widget.cc, shortcuts-tree-widget.h, tab-bar.cc, tab-bar.h,
terminal-dock-widget.cc, terminal-dock-widget.h, variable-editor-model.cc,
variable-editor-model.h, variable-editor.cc, variable-editor.h,
welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-model.h,
workspace-view.cc, workspace-view.h, build-env.h, Cell.cc, Cell.h,
__contourc__.cc, __magick_read__.cc, auto-shlib.cc, auto-shlib.h,
base-text-renderer.h, bsxfun.cc, c-file-ptr-stream.cc, c-file-ptr-stream.h,
call-stack.cc, call-stack.h, debug.cc, defaults.cc, defaults.h, defun.cc,
display.cc, display.h, dynamic-ld.cc, dynamic-ld.h, environment.cc,
environment.h, error.cc, error.h, errwarn.cc, errwarn.h, event-manager.cc,
event-manager.h, event-queue.cc, event-queue.h, fcn-info.cc, fcn-info.h,
ft-text-renderer.cc, ft-text-renderer.h, genprops.awk, gh-manager.cc,
gh-manager.h, gl-render.cc, gl-render.h, gl2ps-print.cc, graphics-toolkit.h,
graphics.cc, graphics.in.h, gtk-manager.cc, gtk-manager.h, help.cc, help.h,
hook-fcn.h, input.cc, input.h, interpreter-private.cc, interpreter-private.h,
interpreter.cc, interpreter.h, jsondecode.cc, latex-text-renderer.cc,
latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h,
ls-hdf5.cc, ls-hdf5.h, mxarray.h, oct-errno.h, oct-errno.in.cc, oct-fstrm.cc,
oct-fstrm.h, oct-handle.h, oct-hist.cc, oct-hist.h, oct-iostrm.cc,
oct-iostrm.h, oct-map.cc, oct-map.h, oct-opengl.h, oct-prcstrm.cc,
oct-prcstrm.h, oct-procbuf.cc, oct-procbuf.h, oct-process.h, oct-stdstrm.h,
oct-stream.cc, oct-stream.h, oct-strstrm.cc, oct-strstrm.h,
oct-tex-lexer.in.ll, pager.cc, pager.h, pr-flt-fmt.cc, pr-flt-fmt.h,
pr-output.cc, pr-output.h, procstream.cc, procstream.h, settings.cc,
settings.h, sighandlers.cc, sighandlers.h, stack-frame.cc, stack-frame.h,
svd.cc, syminfo.cc, syminfo.h, symrec.cc, symrec.h, symscope.cc, symscope.h,
symtab.cc, symtab.h, sysdep.cc, sysdep.h, text-engine.cc, text-engine.h,
text-renderer.cc, text-renderer.h, toplev.cc, url-handle-manager.cc,
url-handle-manager.h, variables.cc, xpow.cc, __init_fltk__.cc,
__init_gnuplot__.cc, __ode15__.cc, audiodevinfo.cc, gzip.cc,
liboctinterp-build-info.h, liboctinterp-build-info.in.cc,
mk-build-env-features.sh, mk-builtins.pl, cdef-class.cc, cdef-class.h,
cdef-manager.h, cdef-method.cc, cdef-method.h, cdef-object.cc, cdef-object.h,
cdef-package.cc, cdef-package.h, cdef-property.cc, cdef-property.h,
cdef-utils.cc, cdef-utils.h, ov-base-diag.cc, ov-base-diag.h, ov-base-int.cc,
ov-base-int.h, ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc,
ov-base-scalar.h, ov-base-sparse.cc, ov-base-sparse.h, ov-base.cc, ov-base.h,
ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc,
ov-bool.h, ov-builtin.cc, ov-builtin.h, ov-cell.cc, ov-cell.h, ov-ch-mat.cc,
ov-ch-mat.h, ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h,
ov-colon.h, ov-complex.cc, ov-complex.h, ov-cs-list.h, ov-cx-diag.cc,
ov-cx-diag.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h,
ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.cc,
ov-fcn.h, ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h,
ov-flt-cx-diag.cc, ov-flt-cx-diag.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h,
ov-flt-re-diag.cc, ov-flt-re-diag.h, ov-flt-re-mat.cc, ov-flt-re-mat.h,
ov-intx.h, ov-java.cc, ov-java.h, ov-lazy-idx.cc, ov-lazy-idx.h,
ov-legacy-range.cc, ov-legacy-range.h, ov-magic-int.cc, ov-magic-int.h,
ov-mex-fcn.cc, ov-mex-fcn.h, ov-null-mat.cc, ov-null-mat.h, ov-oncleanup.cc,
ov-oncleanup.h, ov-perm.cc, ov-perm.h, ov-range.cc, ov-range.h, ov-re-diag.cc,
ov-re-diag.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h,
ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc,
ov-struct.h, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.cc,
ov.h, ovl.cc, ovl.h, octave.cc, octave.h, anon-fcn-validator.h, bp-table.cc,
bp-table.h, comment-list.cc, comment-list.h, filepos.h, lex.h, lex.ll,
oct-lvalue.cc, oct-lvalue.h, oct-parse.yy, parse.h, profiler.cc, profiler.h,
pt-anon-scopes.h, pt-arg-list.cc, pt-arg-list.h, pt-args-block.cc,
pt-args-block.h, pt-array-list.cc, pt-array-list.h, pt-assign.cc, pt-assign.h,
pt-binop.cc, pt-binop.h, pt-bp.h, pt-cbinop.h, pt-cell.h, pt-check.h,
pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.cc,
pt-decl.h, pt-eval.cc, pt-eval.h, pt-except.cc, pt-except.h, pt-exp.cc,
pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h, pt-idx.cc,
pt-idx.h, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.h, pt-misc.cc, pt-misc.h,
pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-spmd.cc, pt-spmd.h,
pt-stmt.cc, pt-stmt.h, pt-tm-const.cc, pt-tm-const.h, pt-unop.cc, pt-unop.h,
pt-walk.h, pt.cc, pt.h, token.cc, token.h, usage.h, Array-base.cc, Array.h,
CColVector.cc, CColVector.h, CDiagMatrix.cc, CDiagMatrix.h, CMatrix.cc,
CMatrix.h, CNDArray.cc, CNDArray.h, CRowVector.cc, CRowVector.h, CSparse.cc,
CSparse.h, DiagArray2.cc, DiagArray2.h, MArray.cc, MArray.h, MDiagArray2.h,
MSparse.h, MatrixType.cc, MatrixType.h, PermMatrix.cc, PermMatrix.h, Range.cc,
Range.h, Sparse-b.cc, Sparse.cc, Sparse.h, boolMatrix.cc, boolMatrix.h,
boolNDArray.cc, boolNDArray.h, boolSparse.cc, boolSparse.h, chMatrix.h,
chNDArray.h, dColVector.cc, dColVector.h, dDiagMatrix.cc, dDiagMatrix.h,
dMatrix.cc, dMatrix.h, dNDArray.cc, dNDArray.h, dRowVector.cc, dRowVector.h,
dSparse.cc, dSparse.h, dim-vector.cc, dim-vector.h, fCColVector.cc,
fCColVector.h, fCDiagMatrix.cc, fCDiagMatrix.h, fCMatrix.cc, fCMatrix.h,
fCNDArray.cc, fCNDArray.h, fCRowVector.cc, fCRowVector.h, fColVector.cc,
fColVector.h, fDiagMatrix.cc, fDiagMatrix.h, fMatrix.cc, fMatrix.h,
fNDArray.cc, fNDArray.h, fRowVector.cc, fRowVector.h, idx-vector.cc,
idx-vector.h, intNDArray.cc, intNDArray.h, liboctave-build-info.h,
liboctave-build-info.in.cc, CollocWt.cc, CollocWt.h, DAE.h, DAEFunc.h, DAERT.h,
DAERTFunc.h, DASPK.cc, DASPK.h, DASRT.cc, DASRT.h, DASSL.cc, DASSL.h, DET.h,
EIG.h, LSODE.cc, LSODE.h, ODE.h, ODEFunc.h, ODES.h, ODESFunc.h, Quad.h,
aepbalance.cc, aepbalance.h, base-dae.h, base-de.h, chol.cc, chol.h,
eigs-base.cc, fEIG.h, gepbalance.h, gsvd.cc, gsvd.h, hess.h, lu.cc, lu.h,
oct-fftw.cc, oct-fftw.h, oct-rand.cc, oct-rand.h, oct-spparms.cc,
oct-spparms.h, qr.cc, qr.h, qrp.cc, qrp.h, randmtzig.cc, randmtzig.h, schur.h,
sparse-chol.cc, sparse-chol.h, sparse-lu.cc, sparse-lu.h, sparse-qr.cc,
sparse-qr.h, svd.cc, svd.h, child-list.cc, child-list.h, dir-ops.cc, dir-ops.h,
file-ops.cc, file-ops.h, file-stat.cc, file-stat.h, lo-sysdep.cc, lo-sysdep.h,
lo-sysinfo.cc, lo-sysinfo.h, mach-info.cc, mach-info.h, oct-env.cc, oct-env.h,
oct-group.cc, oct-group.h, oct-password.cc, oct-password.h, oct-syscalls.cc,
oct-syscalls.h, oct-time.cc, oct-time.h, oct-uname.cc, oct-uname.h,
action-container.h, base-list.h, caseless-str.h, cmd-edit.cc, cmd-edit.h,
cmd-hist.cc, cmd-hist.h, data-conv.cc, file-info.h, glob-match.cc,
glob-match.h, kpse.cc, kpse.h, lo-array-errwarn.cc, lo-array-errwarn.h,
lo-hash.cc, lo-hash.h, lo-ieee.cc, lo-ieee.h, lo-regexp.cc, lo-regexp.h,
oct-inttypes.cc, oct-inttypes.h, oct-mutex.cc, oct-mutex.h, oct-refcount.h,
oct-shlib.cc, oct-shlib.h, oct-sort.cc, oct-sort.h, oct-sparse.cc,
octave-preserve-stream-state.h, pathsearch.cc, pathsearch.h, quit.cc,
singleton-cleanup.cc, singleton-cleanup.h, str-vec.cc, str-vec.h,
unwind-prot.cc, unwind-prot.h, url-transfer.cc, url-transfer.h, version.cc,
version.in.h, cxx-signal-helpers.cc, acinclude.m4, main-cli.cc, main-gui.cc,
main.in.cc, mkoctfile.in.cc, octave-build-info.h, octave-build-info.in.cc,
octave-config.in.cc, octave-svgconvert.cc, shared-fcns.h:
maint: Eliminate "(void)" in C++ function prototypes/declarations.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 24 Jan 2023 17:19:44 -0800 |
parents | 06bd4e4d4a92 |
children | febd82d1a8de |
comparison
equal
deleted
inserted
replaced
31770:1d1eff97670e | 31771:21f9b34eb893 |
---|---|
89 | 89 |
90 class temporary_file_list | 90 class temporary_file_list |
91 { | 91 { |
92 public: | 92 public: |
93 | 93 |
94 temporary_file_list (void) : m_files () { } | 94 temporary_file_list () : m_files () { } |
95 | 95 |
96 // No copying! | 96 // No copying! |
97 | 97 |
98 temporary_file_list (const temporary_file_list&) = delete; | 98 temporary_file_list (const temporary_file_list&) = delete; |
99 | 99 |
100 temporary_file_list& operator = (const temporary_file_list&) = delete; | 100 temporary_file_list& operator = (const temporary_file_list&) = delete; |
101 | 101 |
102 ~temporary_file_list (void); | 102 ~temporary_file_list (); |
103 | 103 |
104 void insert (const std::string& file); | 104 void insert (const std::string& file); |
105 | 105 |
106 void cleanup (void); | 106 void cleanup (); |
107 | 107 |
108 private: | 108 private: |
109 | 109 |
110 // List of temporary files to delete when we exit. | 110 // List of temporary files to delete when we exit. |
111 std::set<std::string> m_files; | 111 std::set<std::string> m_files; |
126 | 126 |
127 interpreter& operator = (const interpreter&) = delete; | 127 interpreter& operator = (const interpreter&) = delete; |
128 | 128 |
129 // Clean up the interpreter object. | 129 // Clean up the interpreter object. |
130 | 130 |
131 ~interpreter (void); | 131 ~interpreter (); |
132 | 132 |
133 void intern_nargin (octave_idx_type nargs); | 133 void intern_nargin (octave_idx_type nargs); |
134 | 134 |
135 // If creating an embedded interpreter, you may inhibit reading | 135 // If creating an embedded interpreter, you may inhibit reading |
136 // the command history file by calling initialize_history with | 136 // the command history file by calling initialize_history with |
146 | 146 |
147 void initialize_load_path (bool set_initial_path = true); | 147 void initialize_load_path (bool set_initial_path = true); |
148 | 148 |
149 // Load command line history, set the load path. | 149 // Load command line history, set the load path. |
150 | 150 |
151 void initialize (void); | 151 void initialize (); |
152 | 152 |
153 // Note: GET_LINE_AND_EVAL is only used by new experimental terminal | 153 // Note: GET_LINE_AND_EVAL is only used by new experimental terminal |
154 // widget. | 154 // widget. |
155 | 155 |
156 void get_line_and_eval (void); | 156 void get_line_and_eval (); |
157 | 157 |
158 // Parse a line of input. If input ends at a complete statement | 158 // Parse a line of input. If input ends at a complete statement |
159 // boundary, execute the resulting parse tree. Useful to handle | 159 // boundary, execute the resulting parse tree. Useful to handle |
160 // parsing user input when running in server mode. | 160 // parsing user input when running in server mode. |
161 | 161 |
163 | 163 |
164 // Initialize the interpreter (if not already done by an explicit | 164 // Initialize the interpreter (if not already done by an explicit |
165 // call to initialize), execute startup files, --eval option code, | 165 // call to initialize), execute startup files, --eval option code, |
166 // script files, and/or interactive commands. | 166 // script files, and/or interactive commands. |
167 | 167 |
168 int execute (void); | 168 int execute (); |
169 | 169 |
170 bool server_mode (void) const { return m_evaluator.server_mode (); } | 170 bool server_mode () const { return m_evaluator.server_mode (); } |
171 | 171 |
172 bool interactive (void) const | 172 bool interactive () const |
173 { | 173 { |
174 return m_interactive; | 174 return m_interactive; |
175 } | 175 } |
176 | 176 |
177 void interactive (bool arg) | 177 void interactive (bool arg) |
197 void traditional (bool flag) | 197 void traditional (bool flag) |
198 { | 198 { |
199 m_traditional = flag; | 199 m_traditional = flag; |
200 } | 200 } |
201 | 201 |
202 bool traditional (void) const | 202 bool traditional () const |
203 { | 203 { |
204 return m_traditional; | 204 return m_traditional; |
205 } | 205 } |
206 | 206 |
207 void inhibit_startup_message (bool flag) | 207 void inhibit_startup_message (bool flag) |
208 { | 208 { |
209 m_inhibit_startup_message = flag; | 209 m_inhibit_startup_message = flag; |
210 } | 210 } |
211 | 211 |
212 bool in_top_level_repl (void) const | 212 bool in_top_level_repl () const |
213 { | 213 { |
214 return m_evaluator.in_top_level_repl (); | 214 return m_evaluator.in_top_level_repl (); |
215 } | 215 } |
216 | 216 |
217 bool initialized (void) const | 217 bool initialized () const |
218 { | 218 { |
219 return m_initialized; | 219 return m_initialized; |
220 } | 220 } |
221 | 221 |
222 void interrupt_all_in_process_group (bool b) | 222 void interrupt_all_in_process_group (bool b) |
223 { | 223 { |
224 m_interrupt_all_in_process_group = b; | 224 m_interrupt_all_in_process_group = b; |
225 } | 225 } |
226 | 226 |
227 bool interrupt_all_in_process_group (void) const | 227 bool interrupt_all_in_process_group () const |
228 { | 228 { |
229 return m_interrupt_all_in_process_group; | 229 return m_interrupt_all_in_process_group; |
230 } | 230 } |
231 | 231 |
232 application * get_app_context (void) | 232 application * get_app_context () |
233 { | 233 { |
234 return m_app_context; | 234 return m_app_context; |
235 } | 235 } |
236 | 236 |
237 display_info& get_display_info (void) | 237 display_info& get_display_info () |
238 { | 238 { |
239 return m_display_info; | 239 return m_display_info; |
240 } | 240 } |
241 | 241 |
242 environment& get_environment (void) | 242 environment& get_environment () |
243 { | 243 { |
244 return m_environment; | 244 return m_environment; |
245 } | 245 } |
246 | 246 |
247 settings& get_settings (void) | 247 settings& get_settings () |
248 { | 248 { |
249 return m_settings; | 249 return m_settings; |
250 } | 250 } |
251 | 251 |
252 error_system& get_error_system (void) | 252 error_system& get_error_system () |
253 { | 253 { |
254 return m_error_system; | 254 return m_error_system; |
255 } | 255 } |
256 | 256 |
257 tree_evaluator& get_evaluator (void); | 257 tree_evaluator& get_evaluator (); |
258 | 258 |
259 help_system& get_help_system (void) | 259 help_system& get_help_system () |
260 { | 260 { |
261 return m_help_system; | 261 return m_help_system; |
262 } | 262 } |
263 | 263 |
264 input_system& get_input_system (void) | 264 input_system& get_input_system () |
265 { | 265 { |
266 return m_input_system; | 266 return m_input_system; |
267 } | 267 } |
268 | 268 |
269 output_system& get_output_system (void) | 269 output_system& get_output_system () |
270 { | 270 { |
271 return m_output_system; | 271 return m_output_system; |
272 } | 272 } |
273 | 273 |
274 history_system& get_history_system (void) | 274 history_system& get_history_system () |
275 { | 275 { |
276 return m_history_system; | 276 return m_history_system; |
277 } | 277 } |
278 | 278 |
279 dynamic_loader& get_dynamic_loader (void) | 279 dynamic_loader& get_dynamic_loader () |
280 { | 280 { |
281 return m_dynamic_loader; | 281 return m_dynamic_loader; |
282 } | 282 } |
283 | 283 |
284 load_path& get_load_path (void) | 284 load_path& get_load_path () |
285 { | 285 { |
286 return m_load_path; | 286 return m_load_path; |
287 } | 287 } |
288 | 288 |
289 load_save_system& get_load_save_system (void) | 289 load_save_system& get_load_save_system () |
290 { | 290 { |
291 return m_load_save_system; | 291 return m_load_save_system; |
292 } | 292 } |
293 | 293 |
294 type_info& get_type_info (void) | 294 type_info& get_type_info () |
295 { | 295 { |
296 return m_type_info; | 296 return m_type_info; |
297 } | 297 } |
298 | 298 |
299 symbol_table& get_symbol_table (void) | 299 symbol_table& get_symbol_table () |
300 { | 300 { |
301 return m_symbol_table; | 301 return m_symbol_table; |
302 } | 302 } |
303 | 303 |
304 symbol_scope get_top_scope (void) const; | 304 symbol_scope get_top_scope () const; |
305 symbol_scope get_current_scope (void) const; | 305 symbol_scope get_current_scope () const; |
306 symbol_scope require_current_scope (const std::string& who) const; | 306 symbol_scope require_current_scope (const std::string& who) const; |
307 | 307 |
308 profiler& get_profiler (void); | 308 profiler& get_profiler (); |
309 | 309 |
310 stream_list& get_stream_list (void); | 310 stream_list& get_stream_list (); |
311 | 311 |
312 child_list& get_child_list (void) | 312 child_list& get_child_list () |
313 { | 313 { |
314 return m_child_list; | 314 return m_child_list; |
315 } | 315 } |
316 | 316 |
317 url_handle_manager& get_url_handle_manager (void); | 317 url_handle_manager& get_url_handle_manager (); |
318 | 318 |
319 cdef_manager& get_cdef_manager (void) | 319 cdef_manager& get_cdef_manager () |
320 { | 320 { |
321 return m_cdef_manager; | 321 return m_cdef_manager; |
322 } | 322 } |
323 | 323 |
324 gtk_manager& get_gtk_manager (void) | 324 gtk_manager& get_gtk_manager () |
325 { | 325 { |
326 return m_gtk_manager; | 326 return m_gtk_manager; |
327 } | 327 } |
328 | 328 |
329 event_manager& get_event_manager (void) | 329 event_manager& get_event_manager () |
330 { | 330 { |
331 return m_event_manager; | 331 return m_event_manager; |
332 } | 332 } |
333 | 333 |
334 gh_manager& get_gh_manager (void) | 334 gh_manager& get_gh_manager () |
335 { | 335 { |
336 return *m_gh_manager; | 336 return *m_gh_manager; |
337 } | 337 } |
338 | 338 |
339 // Any Octave code that needs to change the current directory should | 339 // Any Octave code that needs to change the current directory should |
431 | 431 |
432 void source_file (const std::string& file_name, | 432 void source_file (const std::string& file_name, |
433 const std::string& context = "", | 433 const std::string& context = "", |
434 bool verbose = false, bool require_file = true); | 434 bool verbose = false, bool require_file = true); |
435 | 435 |
436 bool at_top_level (void) const; | 436 bool at_top_level () const; |
437 | 437 |
438 bool isglobal (const std::string& name) const; | 438 bool isglobal (const std::string& name) const; |
439 | 439 |
440 octave_value find (const std::string& name); | 440 octave_value find (const std::string& name); |
441 | 441 |
442 void clear_all (bool force = false); | 442 void clear_all (bool force = false); |
443 | 443 |
444 void clear_objects (void); | 444 void clear_objects (); |
445 | 445 |
446 void clear_variable (const std::string& name); | 446 void clear_variable (const std::string& name); |
447 | 447 |
448 void clear_variable_pattern (const std::string& pattern); | 448 void clear_variable_pattern (const std::string& pattern); |
449 | 449 |
450 void clear_variable_regexp (const std::string& pattern); | 450 void clear_variable_regexp (const std::string& pattern); |
451 | 451 |
452 void clear_variables (void); | 452 void clear_variables (); |
453 | 453 |
454 void clear_global_variable (const std::string& name); | 454 void clear_global_variable (const std::string& name); |
455 | 455 |
456 void clear_global_variable_pattern (const std::string& pattern); | 456 void clear_global_variable_pattern (const std::string& pattern); |
457 | 457 |
458 void clear_global_variable_regexp (const std::string& pattern); | 458 void clear_global_variable_regexp (const std::string& pattern); |
459 | 459 |
460 void clear_global_variables (void); | 460 void clear_global_variables (); |
461 | 461 |
462 void clear_functions (bool force = false); | 462 void clear_functions (bool force = false); |
463 | 463 |
464 void clear_function (const std::string& name); | 464 void clear_function (const std::string& name); |
465 | 465 |
471 | 471 |
472 void clear_symbol_pattern (const std::string& pat); | 472 void clear_symbol_pattern (const std::string& pat); |
473 | 473 |
474 void clear_symbol_regexp (const std::string& pat); | 474 void clear_symbol_regexp (const std::string& pat); |
475 | 475 |
476 std::list<std::string> variable_names (void); | 476 std::list<std::string> variable_names (); |
477 | 477 |
478 std::list<std::string> top_level_variable_names (void); | 478 std::list<std::string> top_level_variable_names (); |
479 | 479 |
480 std::list<std::string> global_variable_names (void); | 480 std::list<std::string> global_variable_names (); |
481 | 481 |
482 std::list<std::string> user_function_names (void); | 482 std::list<std::string> user_function_names (); |
483 | 483 |
484 std::list<std::string> autoloaded_functions (void) const; | 484 std::list<std::string> autoloaded_functions () const; |
485 | 485 |
486 void interrupt (void); | 486 void interrupt (); |
487 | 487 |
488 // Pause interpreter execution at the next available statement and | 488 // Pause interpreter execution at the next available statement and |
489 // enter the debugger. | 489 // enter the debugger. |
490 void pause (void); | 490 void pause (); |
491 | 491 |
492 // Exit debugger or stop execution and return to the top-level REPL | 492 // Exit debugger or stop execution and return to the top-level REPL |
493 // or server loop. | 493 // or server loop. |
494 void stop (void); | 494 void stop (); |
495 | 495 |
496 // Add EXPR to the set of expressions that may be evaluated when the | 496 // Add EXPR to the set of expressions that may be evaluated when the |
497 // debugger stops at a breakpoint. | 497 // debugger stops at a breakpoint. |
498 void add_debug_watch_expression (const std::string& expr); | 498 void add_debug_watch_expression (const std::string& expr); |
499 | 499 |
501 // when the debugger stops at a breakpoint. | 501 // when the debugger stops at a breakpoint. |
502 void remove_debug_watch_expression (const std::string& expr); | 502 void remove_debug_watch_expression (const std::string& expr); |
503 | 503 |
504 // Clear the set of expressions that may be evaluated when the | 504 // Clear the set of expressions that may be evaluated when the |
505 // debugger stops at a breakpoint. | 505 // debugger stops at a breakpoint. |
506 void clear_debug_watch_expressions (void); | 506 void clear_debug_watch_expressions (); |
507 | 507 |
508 // Return the set of expressions that may be evaluated when the | 508 // Return the set of expressions that may be evaluated when the |
509 // debugger stops at a breakpoint. | 509 // debugger stops at a breakpoint. |
510 std::set<std::string> debug_watch_expressions (void) const; | 510 std::set<std::string> debug_watch_expressions () const; |
511 | 511 |
512 // Resume interpreter execution if paused. | 512 // Resume interpreter execution if paused. |
513 void resume (void); | 513 void resume (); |
514 | 514 |
515 octave_value PS1 (const octave_value_list& args, int nargout); | 515 octave_value PS1 (const octave_value_list& args, int nargout); |
516 std::string PS1 (void) const; | 516 std::string PS1 () const; |
517 std::string PS1 (const std::string& s); | 517 std::string PS1 (const std::string& s); |
518 void set_PS1 (const std::string& s); | 518 void set_PS1 (const std::string& s); |
519 | 519 |
520 octave_value PS2 (const octave_value_list& args, int nargout); | 520 octave_value PS2 (const octave_value_list& args, int nargout); |
521 std::string PS2 (void) const; | 521 std::string PS2 () const; |
522 std::string PS2 (const std::string& s); | 522 std::string PS2 (const std::string& s); |
523 void set_PS2 (const std::string& s); | 523 void set_PS2 (const std::string& s); |
524 | 524 |
525 octave_value PS4 (const octave_value_list& args, int nargout); | 525 octave_value PS4 (const octave_value_list& args, int nargout); |
526 std::string PS4 (void) const; | 526 std::string PS4 () const; |
527 std::string PS4 (const std::string& s); | 527 std::string PS4 (const std::string& s); |
528 void set_PS4 (const std::string& s); | 528 void set_PS4 (const std::string& s); |
529 | 529 |
530 // Provided for convenience. Will be removed once we eliminate the | 530 // Provided for convenience. Will be removed once we eliminate the |
531 // old terminal widget. | 531 // old terminal widget. |
532 bool experimental_terminal_widget (void) const; | 532 bool experimental_terminal_widget () const; |
533 | 533 |
534 void handle_exception (const execution_exception& ee); | 534 void handle_exception (const execution_exception& ee); |
535 | 535 |
536 void recover_from_exception (void); | 536 void recover_from_exception (); |
537 | 537 |
538 void mark_for_deletion (const std::string& file); | 538 void mark_for_deletion (const std::string& file); |
539 | 539 |
540 void cleanup_tmp_files (void); | 540 void cleanup_tmp_files (); |
541 | 541 |
542 void quit (int exit_status, bool force = false, bool confirm = true); | 542 void quit (int exit_status, bool force = false, bool confirm = true); |
543 | 543 |
544 void cancel_quit (bool flag) { m_cancel_quit = flag; } | 544 void cancel_quit (bool flag) { m_cancel_quit = flag; } |
545 | 545 |
546 bool executing_finish_script (void) const | 546 bool executing_finish_script () const |
547 { | 547 { |
548 return m_executing_finish_script; | 548 return m_executing_finish_script; |
549 } | 549 } |
550 | 550 |
551 void add_atexit_fcn (const std::string& fname); | 551 void add_atexit_fcn (const std::string& fname); |
552 | 552 |
553 bool remove_atexit_fcn (const std::string& fname); | 553 bool remove_atexit_fcn (const std::string& fname); |
554 | 554 |
555 static interpreter * the_interpreter (void) { return m_instance; } | 555 static interpreter * the_interpreter () { return m_instance; } |
556 | 556 |
557 private: | 557 private: |
558 | 558 |
559 void display_startup_message (void) const; | 559 void display_startup_message () const; |
560 | 560 |
561 int execute_startup_files (void); | 561 int execute_startup_files (); |
562 | 562 |
563 int execute_eval_option_code (void); | 563 int execute_eval_option_code (); |
564 | 564 |
565 int execute_command_line_file (void); | 565 int execute_command_line_file (); |
566 | 566 |
567 int main_loop (void); | 567 int main_loop (); |
568 | 568 |
569 int server_loop (void); | 569 int server_loop (); |
570 | 570 |
571 void shutdown (void); | 571 void shutdown (); |
572 | 572 |
573 void execute_atexit_fcns (void); | 573 void execute_atexit_fcns (); |
574 | 574 |
575 void maximum_braindamage (void); | 575 void maximum_braindamage (); |
576 | 576 |
577 void execute_pkg_add (const std::string& dir); | 577 void execute_pkg_add (const std::string& dir); |
578 | 578 |
579 int safe_source_file (const std::string& file_name, | 579 int safe_source_file (const std::string& file_name, |
580 const std::string& context = "", | 580 const std::string& context = "", |