GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::base_value_stack_frame Class Referenceabstract
Inheritance diagram for octave::base_value_stack_frame:
Collaboration diagram for octave::base_value_stack_frame:

Public Types

enum  auto_var_type {
  ARG_NAMES , IGNORED , NARGIN , NARGOUT ,
  SAVED_WARNING_STATES , NUM_AUTO_VARS
}
 
typedef std::map< std::string, octave_valuelocal_vars_map
 
enum  scope_flags { LOCAL , GLOBAL , PERSISTENT }
 

Public Member Functions

 base_value_stack_frame (const base_value_stack_frame &elt)=default
 
 base_value_stack_frame (tree_evaluator &tw, size_t num_symbols, size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link, const std::shared_ptr< stack_frame > &access_link)
 
 base_value_stack_frame (void)=delete
 
 ~base_value_stack_frame (void)=default
 
virtual void accept (stack_frame_walker &sfw)=0
 
std::shared_ptr< stack_frameaccess_link (void) const
 
symbol_info_list all_variables (void)
 
void assign (const std::string &name, const octave_value &val)
 
void assign (const symbol_record &sym, const octave_value &val)
 
void assign (octave_value::assign_op op, const symbol_record &sym, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
 
void clear (const symbol_record &sym)
 
void clear_objects (void)
 
virtual void clear_values (void)
 
void clear_variable (const std::string &name)
 
void clear_variable_pattern (const std::string &pattern)
 
void clear_variable_pattern (const string_vector &patterns)
 
void clear_variable_regexp (const std::string &pattern)
 
void clear_variable_regexp (const string_vector &patterns)
 
void clear_variables (void)
 
void column (int c)
 
int column (void) const
 
void display (bool follow=true) const
 
void display_stopped_in_message (std::ostream &os) const
 
void do_non_const_unary_op (octave_value::unary_op op, const symbol_record &sym, const std::string &type, const std::list< octave_value_list > &idx)
 
std::string fcn_file_name (void) const
 
std::string fcn_name (bool print_subfn=true) const
 
octave_value find_subfunction (const std::string &name) const
 
virtual octave_functionfunction (void) const
 
octave_value get_auto_fcn_var (auto_var_type avt) const
 
std::string get_dispatch_class (void) const
 
virtual symbol_scope get_scope (void) const =0
 
stack_frame::scope_flags get_scope_flag (size_t data_offset) const
 
symbol_info_list get_symbol_info (void)
 
symbol_info_list glob_symbol_info (const std::string &pattern)
 
size_t index (void) const
 
virtual symbol_record insert_symbol (const std::string &)=0
 
void install_variable (const std::string &name, const octave_value &value, bool global)
 
void install_variable (const symbol_record &sym, const octave_value &value, bool global)
 
virtual bool is_compiled_fcn_frame (void) const
 
bool is_defined (const symbol_record &sym) const
 
bool is_global (const std::string &name) const
 
bool is_global (const symbol_record &sym) const
 
bool is_local_variable (const std::string &name) const
 
bool is_object (const std::string &name) const
 
bool is_object (const symbol_record &sym) const
 
bool is_persistent (const std::string &name) const
 
bool is_persistent (const symbol_record &sym) const
 
virtual bool is_scope_frame (void) const
 
virtual bool is_user_fcn_frame (void) const
 
virtual bool is_user_script_frame (void) const
 
bool is_variable (const std::string &name) const
 
bool is_variable (const symbol_record &sym) const
 
void line (int l)
 
int line (void) const
 
virtual symbol_record lookup_symbol (const std::string &) const =0
 
void make_global (const symbol_record &sym)
 
void make_persistent (const symbol_record &sym)
 
symbol_info_list make_symbol_info_list (const std::list< symbol_record > &symrec_list) const
 
void mark_global (const symbol_record &sym)
 
void mark_persistent (const symbol_record &sym)
 
virtual void mark_scope (const symbol_record &, scope_flags)=0
 
base_value_stack_frameoperator= (const base_value_stack_frame &elt)=delete
 
std::shared_ptr< stack_frameparent_link (void) const
 
symbol_info_list regexp_symbol_info (const std::string &pattern)
 
void resize (size_t size)
 
virtual scope_flags scope_flag (const symbol_record &) const =0
 
void set_auto_fcn_var (auto_var_type avt, const octave_value &val)
 
void set_dispatch_class (const std::string &class_name)
 
void set_scope_flag (size_t data_offset, scope_flags flag)
 
size_t size (void) const
 
std::shared_ptr< stack_framestatic_link (void) const
 
void unmark_global (const symbol_record &sym)
 
void unmark_persistent (const symbol_record &sym)
 
virtual unwind_protectunwind_protect_frame (void)
 
octave_value value (const symbol_record &sym, const std::string &type, const std::list< octave_value_list > &idx) const
 
std::list< std::string > variable_names (void) const
 
virtual octave_valuevarref (const symbol_record &sym)=0
 
virtual octave_valuevarref (const symbol_record &sym)=0
 
virtual octave_valuevarref (size_t data_offset)
 
octave_valuevarref (size_t data_offset)
 
octave_value varval (const std::string &name) const
 
octave_value varval (const std::string &name) const
 
virtual octave_value varval (const symbol_record &sym) const =0
 
virtual octave_value varval (const symbol_record &sym) const=0
 
virtual octave_value varval (size_t data_offset) const
 
octave_value varval (size_t data_offset) const
 
octave_value who (const string_vector &patterns, bool have_regexp, bool return_list, bool verbose, const std::string &whos_line_fmt, const std::string &msg)
 
octave_value workspace (void)
 

Static Public Member Functions

static stack_framecreate (tree_evaluator &tw, const symbol_scope &scope, size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link)
 
static stack_framecreate (tree_evaluator &tw, octave_function *fcn, size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link)
 
static stack_framecreate (tree_evaluator &tw, octave_user_function *fcn, size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link, const local_vars_map &local_vars)
 
static stack_framecreate (tree_evaluator &tw, octave_user_function *fcn, size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link, const std::shared_ptr< stack_frame > &access_link=std::shared_ptr< stack_frame >())
 
static stack_framecreate (tree_evaluator &tw, octave_user_script *script, size_t index, const std::shared_ptr< stack_frame > &parent_link, const std::shared_ptr< stack_frame > &static_link)
 

Protected Attributes

std::shared_ptr< stack_framem_access_link
 
std::vector< octave_valuem_auto_vars
 
int m_column
 
std::string m_dispatch_class
 
tree_evaluatorm_evaluator
 
std::vector< scope_flagsm_flags
 
size_t m_index
 
int m_line
 
std::shared_ptr< stack_framem_parent_link
 
std::shared_ptr< stack_framem_static_link
 
std::vector< octave_valuem_values
 

Detailed Description

Definition at line 286 of file stack-frame.cc.

Member Typedef Documentation

◆ local_vars_map

typedef std::map<std::string, octave_value> octave::stack_frame::local_vars_map
inherited

Definition at line 112 of file stack-frame.h.

Member Enumeration Documentation

◆ auto_var_type

Enumerator
ARG_NAMES 
IGNORED 
NARGIN 
NARGOUT 
SAVED_WARNING_STATES 
NUM_AUTO_VARS 

Definition at line 130 of file stack-frame.h.

◆ scope_flags

Enumerator
LOCAL 
GLOBAL 
PERSISTENT 

Definition at line 120 of file stack-frame.h.

Constructor & Destructor Documentation

◆ base_value_stack_frame() [1/3]

octave::base_value_stack_frame::base_value_stack_frame ( void  )
delete

◆ base_value_stack_frame() [2/3]

octave::base_value_stack_frame::base_value_stack_frame ( tree_evaluator tw,
size_t  num_symbols,
size_t  index,
const std::shared_ptr< stack_frame > &  parent_link,
const std::shared_ptr< stack_frame > &  static_link,
const std::shared_ptr< stack_frame > &  access_link 
)
inline

Definition at line 292 of file stack-frame.cc.

◆ base_value_stack_frame() [3/3]

octave::base_value_stack_frame::base_value_stack_frame ( const base_value_stack_frame elt)
default

◆ ~base_value_stack_frame()

octave::base_value_stack_frame::~base_value_stack_frame ( void  )
default

Member Function Documentation

◆ accept()

◆ access_link()

◆ all_variables()

symbol_info_list octave::stack_frame::all_variables ( void  )
inherited

◆ assign() [1/3]

void octave::stack_frame::assign ( const std::string &  name,
const octave_value val 
)
inlineinherited

◆ assign() [2/3]

◆ assign() [3/3]

void octave::stack_frame::assign ( octave_value::assign_op  op,
const symbol_record sym,
const std::string &  type,
const std::list< octave_value_list > &  idx,
const octave_value rhs 
)
inlineinherited

◆ clear()

◆ clear_objects()

void octave::stack_frame::clear_objects ( void  )
inherited

Definition at line 1333 of file stack-frame.cc.

References octave::stack_frame::accept().

◆ clear_values()

void octave::stack_frame::clear_values ( void  )
virtualinherited

Reimplemented in octave::user_fcn_stack_frame.

Definition at line 1081 of file stack-frame.cc.

References warning().

◆ clear_variable()

void octave::stack_frame::clear_variable ( const std::string &  name)
inherited

Definition at line 1340 of file stack-frame.cc.

References octave::stack_frame::accept(), and name.

◆ clear_variable_pattern() [1/2]

void octave::stack_frame::clear_variable_pattern ( const std::string &  pattern)
inherited

Definition at line 1347 of file stack-frame.cc.

References octave::stack_frame::accept().

◆ clear_variable_pattern() [2/2]

void octave::stack_frame::clear_variable_pattern ( const string_vector patterns)
inherited

Definition at line 1354 of file stack-frame.cc.

References octave::stack_frame::accept().

◆ clear_variable_regexp() [1/2]

void octave::stack_frame::clear_variable_regexp ( const std::string &  pattern)
inherited

Definition at line 1361 of file stack-frame.cc.

References octave::stack_frame::accept().

◆ clear_variable_regexp() [2/2]

void octave::stack_frame::clear_variable_regexp ( const string_vector patterns)
inherited

Definition at line 1368 of file stack-frame.cc.

References octave::stack_frame::accept().

◆ clear_variables()

void octave::stack_frame::clear_variables ( void  )
inherited

Definition at line 1375 of file stack-frame.cc.

References octave::stack_frame::accept().

◆ column() [1/2]

void octave::stack_frame::column ( int  c)
inlineinherited

Definition at line 205 of file stack-frame.h.

References octave::stack_frame::m_column.

◆ column() [2/2]

int octave::stack_frame::column ( void  ) const
inlineinherited

Definition at line 206 of file stack-frame.h.

References octave::stack_frame::m_column.

◆ create() [1/5]

stack_frame * octave::stack_frame::create ( tree_evaluator tw,
const symbol_scope scope,
size_t  index,
const std::shared_ptr< stack_frame > &  parent_link,
const std::shared_ptr< stack_frame > &  static_link 
)
staticinherited

◆ create() [2/5]

stack_frame * octave::stack_frame::create ( tree_evaluator tw,
octave_function fcn,
size_t  index,
const std::shared_ptr< stack_frame > &  parent_link,
const std::shared_ptr< stack_frame > &  static_link 
)
staticinherited

◆ create() [3/5]

stack_frame * octave::stack_frame::create ( tree_evaluator tw,
octave_user_function fcn,
size_t  index,
const std::shared_ptr< stack_frame > &  parent_link,
const std::shared_ptr< stack_frame > &  static_link,
const local_vars_map local_vars 
)
staticinherited

◆ create() [4/5]

stack_frame * octave::stack_frame::create ( tree_evaluator tw,
octave_user_function fcn,
size_t  index,
const std::shared_ptr< stack_frame > &  parent_link,
const std::shared_ptr< stack_frame > &  static_link,
const std::shared_ptr< stack_frame > &  access_link = std::shared_ptr<stack_frame> () 
)
staticinherited

◆ create() [5/5]

stack_frame * octave::stack_frame::create ( tree_evaluator tw,
octave_user_script script,
size_t  index,
const std::shared_ptr< stack_frame > &  parent_link,
const std::shared_ptr< stack_frame > &  static_link 
)
staticinherited

◆ display()

void octave::base_value_stack_frame::display ( bool  follow = true) const
virtual

◆ display_stopped_in_message()

void octave::stack_frame::display_stopped_in_message ( std::ostream &  os) const
inherited

◆ do_non_const_unary_op()

void octave::stack_frame::do_non_const_unary_op ( octave_value::unary_op  op,
const symbol_record sym,
const std::string &  type,
const std::list< octave_value_list > &  idx 
)
inlineinherited

◆ fcn_file_name()

std::string octave::stack_frame::fcn_file_name ( void  ) const
inlineinherited

◆ fcn_name()

std::string octave::stack_frame::fcn_name ( bool  print_subfn = true) const
inlineinherited

◆ find_subfunction()

octave_value octave::stack_frame::find_subfunction ( const std::string &  name) const
inlineinherited

◆ function()

virtual octave_function* octave::stack_frame::function ( void  ) const
inlinevirtualinherited

◆ get_auto_fcn_var()

octave_value octave::base_value_stack_frame::get_auto_fcn_var ( auto_var_type  avt) const
inlinevirtual

Implements octave::stack_frame.

Definition at line 331 of file stack-frame.cc.

References m_auto_vars.

◆ get_dispatch_class()

std::string octave::stack_frame::get_dispatch_class ( void  ) const
inlineinherited

Definition at line 538 of file stack-frame.h.

References octave::stack_frame::m_dispatch_class.

◆ get_scope()

◆ get_scope_flag()

stack_frame::scope_flags octave::base_value_stack_frame::get_scope_flag ( size_t  data_offset) const
inlinevirtual

◆ get_symbol_info()

symbol_info_list octave::stack_frame::get_symbol_info ( void  )
inlineinherited

Definition at line 271 of file stack-frame.h.

References octave::stack_frame::all_variables().

◆ glob_symbol_info()

symbol_info_list octave::stack_frame::glob_symbol_info ( const std::string &  pattern)
inherited

◆ index()

size_t octave::stack_frame::index ( void  ) const
inlineinherited

◆ insert_symbol()

virtual symbol_record octave::stack_frame::insert_symbol ( const std::string &  )
pure virtualinherited

◆ install_variable() [1/2]

void octave::stack_frame::install_variable ( const std::string &  name,
const octave_value value,
bool  global 
)
inlineinherited

◆ install_variable() [2/2]

◆ is_compiled_fcn_frame()

virtual bool octave::stack_frame::is_compiled_fcn_frame ( void  ) const
inlinevirtualinherited

Reimplemented in octave::compiled_fcn_stack_frame.

Definition at line 193 of file stack-frame.h.

◆ is_defined()

bool octave::stack_frame::is_defined ( const symbol_record sym) const
inlineinherited

Definition at line 341 of file stack-frame.h.

References octave::stack_frame::varval().

Referenced by octave::symbol_info_accumulator::filter().

◆ is_global() [1/2]

bool octave::stack_frame::is_global ( const std::string &  name) const
inlineinherited

◆ is_global() [2/2]

◆ is_local_variable()

bool octave::stack_frame::is_local_variable ( const std::string &  name) const
inlineinherited

◆ is_object() [1/2]

bool octave::stack_frame::is_object ( const std::string &  name) const
inlineinherited

◆ is_object() [2/2]

bool octave::stack_frame::is_object ( const symbol_record sym) const
inlineinherited

◆ is_persistent() [1/2]

bool octave::stack_frame::is_persistent ( const std::string &  name) const
inlineinherited

◆ is_persistent() [2/2]

◆ is_scope_frame()

virtual bool octave::stack_frame::is_scope_frame ( void  ) const
inlinevirtualinherited

Reimplemented in octave::scope_stack_frame.

Definition at line 196 of file stack-frame.h.

◆ is_user_fcn_frame()

virtual bool octave::stack_frame::is_user_fcn_frame ( void  ) const
inlinevirtualinherited

Reimplemented in octave::user_fcn_stack_frame.

Definition at line 195 of file stack-frame.h.

◆ is_user_script_frame()

virtual bool octave::stack_frame::is_user_script_frame ( void  ) const
inlinevirtualinherited

Reimplemented in octave::script_stack_frame.

Definition at line 194 of file stack-frame.h.

◆ is_variable() [1/2]

bool octave::stack_frame::is_variable ( const std::string &  name) const
inlineinherited

◆ is_variable() [2/2]

bool octave::stack_frame::is_variable ( const symbol_record sym) const
inlineinherited

◆ line() [1/2]

void octave::stack_frame::line ( int  l)
inlineinherited

Definition at line 202 of file stack-frame.h.

References octave::stack_frame::m_line.

◆ line() [2/2]

int octave::stack_frame::line ( void  ) const
inlineinherited

◆ lookup_symbol()

◆ make_global()

void octave::stack_frame::make_global ( const symbol_record sym)
inlineinherited

◆ make_persistent()

◆ make_symbol_info_list()

◆ mark_global()

void octave::stack_frame::mark_global ( const symbol_record sym)
inlineinherited

◆ mark_persistent()

void octave::stack_frame::mark_persistent ( const symbol_record sym)
inlineinherited

◆ mark_scope()

◆ operator=()

base_value_stack_frame& octave::base_value_stack_frame::operator= ( const base_value_stack_frame elt)
delete

◆ parent_link()

std::shared_ptr<stack_frame> octave::stack_frame::parent_link ( void  ) const
inlineinherited

Definition at line 309 of file stack-frame.h.

References octave::stack_frame::m_parent_link.

Referenced by octave::stack_frame::create().

◆ regexp_symbol_info()

symbol_info_list octave::stack_frame::regexp_symbol_info ( const std::string &  pattern)
inherited

◆ resize()

void octave::base_value_stack_frame::resize ( size_t  size)
inlinevirtual

◆ scope_flag()

◆ set_auto_fcn_var()

void octave::base_value_stack_frame::set_auto_fcn_var ( auto_var_type  avt,
const octave_value val 
)
inlinevirtual

Implements octave::stack_frame.

Definition at line 336 of file stack-frame.cc.

References m_auto_vars.

◆ set_dispatch_class()

void octave::stack_frame::set_dispatch_class ( const std::string &  class_name)
inlineinherited

Definition at line 540 of file stack-frame.h.

References octave::stack_frame::m_dispatch_class.

◆ set_scope_flag()

void octave::base_value_stack_frame::set_scope_flag ( size_t  data_offset,
scope_flags  flag 
)
inlinevirtual

Reimplemented from octave::stack_frame.

Definition at line 326 of file stack-frame.cc.

References m_flags.

Referenced by octave::user_fcn_stack_frame::mark_scope(), and octave::scope_stack_frame::mark_scope().

◆ size()

◆ static_link()

◆ unmark_global()

void octave::stack_frame::unmark_global ( const symbol_record sym)
inlineinherited

◆ unmark_persistent()

void octave::stack_frame::unmark_persistent ( const symbol_record sym)
inlineinherited

◆ unwind_protect_frame()

virtual unwind_protect* octave::stack_frame::unwind_protect_frame ( void  )
inlinevirtualinherited

Reimplemented in octave::user_fcn_stack_frame, and octave::script_stack_frame.

Definition at line 243 of file stack-frame.h.

◆ value()

octave_value octave::stack_frame::value ( const symbol_record sym,
const std::string &  type,
const std::list< octave_value_list > &  idx 
) const
inlineinherited

◆ variable_names()

std::list< std::string > octave::stack_frame::variable_names ( void  ) const
inherited

◆ varref() [1/4]

virtual octave_value& octave::stack_frame::varref

◆ varref() [2/4]

◆ varref() [3/4]

octave_value & octave::stack_frame::varref

Definition at line 441 of file stack-frame.cc.

◆ varref() [4/4]

octave_value& octave::base_value_stack_frame::varref ( size_t  data_offset)
inlinevirtual

Reimplemented from octave::stack_frame.

Definition at line 352 of file stack-frame.cc.

References m_values.

◆ varval() [1/6]

octave_value octave::stack_frame::varval
inline

Definition at line 432 of file stack-frame.h.

◆ varval() [2/6]

octave_value octave::stack_frame::varval ( const std::string &  name) const
inlineinherited

◆ varval() [3/6]

◆ varval() [4/6]

virtual octave_value octave::stack_frame::varval

Referenced by display().

◆ varval() [5/6]

octave_value octave::stack_frame::varval

Definition at line 430 of file stack-frame.cc.

◆ varval() [6/6]

octave_value octave::base_value_stack_frame::varval ( size_t  data_offset) const
inlinevirtual

Reimplemented from octave::stack_frame.

Definition at line 347 of file stack-frame.cc.

References m_values.

◆ who()

octave_value octave::stack_frame::who ( const string_vector patterns,
bool  have_regexp,
bool  return_list,
bool  verbose,
const std::string &  whos_line_fmt,
const std::string &  msg 
)
inherited

◆ workspace()

Member Data Documentation

◆ m_access_link

◆ m_auto_vars

std::vector<octave_value> octave::base_value_stack_frame::m_auto_vars
protected

Definition at line 378 of file stack-frame.cc.

Referenced by get_auto_fcn_var(), and set_auto_fcn_var().

◆ m_column

int octave::stack_frame::m_column
protectedinherited

Definition at line 563 of file stack-frame.h.

Referenced by octave::stack_frame::column(), and octave::stack_frame::display().

◆ m_dispatch_class

std::string octave::stack_frame::m_dispatch_class
protectedinherited

◆ m_evaluator

◆ m_flags

std::vector<scope_flags> octave::base_value_stack_frame::m_flags
protected

Definition at line 373 of file stack-frame.cc.

Referenced by display(), get_scope_flag(), resize(), and set_scope_flag().

◆ m_index

size_t octave::stack_frame::m_index
protectedinherited

Definition at line 566 of file stack-frame.h.

Referenced by octave::stack_frame::display(), and octave::stack_frame::index().

◆ m_line

int octave::stack_frame::m_line
protectedinherited

Definition at line 562 of file stack-frame.h.

Referenced by octave::stack_frame::display(), and octave::stack_frame::line().

◆ m_parent_link

std::shared_ptr<stack_frame> octave::stack_frame::m_parent_link
protectedinherited

◆ m_static_link

◆ m_values

std::vector<octave_value> octave::base_value_stack_frame::m_values
protected

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