GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
symbol_scope_rep Class Reference

#include "symscope.h"

Inheritance diagram for symbol_scope_rep:

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_repdup () 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_valuelocalfunctions () 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_repparent_scope_rep () const
 
octave_valuepersistent_varref (std::size_t data_offset)
 
octave_value persistent_varval (std::size_t data_offset) const
 
std::shared_ptr< symbol_scope_repprimary_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_valuesubfunctions () const
 
std::list< symbol_recordsymbol_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_codeuser_code () const
 

Detailed Description

Definition at line 53 of file symscope.h.

Member Typedef Documentation

◆ subfunctions_const_iterator

typedef std::map<std::string, octave_value>::const_iterator symbol_scope_rep::subfunctions_const_iterator

Definition at line 64 of file symscope.h.

◆ subfunctions_iterator

typedef std::map<std::string, octave_value>::iterator symbol_scope_rep::subfunctions_iterator

Definition at line 66 of file symscope.h.

◆ table_const_iterator

typedef std::map<std::string, symbol_record>::const_iterator symbol_scope_rep::table_const_iterator

Definition at line 59 of file symscope.h.

◆ table_iterator

typedef std::map<std::string, symbol_record>::iterator symbol_scope_rep::table_iterator

Definition at line 61 of file symscope.h.

Constructor & Destructor Documentation

◆ symbol_scope_rep()

symbol_scope_rep::symbol_scope_rep ( const std::string &  name = "",
bool  add_ans = true 
)
inline

Definition at line 68 of file symscope.h.

References insert_local().

◆ ~symbol_scope_rep()

symbol_scope_rep::~symbol_scope_rep ( )
default

Member Function Documentation

◆ cache_dir_name()

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().

◆ cache_fcn_file_name()

void symbol_scope_rep::cache_fcn_file_name ( const std::string &  name)
inline

Definition at line 265 of file symscope.h.

References name().

◆ cache_fcn_name()

void symbol_scope_rep::cache_fcn_name ( const std::string &  name)
inline

Definition at line 253 of file symscope.h.

References name().

◆ cache_name()

void symbol_scope_rep::cache_name ( const std::string &  name)
inline

Definition at line 249 of file symscope.h.

References name().

◆ dir_name()

std::string symbol_scope_rep::dir_name ( ) const
inline

Definition at line 274 of file symscope.h.

◆ dump()

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().

◆ dump_symbols_map()

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().

◆ dup()

std::shared_ptr<symbol_scope_rep> symbol_scope_rep::dup ( void  ) const
inline

Definition at line 114 of file symscope.h.

◆ erase_subfunctions()

void symbol_scope_rep::erase_subfunctions ( )
inline

Definition at line 221 of file symscope.h.

◆ fcn_file_name()

std::string symbol_scope_rep::fcn_file_name ( ) const
inline

Definition at line 270 of file symscope.h.

◆ fcn_name()

std::string symbol_scope_rep::fcn_name ( ) const
inline

Definition at line 251 of file symscope.h.

◆ find_subfunction()

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().

◆ find_symbol()

symbol_record symbol_scope_rep::find_symbol ( const std::string &  name)
inline

Definition at line 151 of file symscope.h.

References insert(), and name().

◆ has_subfunctions()

bool symbol_scope_rep::has_subfunctions ( ) const
inline

Definition at line 228 of file symscope.h.

◆ insert()

symbol_record symbol_scope_rep::insert ( const std::string &  name)

◆ insert_local()

symbol_record symbol_scope_rep::insert_local ( const std::string &  name)

Definition at line 45 of file symscope.cc.

Referenced by symbol_scope_rep().

◆ insert_symbol_record()

void symbol_scope_rep::insert_symbol_record ( symbol_record sr)

◆ install_nestfunction()

void symbol_scope_rep::install_nestfunction ( const std::string &  name,
const octave_value fval,
const symbol_scope fcn_scope 
)
inline

Definition at line 192 of file symscope.h.

References name().

◆ install_subfunction()

void symbol_scope_rep::install_subfunction ( const std::string &  name,
const octave_value fval 
)
inline

Definition at line 186 of file symscope.h.

References name().

◆ is_nested()

bool symbol_scope_rep::is_nested ( ) const
inline

Definition at line 92 of file symscope.h.

Referenced by insert(), is_relative(), is_variable(), look_nonlocal(), and update_nest().

◆ is_parent()

bool symbol_scope_rep::is_parent ( ) const
inline

Definition at line 98 of file symscope.h.

◆ is_primary_fcn_scope()

bool symbol_scope_rep::is_primary_fcn_scope ( ) const
inline

Definition at line 278 of file symscope.h.

◆ is_relative()

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().

◆ is_static()

bool symbol_scope_rep::is_static ( ) const
inline

Definition at line 100 of file symscope.h.

◆ is_variable()

bool symbol_scope_rep::is_variable ( const std::string &  nm) const

