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 |
|
44 extern void initialize_symbol_tables (void); |
|
45 |
1827
|
46 extern bool is_builtin_variable (const string&); |
|
47 extern bool is_text_function_name (const string&); |
2293
|
48 extern bool is_mapper_function_name (const string&); |
|
49 extern bool is_builtin_function_name (const string&); |
1827
|
50 extern bool is_globally_visible (const string&); |
593
|
51 |
2975
|
52 extern octave_function * |
3308
|
53 is_valid_function (const octave_value&, const string& = string (), |
|
54 bool warn = false); |
593
|
55 |
2975
|
56 extern octave_function * |
3308
|
57 is_valid_function (const string&, const string& = string (), |
|
58 bool warn = false); |
3178
|
59 |
|
60 extern octave_function * |
2892
|
61 extract_function (const octave_value& arg, const string& warn_for, |
|
62 const string& fname, const string& header, |
|
63 const string& trailer); |
2796
|
64 |
2921
|
65 extern string_vector |
|
66 get_struct_elts (const string& text); |
|
67 |
3020
|
68 extern string_vector |
|
69 generate_struct_completions (const string& text, string& prefix, |
|
70 string& hint); |
|
71 |
2921
|
72 extern bool |
|
73 looks_like_struct (const string& text); |
|
74 |
3020
|
75 extern bool lookup (symbol_record *s, bool exec_script = true); |
|
76 |
|
77 extern symbol_record * |
|
78 lookup_by_name (const string& nm, bool exec_script = true); |
|
79 |
|
80 extern octave_value get_global_value (const string& nm); |
|
81 |
|
82 extern void set_global_value (const string& nm, const octave_value& val); |
|
83 |
|
84 extern string builtin_string_variable (const string&); |
|
85 extern int builtin_real_scalar_variable (const string&, double&); |
|
86 extern octave_value builtin_any_variable (const string&); |
|
87 |
|
88 extern void link_to_global_variable (symbol_record *sr); |
|
89 extern void link_to_builtin_or_function (symbol_record *sr); |
|
90 |
|
91 extern void force_link_to_function (const string&); |
2921
|
92 |
2856
|
93 extern void bind_ans (const octave_value& val, bool print); |
1162
|
94 |
1489
|
95 extern void bind_global_error_variable (void); |
|
96 |
|
97 extern void clear_global_error_variable (void *); |
|
98 |
2892
|
99 extern void |
3259
|
100 bind_builtin_constant (const string&, const octave_value&, |
|
101 bool protect = false, bool eternal = false, |
|
102 const string& help = string ()); |
|
103 |
|
104 extern void |
2892
|
105 bind_builtin_variable (const string&, const octave_value&, |
|
106 bool protect = false, bool eternal = false, |
3005
|
107 symbol_record::change_function f = 0, |
2892
|
108 const string& help = string ()); |
1406
|
109 |
1
|
110 // Symbol table for symbols at the top level. |
|
111 extern symbol_table *top_level_sym_tab; |
|
112 |
|
113 // Symbol table for the current scope. |
|
114 extern symbol_table *curr_sym_tab; |
|
115 |
|
116 // Symbol table for global symbols. |
|
117 extern symbol_table *global_sym_tab; |
|
118 |
|
119 #endif |
|
120 |
|
121 /* |
|
122 ;;; Local Variables: *** |
|
123 ;;; mode: C++ *** |
|
124 ;;; End: *** |
|
125 */ |