26#if ! defined (octave_symtab_h)
27#define octave_symtab_h 1
29#include "octave-config.h"
41class tree_argument_list;
71 symbol_scope current_scope (
void)
const;
73 bool is_built_in_function_name (
const std::string&
name);
76 const symbol_scope& search_scope);
78 octave_value find_private_function (
const std::string& dir_name,
79 const std::string&
name);
84 const std::string& dispatch_type);
91 builtin_find (
const std::string&
name,
92 const symbol_scope& search_scope = symbol_scope ());
95 fcn_table_find (
const std::string&
name,
97 const symbol_scope& search_scope = symbol_scope ());
108 find_function (
const std::string&
name,
109 const symbol_scope& search_scope = symbol_scope ());
115 find_function (
const std::string&
name,
117 const symbol_scope& search_scope = symbol_scope ());
123 void install_cmdline_function (
const std::string&
name,
129 void install_local_function (
const std::string&
name,
131 const std::string& file_name);
133 void install_user_function (
const std::string&
name,
138 void install_built_in_function (
const std::string&
name,
145 void clear_functions (
bool force =
false);
147 void clear_function (
const std::string&
name);
149 void clear_function_pattern (
const std::string& pat);
151 void clear_function_regexp (
const std::string& pat);
153 void clear_user_function (
const std::string&
name);
156 void clear_dld_function (
const std::string&
name);
158 void clear_mex_functions (
void);
160 bool set_class_relationship (
const std::string& sup_class,
161 const std::string& inf_class);
163 bool is_superiorto (
const std::string& a,
const std::string& b);
165 void alias_built_in_function (
const std::string& alias,
166 const std::string&
name);
168 void install_built_in_dispatch (
const std::string&
name,
169 const std::string& klass);
171 std::list<std::string> user_function_names (
void);
173 std::list<std::string> built_in_function_names (
void);
175 std::list<std::string> cmdline_function_names (
void);
179 void add_to_parent_map (
const std::string& classname,
180 const std::list<std::string>& parent_list);
182 std::list<std::string> parent_classes (
const std::string& dispatch_type);
195 bool at_top_level_deprecated (
void);
207 std::list<std::string> global_variable_names_deprecated (
void);
210 std::list<std::string> top_level_variable_names_deprecated (
void);
213 std::list<std::string> variable_names_deprecated (
void);
216 void assign_deprecated (
const std::string&
name,
225 void clear_all_deprecated (
bool force =
false);
228 void clear_global_deprecated (
const std::string&
name);
231 void clear_global_pattern_deprecated (
const std::string& pattern);
234 void clear_symbol_deprecated (
const std::string&
name);
237 void clear_symbol_pattern_deprecated (
const std::string& pattern);
240 void global_assign_deprecated (
const std::string&
name,
244 void top_level_assign_deprecated (
const std::string&
name,
249#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
250 OCTAVE_DEPRECATED (6,
"use 'interpreter::at_top_level' instead")
251 bool at_top_level (
void)
253 return at_top_level_deprecated ();
256 OCTAVE_DEPRECATED (6,
"use 'interpreter::varval' instead")
259 return varval_deprecated (
name);
262 OCTAVE_DEPRECATED (6,
"use 'interpreter::global_varval' instead")
265 return global_varval_deprecated (
name);
268 OCTAVE_DEPRECATED (6,
"use 'interpreter::top_level_varval' instead")
271 return top_level_varval_deprecated (
name);
274 OCTAVE_DEPRECATED (6,
"use 'interpreter::global_variable_names' instead")
275 std::list<
std::
string> global_variable_names (
void)
277 return global_variable_names_deprecated ();
280 OCTAVE_DEPRECATED (6,
"use 'interpreter::top_level_variable_names' instead")
281 std::list<
std::
string> top_level_variable_names (
void)
283 return top_level_variable_names_deprecated ();
286 OCTAVE_DEPRECATED (6,
"use 'interpreter::variable_names' instead")
287 std::list<
std::
string> variable_names (
void)
289 return variable_names_deprecated ();
292 OCTAVE_DEPRECATED (6,
"use 'interpreter::assign' instead")
293 void assign (const
std::
string&
name,
296 assign_deprecated (
name, value);
300 OCTAVE_DEPRECATED (6,
"use 'interpreter::assign' instead")
304 assign_deprecated (
name, value);
307 OCTAVE_DEPRECATED (6,
"use 'interpreter::clear_all' instead")
308 void clear_all (
bool force = false)
310 clear_all_deprecated (force);
313 OCTAVE_DEPRECATED (6,
"use 'interpreter::clear_global' instead")
314 void clear_global (const
std::
string&
name)
316 clear_global_deprecated (
name);
319 OCTAVE_DEPRECATED (6,
"use 'interpreter::clear_global_pattern' instead")
320 void clear_global_pattern (const
std::
string& pattern)
322 clear_global_pattern_deprecated (pattern);
325 OCTAVE_DEPRECATED (6,
"use 'interpreter::clear_symbol' instead")
326 void clear_symbol (const
std::
string&
name)
328 clear_symbol_deprecated (
name);
331 OCTAVE_DEPRECATED (6,
"use 'interpreter::clear_symbol_pattern' instead")
332 void clear_symbol_pattern (const
std::
string& pattern)
334 clear_symbol_pattern_deprecated (pattern);
337 OCTAVE_DEPRECATED (6,
"use 'interpreter::global_assign' instead")
338 void global_assign (const
std::
string&
name,
341 global_assign_deprecated (
name, value);
344 OCTAVE_DEPRECATED (6,
"use 'interpreter::top_level_assign' instead")
345 void top_level_assign (const
std::
string&
name,
348 top_level_assign_deprecated (
name, value);
356 typedef std::map<std::string, octave_value>::const_iterator
358 typedef std::map<std::string, octave_value>::iterator
361 typedef std::map<std::string, fcn_info>::const_iterator
363 typedef std::map<std::string, fcn_info>::iterator
376 typedef std::map<std::string, std::set<std::string>>::const_iterator
378 typedef std::map<std::string, std::set<std::string>>::iterator
384 typedef std::map<std::string, std::list<std::string>>::const_iterator
386 typedef std::map<std::string, std::list<std::string>>::iterator
std::map< std::string, std::list< std::string > >::iterator parent_map_iterator
std::map< std::string, octave_value >::iterator global_symbols_iterator
octave::fcn_info fcn_info
std::map< std::string, std::list< std::string > > m_parent_map
std::map< std::string, octave_value >::const_iterator global_symbols_const_iterator
void assign_deprecated(const std::string &name, const octave_value &value, bool)
interpreter & m_interpreter
octave::symbol_scope scope
std::map< std::string, std::set< std::string > >::iterator class_precedence_table_iterator
std::map< std::string, std::set< std::string > >::const_iterator class_precedence_table_const_iterator
~symbol_table(void)=default
symbol_table(const symbol_table &)=delete
std::map< std::string, fcn_info > m_fcn_table
std::map< std::string, fcn_info >::const_iterator fcn_table_const_iterator
std::map< std::string, fcn_info >::iterator fcn_table_iterator
std::map< std::string, std::list< std::string > >::const_iterator const_parent_map_iterator
void install_builtins(void)
std::map< std::string, std::set< std::string > > m_class_precedence_table
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.