Definition at line 295 of file symscope.cc.

References is_nested().

◆ localfunctions()

std::list< octave_value > symbol_scope_rep::localfunctions ( ) const

◆ lock_subfunctions()

void symbol_scope_rep::lock_subfunctions ( )
inline

Definition at line 203 of file symscope.h.

◆ look_nonlocal()

bool symbol_scope_rep::look_nonlocal ( const std::string &  name,
std::size_t  offset,
symbol_record result 
)

◆ lookup_symbol()

symbol_record symbol_scope_rep::lookup_symbol ( const std::string &  name) const
inline

Definition at line 161 of file symscope.h.

References name().

◆ mark_as_variable()

void symbol_scope_rep::mark_as_variable ( const std::string &  nm)

Definition at line 279 of file symscope.cc.

Referenced by mark_as_variables().

◆ 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().

◆ mark_primary_fcn_scope()

void symbol_scope_rep::mark_primary_fcn_scope ( )
inline

Definition at line 276 of file symscope.h.

◆ mark_static()

void symbol_scope_rep::mark_static ( )
inline

Definition at line 102 of file symscope.h.

◆ mark_subfunctions_in_scope_as_private()

void symbol_scope_rep::mark_subfunctions_in_scope_as_private ( const std::string &  class_name)

◆ name()

◆ nesting_depth()

std::size_t symbol_scope_rep::nesting_depth ( ) const
inline

Definition at line 94 of file symscope.h.

◆ num_symbols()

std::size_t symbol_scope_rep::num_symbols ( ) const
inline

Definition at line 84 of file symscope.h.

Referenced by insert(), and insert_symbol_record().

◆ parent_fcn_names()

std::list< std::string > symbol_scope_rep::parent_fcn_names ( ) const

Definition at line 205 of file symscope.cc.

References parent_scope_rep().

◆ parent_scope_rep()

std::shared_ptr<symbol_scope_rep> symbol_scope_rep::parent_scope_rep ( ) const
inline

Definition at line 104 of file symscope.h.

Referenced by parent_fcn_names().

◆ persistent_varref()

octave_value& symbol_scope_rep::persistent_varref ( std::size_t  data_offset)
inline

Definition at line 139 of file symscope.h.

◆ persistent_varval()

octave_value symbol_scope_rep::persistent_varval ( std::size_t  data_offset) const
inline

Definition at line 144 of file symscope.h.

References octave_value().

◆ primary_parent_scope_rep()

std::shared_ptr<symbol_scope_rep> symbol_scope_rep::primary_parent_scope_rep ( ) const
inline

Definition at line 109 of file symscope.h.

◆ rename()

void symbol_scope_rep::rename ( const std::string &  old_name,
const std::string &  new_name 
)
inline

Definition at line 170 of file symscope.h.

References symbol_record::rename().

◆ set_nesting_depth()

void symbol_scope_rep::set_nesting_depth ( std::size_t  depth)
inline

Definition at line 96 of file symscope.h.

◆ set_parent()

void symbol_scope_rep::set_parent ( const std::shared_ptr< symbol_scope_rep > &  parent)

Definition at line 222 of file symscope.cc.

◆ set_primary_parent()

void symbol_scope_rep::set_primary_parent ( const std::shared_ptr< symbol_scope_rep > &  parent)

Definition at line 228 of file symscope.cc.

◆ set_user_code()

void symbol_scope_rep::set_user_code ( octave_user_code code)
inline

Definition at line 259 of file symscope.h.

◆ stash_subfunction_names()

void symbol_scope_rep::stash_subfunction_names ( const std::list< std::string > &  names)
inline

Definition at line 233 of file symscope.h.

◆ subfunction_names()

std::list<std::string> symbol_scope_rep::subfunction_names ( ) const
inline

Definition at line 238 of file symscope.h.

◆ subfunctions()

std::map<std::string, octave_value> symbol_scope_rep::subfunctions ( ) const
inline

Definition at line 216 of file symscope.h.

◆ symbol_list()

std::list< symbol_record > symbol_scope_rep::symbol_list ( ) const

Definition at line 166 of file symscope.cc.

◆ symbols() [1/2]

std::map<std::string, symbol_record>& symbol_scope_rep::symbols ( )
inline

Definition at line 299 of file symscope.h.

◆ symbols() [2/2]

const std::map<std::string, symbol_record>& symbol_scope_rep::symbols ( ) const
inline

Definition at line 294 of file symscope.h.

◆ unlock_subfunctions()

void symbol_scope_rep::unlock_subfunctions ( )
inline

Definition at line 209 of file symscope.h.

◆ update_nest()

void symbol_scope_rep::update_nest ( )

Definition at line 315 of file symscope.cc.

References symbol_record::is_formal(), and is_nested().

◆ user_code()

octave_user_code* symbol_scope_rep::user_code ( ) const
inline

Definition at line 257 of file symscope.h.


The documentation for this class was generated from the following files: