26 #if ! defined (octave_stack_frame_h)
27 #define octave_stack_frame_h 1
29 #include "octave-config.h"
102 class tree_evaluator;
103 class symbol_info_list;
104 class unwind_protect;
106 class stack_frame_walker;
168 const std::shared_ptr<stack_frame>&
access_link = std::shared_ptr<stack_frame> ());
215 std::string
fcn_name (
bool print_subfn =
true)
const
225 if (print_subfn && ! parent_fcn_name.empty ())
226 retval = parent_fcn_name +
'>';
249 bool return_list,
bool verbose,
250 const std::string& whos_line_fmt,
251 const std::string& msg);
280 std::string nm = sym.
name ();
281 error (
"can't make function parameter %s persistent", nm.c_str ());
286 std::string nm = sym.
name ();
287 error (
"can't make global variable '%s' persistent", nm.c_str ());
299 std::string nm = sym.
name ();
300 error (
"can't make persistent variable '%s' global", nm.c_str ());
308 std::shared_ptr<stack_frame>
311 std::shared_ptr<stack_frame>
314 std::shared_ptr<stack_frame>
317 virtual size_t size (
void)
const;
319 virtual void resize (
size_t);
462 const std::string&
type,
463 const std::list<octave_value_list>& idx,
479 const std::string&
type,
480 const std::list<octave_value_list>& idx)
489 const std::list<octave_value_list>& idx)
const
495 if (
retval.is_constant ())
549 virtual void display (
bool follow =
true)
const;
bool is_persistent(const symbol_record &sym) const
void clear_variables(void)
bool is_local_variable(const std::string &name) const
octave_value value(const symbol_record &sym, const std::string &type, const std::list< octave_value_list > &idx) const
void clear_variable_regexp(const std::string &pattern)
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)
virtual symbol_scope get_scope(void) const =0
void assign(const symbol_record &sym, const octave_value &val)
virtual octave_value get_auto_fcn_var(auto_var_type) const =0
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)
void unmark_global(const symbol_record &sym)
std::shared_ptr< stack_frame > m_static_link
void make_global(const symbol_record &sym)
bool is_global(const symbol_record &sym) const
bool is_global(const std::string &name) const
symbol_info_list all_variables(void)
bool is_object(const std::string &name) const
stack_frame & operator=(const stack_frame &elt)=delete
symbol_info_list regexp_symbol_info(const std::string &pattern)
virtual void mark_scope(const symbol_record &, scope_flags)=0
std::string m_dispatch_class
tree_evaluator & m_evaluator
virtual bool is_scope_frame(void) const
virtual scope_flags get_scope_flag(size_t) const
void clear_variable_pattern(const std::string &pattern)
virtual void set_scope_flag(size_t, scope_flags)
virtual void display(bool follow=true) const
symbol_info_list make_symbol_info_list(const std::list< symbol_record > &symrec_list) const
std::list< std::string > variable_names(void) const
std::shared_ptr< stack_frame > m_parent_link
virtual void set_auto_fcn_var(auto_var_type, const octave_value &)=0
virtual bool is_user_script_frame(void) const
std::string get_dispatch_class(void) const
std::shared_ptr< stack_frame > access_link(void) const
void clear_variable(const std::string &name)
bool is_defined(const symbol_record &sym) const
void install_variable(const std::string &name, const octave_value &value, bool global)
octave_value workspace(void)
virtual octave_value & varref(const symbol_record &sym)=0
std::shared_ptr< stack_frame > m_access_link
std::string fcn_name(bool print_subfn=true) const
virtual void clear_values(void)
void mark_global(const symbol_record &sym)
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)
std::shared_ptr< stack_frame > parent_link(void) const
bool is_variable(const symbol_record &sym) const
std::shared_ptr< stack_frame > static_link(void) const
virtual size_t size(void) const
virtual bool is_compiled_fcn_frame(void) const
void clear(const symbol_record &sym)
stack_frame(tree_evaluator &tw, 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)
void unmark_persistent(const symbol_record &sym)
std::string fcn_file_name(void) const
virtual ~stack_frame(void)=default
static 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)
bool is_object(const symbol_record &sym) const
symbol_info_list glob_symbol_info(const std::string &pattern)
bool is_persistent(const std::string &name) const
void install_variable(const symbol_record &sym, const octave_value &value, bool global)
std::map< std::string, octave_value > local_vars_map
virtual scope_flags scope_flag(const symbol_record &) const =0
octave_value varval(const std::string &name) const
virtual symbol_record insert_symbol(const std::string &)=0
void make_persistent(const symbol_record &sym)
symbol_info_list get_symbol_info(void)
void mark_persistent(const symbol_record &sym)
void set_dispatch_class(const std::string &class_name)
virtual bool is_user_fcn_frame(void) const
virtual octave_value varval(const symbol_record &sym) const =0
virtual void accept(stack_frame_walker &sfw)=0
bool is_variable(const std::string &name) const
virtual symbol_record lookup_symbol(const std::string &) const =0
stack_frame(const stack_frame &elt)=default
octave_value find_subfunction(const std::string &name) const
void assign(const std::string &name, const octave_value &val)
void display_stopped_in_message(std::ostream &os) const
virtual unwind_protect * unwind_protect_frame(void)
virtual void resize(size_t)
bool is_formal(void) const
std::string name(void) const
octave_value find_subfunction(const std::string &name) const
virtual bool is_anonymous_function(void) const
virtual std::string fcn_file_name(void) const
virtual std::string parent_fcn_name(void) const
std::string name(void) const
octave_idx_type length(void) const
octave_idx_type get_count(void) const
void call_object_destructor(void)
bool is_defined(void) const
octave_value & do_non_const_unary_op(unary_op op)
octave_value & assign(assign_op op, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_value storable_value(void) const
bool isobject(void) const
void error(const char *fmt,...)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value::octave_value(const Array< char > &chm, char type) return retval