1
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
383
|
23 #if !defined (octave_variables_h) |
|
24 #define octave_variables_h 1 |
1
|
25 |
2975
|
26 class octave_function; |
1
|
27 class symbol_record; |
|
28 class symbol_table; |
1738
|
29 |
2390
|
30 class tree_identifier; |
|
31 class tree_indirect_ref; |
2086
|
32 class octave_value; |
|
33 class octave_value_list; |
2892
|
34 class octave_builtin; |
|
35 class octave_mapper; |
1755
|
36 class string_vector; |
|
37 |
|
38 #include <string> |
1
|
39 |
2390
|
40 #include "ov.h" |
2975
|
41 #include "ov-builtin.h" |
2953
|
42 #include "symtab.h" |
195
|
43 |
2086
|
44 typedef octave_value_list (*Octave_builtin_fcn)(const octave_value_list&, int); |
529
|
45 |
195
|
46 extern void initialize_symbol_tables (void); |
|
47 |
2856
|
48 extern bool lookup (symbol_record *s, bool exec_script = true); |
581
|
49 |
2856
|
50 extern symbol_record *lookup_by_name (const string& nm, |
|
51 bool exec_script = true); |
581
|
52 |
2849
|
53 extern octave_value get_global_value (const string& nm); |
|
54 |
|
55 extern void set_global_value (const string& nm, const octave_value& val); |
|
56 |
1755
|
57 extern string get_help_from_file (const string& f); |
991
|
58 |
1755
|
59 extern string builtin_string_variable (const string&); |
|
60 extern int builtin_real_scalar_variable (const string&, double&); |
2086
|
61 extern octave_value builtin_any_variable (const string&); |
593
|
62 |
|
63 extern void link_to_global_variable (symbol_record *sr); |
|
64 extern void link_to_builtin_variable (symbol_record *sr); |
|
65 extern void link_to_builtin_or_function (symbol_record *sr); |
|
66 |
1755
|
67 extern void force_link_to_function (const string&); |
593
|
68 |
1827
|
69 extern bool is_builtin_variable (const string&); |
|
70 extern bool is_text_function_name (const string&); |
2293
|
71 extern bool is_mapper_function_name (const string&); |
|
72 extern bool is_builtin_function_name (const string&); |
1827
|
73 extern bool is_globally_visible (const string&); |
593
|
74 |
2975
|
75 extern octave_function * |
2892
|
76 is_valid_function (const octave_value&, const string&, bool warn = false); |
593
|
77 |
2975
|
78 extern octave_function * |
2892
|
79 extract_function (const octave_value& arg, const string& warn_for, |
|
80 const string& fname, const string& header, |
|
81 const string& trailer); |
2796
|
82 |
2921
|
83 extern string_vector |
|
84 get_struct_elts (const string& text); |
|
85 |
|
86 extern bool |
|
87 looks_like_struct (const string& text); |
|
88 |
|
89 extern string_vector |
|
90 generate_struct_completions (const string& text, string& prefix, |
|
91 string& hint); |
|
92 |
1755
|
93 extern string_vector make_name_list (void); |
195
|
94 |
2856
|
95 extern void bind_ans (const octave_value& val, bool print); |
1162
|
96 |
1489
|
97 extern void bind_global_error_variable (void); |
|
98 |
|
99 extern void clear_global_error_variable (void *); |
|
100 |
2892
|
101 extern void |
|
102 bind_builtin_variable (const string&, const octave_value&, |
|
103 bool protect = false, bool eternal = false, |
2953
|
104 symbol_record::sv_function f = 0, |
2892
|
105 const string& help = string ()); |
1406
|
106 |
1
|
107 // Symbol table for symbols at the top level. |
|
108 extern symbol_table *top_level_sym_tab; |
|
109 |
|
110 // Symbol table for the current scope. |
|
111 extern symbol_table *curr_sym_tab; |
|
112 |
|
113 // Symbol table for global symbols. |
|
114 extern symbol_table *global_sym_tab; |
|
115 |
2204
|
116 enum echo_state |
|
117 { |
|
118 ECHO_OFF = 0, |
|
119 ECHO_SCRIPTS = 1, |
|
120 ECHO_FUNCTIONS = 2, |
|
121 ECHO_CMD_LINE = 4 |
|
122 }; |
|
123 |
|
124 extern int Vecho_executing_commands; |
|
125 |
1
|
126 #endif |
|
127 |
|
128 /* |
|
129 ;;; Local Variables: *** |
|
130 ;;; mode: C++ *** |
|
131 ;;; End: *** |
|
132 */ |