#include "symscope.h"
Public Types | |
typedef std::map< std::string, octave_value >::const_iterator | subfunctions_const_iterator |
typedef std::map< std::string, octave_value >::iterator | subfunctions_iterator |
typedef std::map< std::string, symbol_record >::const_iterator | table_const_iterator |
typedef std::map< std::string, symbol_record >::iterator | table_iterator |
Private Attributes | |
std::vector< symbol_scope > | m_children |
Child nested functions. More... | |
symbol_record::context_id | m_context |
octave_user_function * | m_fcn |
The associated user code (may be null). More... | |
bool | m_is_nested |
If true, then this scope belongs to a nested function. More... | |
bool | m_is_static |
If true then no variables can be added. More... | |
std::string | m_name |
Name for this scope (usually the corresponding filename of the function corresponding to the scope). More... | |
std::weak_ptr< symbol_scope_rep > | m_parent |
Parent of nested function (may be null). More... | |
std::list< std::string > | m_subfunction_names |
The list of subfunctions (if any) in the order they appear in the function file. More... | |
std::map< std::string, octave_value > | m_subfunctions |
Map from symbol names to subfunctions. More... | |
std::map< std::string, symbol_record > | m_symbols |
Map from symbol names to symbol info. More... | |
Definition at line 52 of file symscope.h.
typedef std::map<std::string, octave_value>::const_iterator octave::symbol_scope_rep::subfunctions_const_iterator |
Definition at line 63 of file symscope.h.
typedef std::map<std::string, octave_value>::iterator octave::symbol_scope_rep::subfunctions_iterator |
Definition at line 65 of file symscope.h.
typedef std::map<std::string, symbol_record>::const_iterator octave::symbol_scope_rep::table_const_iterator |
Definition at line 58 of file symscope.h.
typedef std::map<std::string, symbol_record>::iterator octave::symbol_scope_rep::table_iterator |
Definition at line 60 of file symscope.h.
|
inline |
Definition at line 67 of file symscope.h.
Referenced by dup().
|
delete |
|
default |
|
inline |
Definition at line 383 of file symscope.h.
References octave::symbol_record::is_defined(), m_context, m_symbols, retval, and octave::symbol_record::storage_class().
|
inline |
Definition at line 196 of file symscope.h.
References octave::symbol_record::assign(), insert(), m_context, m_symbols, name(), p, and value.
Referenced by assign().
|
inline |
Definition at line 211 of file symscope.h.
void octave::symbol_scope_rep::bind_script_symbols | ( | const std::shared_ptr< symbol_scope_rep > & | curr_scope | ) |
Definition at line 229 of file symscope.cc.
|
inline |
Definition at line 539 of file symscope.h.
|
inline |
Definition at line 293 of file symscope.h.
References m_context, m_symbols, val, and octave::symbol_record::varval().
|
inline |
Definition at line 304 of file symscope.h.
References m_context, m_is_nested, m_symbols, name(), p, and parent_scope_rep().
|
inline |
Definition at line 319 of file symscope.h.
References octave::symbol_record::clear(), octave::symbol_record::is_defined(), octave::symbol_record::is_global(), m_context, m_is_nested, m_symbols, octave::symbol_record::name(), parent_scope_rep(), and pattern().
|
inline |
Definition at line 343 of file symscope.h.
References octave::symbol_record::clear(), octave::symbol_record::is_defined(), octave::symbol_record::is_global(), m_context, m_is_nested, m_symbols, octave::symbol_record::name(), parent_scope_rep(), and pattern().
|
inline |
Definition at line 287 of file symscope.h.
|
inline |
Definition at line 117 of file symscope.h.
References m_context.
octave_value octave::symbol_scope_rep::dump | ( | void | ) | const |
Definition at line 113 of file symscope.cc.
References octave::dump_function_map(), dump_symbols_map(), m_name, m_subfunctions, and octave_value().
octave_value octave::symbol_scope_rep::dump_symbols_map | ( | void | ) | const |
Definition at line 124 of file symscope.cc.
References octave::symbol_record::dump(), m_context, m_symbols, nm, octave_value(), and string.
Referenced by dump().
|
inline |
Definition at line 99 of file symscope.h.
References m_name, m_parent, m_symbols, and symbol_scope_rep().
|
inline |
Definition at line 513 of file symscope.h.
References m_subfunctions.
octave_value octave::symbol_scope_rep::find | ( | const std::string & | name, |
const octave_value_list & | args, | ||
bool | skip_variables, | ||
bool | local_funcs | ||
) |
Definition at line 43 of file symscope.cc.
References octave::__get_symbol_table__(), fcn, octave::symbol_table::fcn_table_find(), find_subfunction(), octave::symbol_table::global_varval(), octave_function::is_defined(), octave::symbol_record::is_global(), m_context, m_symbols, name(), p, val, and octave::symbol_record::varval().
octave_value octave::symbol_scope_rep::find_subfunction | ( | const std::string & | name | ) | const |
Definition at line 139 of file symscope.cc.
References m_parent, m_subfunctions, name(), octave_value(), and p.
Referenced by find().
|
inline |
|
inline |
Definition at line 217 of file symscope.h.
References octave::symbol_record::assign(), insert(), m_context, m_symbols, name(), p, and value.
|
inline |
Definition at line 541 of file symscope.h.
References m_fcn.
|
inline |
Definition at line 403 of file symscope.h.
References octave::symbol_record::is_variable(), m_context, m_symbols, glob_match::match(), pattern(), and retval.
|
inline |
Definition at line 520 of file symscope.h.
References m_subfunction_names.
|
inline |
Definition at line 158 of file symscope.h.
References inherit_internal(), and parent_scope_rep().
|
inline |
Definition at line 133 of file symscope.h.
References octave::symbol_record::assign(), octave::symbol_record::is_automatic(), octave::symbol_record::is_formal(), m_context, m_symbols, octave::symbol_record::mark_inherited(), octave::symbol_record::name(), nm, string, and val.
Referenced by inherit().
symbol_record & octave::symbol_scope_rep::insert | ( | const std::string & | name, |
bool | force_add = false |
||
) |
Definition at line 88 of file symscope.cc.
References m_is_nested, m_is_static, m_parent, m_symbols, octave::symbol_record::mark_added_static(), name(), and p.
Referenced by assign(), find_symbol(), force_assign(), mark_automatic(), mark_global(), and mark_hidden().
|
inline |
Definition at line 81 of file symscope.h.
References m_symbols, and octave::symbol_record::name().
|
inline |
Definition at line 485 of file symscope.h.
References m_children, m_subfunctions, and name().
|
inline |
Definition at line 479 of file symscope.h.
References m_subfunctions, and name().
|
inline |
Definition at line 472 of file symscope.h.
|
inline |
|
inline |
Definition at line 86 of file symscope.h.
References m_is_nested.
|
inline |
Definition at line 90 of file symscope.h.
References m_is_static.
|
inline |
Definition at line 239 of file symscope.h.
References octave::symbol_record::is_variable(), m_context, m_symbols, name(), p, and retval.
|
inline |
Definition at line 496 of file symscope.h.
References m_subfunctions.
bool octave::symbol_scope_rep::look_nonlocal | ( | const std::string & | name, |
symbol_record & | result | ||
) |
Definition at line 207 of file symscope.cc.
References m_is_nested, m_parent, m_symbols, name(), p, and result.
|
inline |
Definition at line 367 of file symscope.h.
References insert(), octave::symbol_record::mark_automatic(), and name().
|
inline |
Definition at line 377 of file symscope.h.
References insert(), octave::symbol_record::mark_global(), and name().
|
inline |
Definition at line 372 of file symscope.h.
References insert(), octave::symbol_record::mark_hidden(), and name().
|
inline |
Definition at line 88 of file symscope.h.
References m_is_nested.
|
inline |
Definition at line 92 of file symscope.h.
References m_is_static.
void octave::symbol_scope_rep::mark_subfunctions_in_scope_as_private | ( | const std::string & | class_name | ) |
Definition at line 155 of file symscope.cc.
References fcn, octave_base_value::function_value(), m_subfunctions, and octave_function::mark_as_private_function().
|
inline |
Definition at line 537 of file symscope.h.
References m_name.
Referenced by assign(), cache_name(), clear_variable(), find(), find_subfunction(), find_symbol(), force_assign(), insert(), install_nestfunction(), install_subfunction(), is_global(), is_local_variable(), is_variable(), look_nonlocal(), mark_automatic(), mark_global(), mark_hidden(), and varval().
|
delete |
|
inline |
Definition at line 94 of file symscope.h.
References m_parent.
Referenced by clear_variable(), clear_variable_pattern(), clear_variable_regexp(), and inherit().
|
inline |
Definition at line 261 of file symscope.h.
References m_symbols.
|
inline |
Definition at line 255 of file symscope.h.
References m_symbols.
|
inline |
Definition at line 274 of file symscope.h.
References octave::symbol_record::clear(), octave::symbol_record::is_forwarded(), octave::symbol_record::is_global(), octave::symbol_record::is_persistent(), m_context, m_symbols, and octave::symbol_record::unbind_global_rep().
|
inline |
Definition at line 426 of file symscope.h.
References octave::regexp::is_match(), octave::symbol_record::is_variable(), m_context, m_symbols, pattern(), and retval.
|
inline |
Definition at line 180 of file symscope.h.
References m_symbols, p, and octave::symbol_record::rename().
|
inline |
Definition at line 112 of file symscope.h.
References octave::context, and m_context.
|
inline |
Definition at line 543 of file symscope.h.
void octave::symbol_scope_rep::set_parent | ( | const std::shared_ptr< symbol_scope_rep > & | parent | ) |
Definition at line 167 of file symscope.cc.
References m_parent.
|
inline |
Definition at line 525 of file symscope.h.
References m_subfunction_names.
|
inline |
Definition at line 530 of file symscope.h.
References m_subfunction_names.
|
inline |
Definition at line 508 of file symscope.h.
References m_subfunctions.
void octave::symbol_scope_rep::unbind_script_symbols | ( | void | ) |
Definition at line 237 of file symscope.cc.
References m_symbols.
|
inline |
Definition at line 502 of file symscope.h.
References m_subfunctions.
void octave::symbol_scope_rep::update_nest | ( | void | ) |
Definition at line 173 of file symscope.cc.
References error(), octave::symbol_record::is_formal(), octave::symbol_record::is_global(), octave::symbol_record::is_persistent(), m_children, m_is_nested, m_is_static, m_parent, and m_symbols.
|
inline |
Definition at line 448 of file symscope.h.
References m_context, m_symbols, retval, and octave_value::sort().
|
inline |
Definition at line 231 of file symscope.h.
References m_context, m_symbols, name(), octave_value(), and p.
|
private |
Child nested functions.
Definition at line 587 of file symscope.h.
Referenced by install_nestfunction(), and update_nest().
|
private |
Definition at line 597 of file symscope.h.
Referenced by all_variables(), assign(), clear_objects(), clear_variable(), clear_variable_pattern(), clear_variable_regexp(), clear_variables(), current_context(), dump_symbols_map(), find(), force_assign(), glob(), inherit_internal(), is_local_variable(), is_variable(), refresh(), regexp(), set_context(), variable_names(), and varval().
|
private |
The associated user code (may be null).
Definition at line 579 of file symscope.h.
Referenced by function(), and set_function().
|
private |
If true, then this scope belongs to a nested function.
Definition at line 591 of file symscope.h.
Referenced by clear_variable(), clear_variable_pattern(), clear_variable_regexp(), insert(), is_nested(), look_nonlocal(), mark_nested(), and update_nest().
|
private |
If true then no variables can be added.
Definition at line 595 of file symscope.h.
Referenced by insert(), is_static(), mark_static(), and update_nest().
|
private |
Name for this scope (usually the corresponding filename of the function corresponding to the scope).
Definition at line 562 of file symscope.h.
Referenced by cache_name(), dump(), dup(), and name().
|
private |
Parent of nested function (may be null).
Definition at line 583 of file symscope.h.
Referenced by dup(), find_subfunction(), insert(), look_nonlocal(), parent_scope_rep(), set_parent(), and update_nest().
|
private |
The list of subfunctions (if any) in the order they appear in the function file.
Definition at line 575 of file symscope.h.
Referenced by has_subfunctions(), stash_subfunction_names(), and subfunction_names().
|
private |
Map from symbol names to subfunctions.
Definition at line 570 of file symscope.h.
Referenced by dump(), erase_subfunctions(), find_subfunction(), install_nestfunction(), install_subfunction(), lock_subfunctions(), mark_subfunctions_in_scope_as_private(), subfunctions(), and unlock_subfunctions().
|
private |
Map from symbol names to symbol info.
Definition at line 566 of file symscope.h.
Referenced by all_variables(), assign(), clear_objects(), clear_variable(), clear_variable_pattern(), clear_variable_regexp(), clear_variables(), dump_symbols_map(), dup(), find(), find_symbol(), force_assign(), glob(), inherit_internal(), insert(), insert_symbol_record(), is_global(), is_local_variable(), is_variable(), look_nonlocal(), pop_context(), push_context(), refresh(), regexp(), rename(), unbind_script_symbols(), update_nest(), variable_names(), and varval().