#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 |
Public Member Functions | |
symbol_scope_rep (const std::string &name="", bool add_ans=true) | |
~symbol_scope_rep ()=default | |
void | cache_dir_name (const std::string &name) |
void | cache_fcn_file_name (const std::string &name) |
void | cache_fcn_name (const std::string &name) |
void | cache_name (const std::string &name) |
std::string | dir_name () const |
octave_value | dump () const |
octave_value | dump_symbols_map () const |
std::shared_ptr< symbol_scope_rep > | dup () const |
void | erase_subfunctions () |
std::string | fcn_file_name () const |
std::string | fcn_name () const |
octave_value | find_subfunction (const std::string &name) const |
symbol_record | find_symbol (const std::string &name) |
bool | has_subfunctions () const |
symbol_record | insert (const std::string &name) |
symbol_record | insert_local (const std::string &name) |
void | insert_symbol_record (symbol_record &sr) |
void | install_nestfunction (const std::string &name, const octave_value &fval, const symbol_scope &fcn_scope) |
void | install_subfunction (const std::string &name, const octave_value &fval) |
bool | is_nested () const |
bool | is_parent () const |
bool | is_primary_fcn_scope () const |
bool | is_relative (const std::shared_ptr< symbol_scope_rep > &scope) const |
bool | is_static () const |
bool | is_variable (const std::string &nm) const |
std::list< octave_value > | localfunctions () const |
void | lock_subfunctions () |
bool | look_nonlocal (const std::string &name, std::size_t offset, symbol_record &result) |
symbol_record | lookup_symbol (const std::string &name) const |
void | mark_as_variable (const std::string &nm) |
void | mark_as_variables (const std::list< std::string > &lst) |
void | mark_primary_fcn_scope () |
void | mark_static () |
void | mark_subfunctions_in_scope_as_private (const std::string &class_name) |
std::string | name () const |
std::size_t | nesting_depth () const |
std::size_t | num_symbols () const |
std::list< std::string > | parent_fcn_names () const |
std::shared_ptr< symbol_scope_rep > | parent_scope_rep () const |
octave_value & | persistent_varref (std::size_t data_offset) |
octave_value | persistent_varval (std::size_t data_offset) const |
std::shared_ptr< symbol_scope_rep > | primary_parent_scope_rep () const |
void | rename (const std::string &old_name, const std::string &new_name) |
void | set_nesting_depth (std::size_t depth) |
void | set_parent (const std::shared_ptr< symbol_scope_rep > &parent) |
void | set_primary_parent (const std::shared_ptr< symbol_scope_rep > &parent) |
void | set_user_code (octave_user_code *code) |
void | stash_subfunction_names (const std::list< std::string > &names) |
std::list< std::string > | subfunction_names () const |
std::map< std::string, octave_value > | subfunctions () const |
std::list< symbol_record > | symbol_list () const |
std::map< std::string, symbol_record > & | symbols () |
const std::map< std::string, symbol_record > & | symbols () const |
void | unlock_subfunctions () |
void | update_nest () |
octave_user_code * | user_code () const |
Definition at line 53 of file symscope.h.
typedef std::map<std::string, octave_value>::const_iterator symbol_scope_rep::subfunctions_const_iterator |
Definition at line 64 of file symscope.h.
typedef std::map<std::string, octave_value>::iterator symbol_scope_rep::subfunctions_iterator |
Definition at line 66 of file symscope.h.
typedef std::map<std::string, symbol_record>::const_iterator symbol_scope_rep::table_const_iterator |
Definition at line 59 of file symscope.h.
typedef std::map<std::string, symbol_record>::iterator symbol_scope_rep::table_iterator |
Definition at line 61 of file symscope.h.
|
inline |
Definition at line 68 of file symscope.h.
References insert_local().
|
default |
void symbol_scope_rep::cache_dir_name | ( | const std::string & | name | ) |
Definition at line 234 of file symscope.cc.
References octave::sys::canonicalize_file_name(), and name().
|
inline |
Definition at line 265 of file symscope.h.
References name().
|
inline |
Definition at line 253 of file symscope.h.
References name().
|
inline |
Definition at line 249 of file symscope.h.
References name().
|
inline |
Definition at line 274 of file symscope.h.
octave_value symbol_scope_rep::dump | ( | ) | const |
Definition at line 136 of file symscope.cc.
References dump_function_map(), dump_symbols_map(), m, and octave_value().
octave_value symbol_scope_rep::dump_symbols_map | ( | ) | const |
Definition at line 151 of file symscope.cc.
References symbol_record::dump(), and octave_value().
Referenced by dump().
|
inline |
Definition at line 114 of file symscope.h.
|
inline |
Definition at line 221 of file symscope.h.
|
inline |
Definition at line 270 of file symscope.h.
|
inline |
Definition at line 251 of file symscope.h.
octave_value symbol_scope_rep::find_subfunction | ( | const std::string & | name | ) | const |
Definition at line 177 of file symscope.cc.
References name(), and octave_value().
|
inline |
Definition at line 151 of file symscope.h.
|
inline |
Definition at line 228 of file symscope.h.
symbol_record symbol_scope_rep::insert | ( | const std::string & | name | ) |
Definition at line 66 of file symscope.cc.
References is_nested(), symbol_record::mark_added_static(), name(), num_symbols(), and symbol_record::set_data_offset().
Referenced by find_symbol().
symbol_record symbol_scope_rep::insert_local | ( | const std::string & | name | ) |
Definition at line 45 of file symscope.cc.
Referenced by symbol_scope_rep().
void symbol_scope_rep::insert_symbol_record | ( | symbol_record & | sr | ) |
Definition at line 55 of file symscope.cc.
References symbol_record::name(), name(), num_symbols(), and symbol_record::set_data_offset().
|
inline |
Definition at line 192 of file symscope.h.
References name().
|
inline |
Definition at line 186 of file symscope.h.
References name().
|
inline |
Definition at line 92 of file symscope.h.
Referenced by insert(), is_relative(), is_variable(), look_nonlocal(), and update_nest().
|
inline |
Definition at line 98 of file symscope.h.
|
inline |
Definition at line 278 of file symscope.h.
bool symbol_scope_rep::is_relative | ( | const std::shared_ptr< symbol_scope_rep > & | scope | ) | const |
Definition at line 240 of file symscope.cc.
References is_nested().
|
inline |
Definition at line 100 of file symscope.h.
bool symbol_scope_rep::is_variable | ( | const std::string & | nm | ) | const |
Definition at line 295 of file symscope.cc.
References is_nested().
std::list< octave_value > symbol_scope_rep::localfunctions | ( | ) | const |
Definition at line 98 of file symscope.cc.
References symbol_scope::parent_fcn_names(), octave_user_code::scope(), and octave_value::user_code_value().
|
inline |
Definition at line 203 of file symscope.h.
bool symbol_scope_rep::look_nonlocal | ( | const std::string & | name, |
std::size_t | offset, | ||
symbol_record & | result | ||
) |
Definition at line 347 of file symscope.cc.
References is_nested(), name(), symbol_record::set_data_offset(), and symbol_record::set_frame_offset().
|
inline |
Definition at line 161 of file symscope.h.
References name().
void symbol_scope_rep::mark_as_variable | ( | const std::string & | nm | ) |
Definition at line 279 of file symscope.cc.
Referenced by mark_as_variables().
void symbol_scope_rep::mark_as_variables | ( | const std::list< std::string > & | lst | ) |
Definition at line 288 of file symscope.cc.
References mark_as_variable().
|
inline |
Definition at line 276 of file symscope.h.
|
inline |
Definition at line 102 of file symscope.h.
void symbol_scope_rep::mark_subfunctions_in_scope_as_private | ( | const std::string & | class_name | ) |
Definition at line 193 of file symscope.cc.
References octave_base_value::function_value(), and octave_function::mark_as_private_function().
|
inline |
Definition at line 247 of file symscope.h.
Referenced by cache_dir_name(), cache_fcn_file_name(), cache_fcn_name(), cache_name(), find_subfunction(), find_symbol(), insert(), insert_symbol_record(), install_nestfunction(), install_subfunction(), look_nonlocal(), and lookup_symbol().
|
inline |
Definition at line 94 of file symscope.h.
|
inline |
Definition at line 84 of file symscope.h.
Referenced by insert(), and insert_symbol_record().
std::list< std::string > symbol_scope_rep::parent_fcn_names | ( | ) | const |
Definition at line 205 of file symscope.cc.
References parent_scope_rep().
|
inline |
Definition at line 104 of file symscope.h.
Referenced by parent_fcn_names().
|
inline |
Definition at line 139 of file symscope.h.
|
inline |
Definition at line 144 of file symscope.h.
References octave_value().
|
inline |
Definition at line 109 of file symscope.h.
|
inline |
Definition at line 170 of file symscope.h.
References symbol_record::rename().
|
inline |
Definition at line 96 of file symscope.h.
void symbol_scope_rep::set_parent | ( | const std::shared_ptr< symbol_scope_rep > & | parent | ) |
Definition at line 222 of file symscope.cc.
void symbol_scope_rep::set_primary_parent | ( | const std::shared_ptr< symbol_scope_rep > & | parent | ) |
Definition at line 228 of file symscope.cc.
|
inline |
Definition at line 259 of file symscope.h.
|
inline |
Definition at line 233 of file symscope.h.
|
inline |
Definition at line 238 of file symscope.h.
|
inline |
Definition at line 216 of file symscope.h.
std::list< symbol_record > symbol_scope_rep::symbol_list | ( | ) | const |
Definition at line 166 of file symscope.cc.
|
inline |
Definition at line 299 of file symscope.h.
|
inline |
Definition at line 294 of file symscope.h.
|
inline |
Definition at line 209 of file symscope.h.
void symbol_scope_rep::update_nest | ( | ) |
Definition at line 315 of file symscope.cc.
References symbol_record::is_formal(), and is_nested().
|
inline |
Definition at line 257 of file symscope.h.