GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Types | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
symbol_table Class Reference

#include "symtab.h"

Collaboration diagram for symbol_table:
Collaboration graph
[legend]

Classes

class  fcn_info
class  scope_id_cache
class  symbol_record
class  symbol_reference

Public Types

typedef size_t context_id
typedef int scope_id

Static Public Member Functions

static void add_dispatch (const std::string &name, const std::string &type, const std::string &fname)
static void add_to_parent_map (const std::string &classname, const std::list< std::string > &parent_list)
static void alias_built_in_function (const std::string &alias, const std::string &name)
static std::list< symbol_recordall_variables (scope_id scope=xcurrent_scope, context_id context=xdefault_context, bool defined_only=true, unsigned int exclude=symbol_record::hidden)
static scope_id alloc_scope (void)
static void assign (const std::string &name, const octave_value &value=octave_value(), scope_id scope=xcurrent_scope, context_id context=xdefault_context, bool force_add=false)
static bool at_top_level (void)
static std::list< std::string > built_in_function_names (void)
static octave_value builtin_find (const std::string &name)
static void cache_name (scope_id scope, const std::string &name)
static void cleanup (void)
static void clear (const std::string &name)
static void clear_all (bool force=false)
static void clear_dispatch (const std::string &name, const std::string &type)
static void clear_dld_function (const std::string &name)
static void clear_function (const std::string &name)
static void clear_function_pattern (const std::string &pat)
static void clear_functions (bool force=false)
static void clear_global (const std::string &name)
static void clear_global_pattern (const std::string &pat)
static void clear_mex_functions (void)
static void clear_objects (scope_id scope=xcurrent_scope)
static void clear_symbol (const std::string &name)
static void clear_symbol_pattern (const std::string &pat)
static void clear_user_function (const std::string &name)
static void clear_variable (const std::string &name)
static void clear_variable_pattern (const std::string &pat)
static void clear_variable_regexp (const std::string &pat)
static void clear_variables (scope_id scope)
static void clear_variables (void)
static std::list< std::string > cmdline_function_names (void)
static context_id current_context (void)
static scope_id current_scope (void)
static void dump (std::ostream &os, scope_id scope=xcurrent_scope)
static void dump_functions (std::ostream &os)
static void dump_global (std::ostream &os)
static scope_id dup_scope (scope_id scope)
static void erase_persistent (const std::string &name)
static void erase_scope (scope_id scope)
static void erase_subfunctions_in_scope (scope_id scope)
static octave_value find (const std::string &name, const octave_value_list &args=octave_value_list(), bool skip_variables=false, bool local_funcs=true)
static octave_value find_autoload (const std::string &name)
static octave_value find_built_in_function (const std::string &name)
static octave_value find_function (const std::string &name, const octave_value_list &args=octave_value_list(), bool local_funcs=true)
static octave_value find_method (const std::string &name, const std::string &dispatch_type)
static symbol_record find_symbol (const std::string &name, scope_id scope=xcurrent_scope)
static octave_value find_user_function (const std::string &name)
static void force_assign (const std::string &name, const octave_value &value=octave_value(), scope_id scope=xcurrent_scope, context_id context=xdefault_context)
static octave_valueforce_varref (const std::string &name, scope_id scope=xcurrent_scope, context_id context=xdefault_context) GCC_ATTR_DEPRECATED
static void free_scope (scope_id scope)
static octave_user_functionget_curr_fcn (scope_id scope=xcurrent_scope)
static fcn_info::dispatch_map_type get_dispatch (const std::string &name)
static std::list< symbol_recordglob (const std::string &pattern)
static std::list< symbol_recordglob_global_variables (const std::string &pattern)
static std::list< symbol_recordglob_variables (const std::string &pattern)
static std::list< symbol_recordglob_variables (const string_vector &patterns)
static void global_assign (const std::string &name, const octave_value &value=octave_value())
static scope_id global_scope (void)
static std::list< std::string > global_variable_names (void)
static octave_valueglobal_varref (const std::string &name) GCC_ATTR_DEPRECATED
static octave_value global_varval (const std::string &name)
static std::string help_for_dispatch (const std::string &name)
static void inherit (scope_id scope, scope_id donor_scope, context_id donor_context)
static symbol_recordinsert (const std::string &name, scope_id scope=xcurrent_scope)
static void install_built_in_function (const std::string &name, const octave_value &fcn)
static void install_cmdline_function (const std::string &name, const octave_value &fcn)
static void install_nestfunction (const std::string &name, const octave_value &fcn, scope_id parent_scope)
static void install_subfunction (const std::string &name, const octave_value &fcn, scope_id scope)
static void install_user_function (const std::string &name, const octave_value &fcn)
static bool is_built_in_function_name (const std::string &name)
static bool is_global (const std::string &name)
static bool is_local_variable (const std::string &name)
static bool is_superiorto (const std::string &a, const std::string &b)
static bool is_variable (const std::string &name)
static void lock_subfunctions (scope_id scope=xcurrent_scope)
static void mark_automatic (const std::string &name)
static void mark_global (const std::string &name)
static void mark_hidden (const std::string &name)
static void mark_subfunctions_in_scope_as_private (scope_id scope, const std::string &class_name)
static std::list< std::string > parent_classes (const std::string &dispatch_type)
static void persistent_assign (const std::string &name, const octave_value &value=octave_value())
static octave_valuepersistent_varref (const std::string &name) GCC_ATTR_DEPRECATED
static octave_value persistent_varval (const std::string &name)
static void pop_context (void)
static void pop_context (void *)
static void print_dispatch (std::ostream &os, const std::string &name)
static void push_context (void)
static std::list< symbol_recordregexp (const std::string &pattern)
static std::list< symbol_recordregexp_global_variables (const std::string &pattern)
static std::list< symbol_recordregexp_variables (const std::string &pattern)
static std::list< symbol_recordregexp_variables (const string_vector &patterns)
static void rename (const std::string &old_name, const std::string &new_name, scope_id scope=xcurrent_scope)
static std::list< scope_idscopes (void)
static bool set_class_relationship (const std::string &sup_class, const std::string &inf_class)
static void set_curr_fcn (octave_user_function *curr_fcn, scope_id scope=xcurrent_scope)
static void set_scope (scope_id scope)
static void set_scope_and_context (scope_id scope, context_id context)
static void stash_dir_name_for_subfunctions (scope_id scope, const std::string &dir_name)
static std::map< std::string,
octave_value
subfunctions_defined_in_scope (scope_id scope=xcurrent_scope)
static void top_level_assign (const std::string &name, const octave_value &value=octave_value())
static std::list< std::string > top_level_variable_names (void)
static octave_valuetop_level_varref (const std::string &name) GCC_ATTR_DEPRECATED
static octave_value top_level_varval (const std::string &name)
static scope_id top_scope (void)
static void unlock_subfunctions (scope_id scope=xcurrent_scope)
static void update_nest (scope_id scope)
static std::list< std::string > user_function_names (void)
static std::list< std::string > variable_names (void)
static octave_valuevarref (const std::string &name, scope_id scope=xcurrent_scope, context_id context=xdefault_context, bool force_add=false) GCC_ATTR_DEPRECATED
static octave_value varval (const std::string &name, scope_id scope=xcurrent_scope, context_id context=xdefault_context)
static std::list
< workspace_element
workspace_info (void)

Private Types

typedef std::map< scope_id,
symbol_table * >
::const_iterator 
all_instances_const_iterator
typedef std::map< scope_id,
symbol_table * >::iterator 
all_instances_iterator
typedef std::map< std::string,
std::set< std::string >
>::const_iterator 
class_precedence_table_const_iterator
typedef std::map< std::string,
std::set< std::string >
>::iterator 
class_precedence_table_iterator
typedef std::map< std::string,
std::list< std::string >
>::const_iterator 
const_parent_map_iterator
typedef std::map< std::string,
fcn_info >::const_iterator 
fcn_table_const_iterator
typedef std::map< std::string,
fcn_info >::iterator 
fcn_table_iterator
typedef std::map< std::string,
octave_value >::const_iterator 
global_table_const_iterator
typedef std::map< std::string,
octave_value >::iterator 
global_table_iterator
typedef std::map< std::string,
std::list< std::string >
>::iterator 
parent_map_iterator
typedef std::map< std::string,
octave_value >::const_iterator 
persistent_table_const_iterator
typedef std::map< std::string,
octave_value >::iterator 
persistent_table_iterator
typedef std::map< std::string,
symbol_record >
::const_iterator 
table_const_iterator
typedef std::map< std::string,
symbol_record >::iterator 
table_iterator

Private Member Functions

 symbol_table (const symbol_table &)
 symbol_table (scope_id scope)
 ~symbol_table (void)
void add_nest_child (symbol_table &st)
std::list< symbol_recorddo_all_variables (context_id context, bool defined_only, unsigned int exclude) const
void do_assign (const std::string &name, const octave_value &value, context_id context, bool force_add)
octave_value do_builtin_find (const std::string &name)
void do_cache_name (const std::string &name)
void do_clear_global (const std::string &name)
void do_clear_global_pattern (const std::string &pat)
void do_clear_objects (void)
void do_clear_variable (const std::string &name)
void do_clear_variable_pattern (const std::string &pat)
void do_clear_variable_regexp (const std::string &pat)
void do_clear_variables (void)
void do_dump (std::ostream &os)
void do_dup_scope (symbol_table &new_symbol_table) const
void do_erase_persistent (const std::string &name)
octave_value do_find (const std::string &name, const octave_value_list &args, bool skip_variables, bool local_funcs)
symbol_record do_find_symbol (const std::string &name)
std::list< symbol_recorddo_glob (const std::string &pattern, bool vars_only=false) const
void do_inherit (symbol_table &donor_table, context_id donor_context)
symbol_recorddo_insert (const std::string &name, bool force_add=false)
bool do_is_global (const std::string &name) const
bool do_is_local_variable (const std::string &name) const
bool do_is_variable (const std::string &name) const
void do_mark_automatic (const std::string &name)
void do_mark_global (const std::string &name)
void do_mark_hidden (const std::string &name)
void do_persistent_assign (const std::string &name, const octave_value &value)
octave_valuedo_persistent_varref (const std::string &name)
octave_value do_persistent_varval (const std::string &name)
void do_pop_context (void)
void do_push_context (void)
std::list< symbol_recorddo_regexp (const std::string &pattern, bool vars_only=false) const
void do_rename (const std::string &old_name, const std::string &new_name)
void do_update_nest (void)
std::list< std::string > do_variable_names (void)
octave_valuedo_varref (const std::string &name, context_id context, bool force_add)
octave_value do_varval (const std::string &name, context_id context) const
std::list< workspace_elementdo_workspace_info (void) const
void insert_symbol_record (const symbol_record &sr)
bool look_nonlocal (const std::string &name, symbol_record &result)
symbol_tableoperator= (const symbol_table &)

Static Private Member Functions

static fcn_infoget_fcn_info (const std::string &name)
static symbol_tableget_instance (scope_id scope, bool create=true)

Private Attributes

octave_user_functioncurr_fcn
scope_id my_scope
std::vector< symbol_table * > nest_children
symbol_tablenest_parent
std::map< std::string,
octave_value
persistent_table
bool static_workspace
std::map< std::string,
symbol_record
table
std::string table_name

Static Private Attributes

static std::map< scope_id,
symbol_table * > 
all_instances
static std::map< std::string,
std::set< std::string > > 
class_precedence_table
static std::map< std::string,
fcn_info
fcn_table
static std::map< std::string,
octave_value
global_table
static symbol_tableinstance = 0
static std::map< std::string,
std::list< std::string > > 
parent_map
static context_id xcurrent_context = 0
static scope_id xcurrent_scope = 1
static const context_id xdefault_context = static_cast<context_id> (-1)
static const scope_id xglobal_scope = 0
static const scope_id xtop_scope = 1

Detailed Description

Definition at line 44 of file symtab.h.

Member Typedef Documentation

typedef std::map<scope_id, symbol_table*>::const_iterator symbol_table::all_instances_const_iterator
private

Definition at line 2297 of file symtab.h.

typedef std::map<scope_id, symbol_table*>::iterator symbol_table::all_instances_iterator
private

Definition at line 2299 of file symtab.h.

typedef std::map<std::string, std::set<std::string> >::const_iterator symbol_table::class_precedence_table_const_iterator
private

Definition at line 2349 of file symtab.h.

typedef std::map<std::string, std::set<std::string> >::iterator symbol_table::class_precedence_table_iterator
private

Definition at line 2351 of file symtab.h.

typedef std::map<std::string, std::list<std::string> >::const_iterator symbol_table::const_parent_map_iterator
private

Definition at line 2357 of file symtab.h.

Definition at line 51 of file symtab.h.

typedef std::map<std::string, fcn_info>::const_iterator symbol_table::fcn_table_const_iterator
private

Definition at line 2302 of file symtab.h.

typedef std::map<std::string, fcn_info>::iterator symbol_table::fcn_table_iterator
private

Definition at line 2304 of file symtab.h.

typedef std::map<std::string, octave_value>::const_iterator symbol_table::global_table_const_iterator
private

Definition at line 2287 of file symtab.h.

typedef std::map<std::string, octave_value>::iterator symbol_table::global_table_iterator
private

Definition at line 2289 of file symtab.h.

typedef std::map<std::string, std::list<std::string> >::iterator symbol_table::parent_map_iterator
private

Definition at line 2359 of file symtab.h.

typedef std::map<std::string, octave_value>::const_iterator symbol_table::persistent_table_const_iterator
private

Definition at line 2292 of file symtab.h.

typedef std::map<std::string, octave_value>::iterator symbol_table::persistent_table_iterator
private

Definition at line 2294 of file symtab.h.

Definition at line 50 of file symtab.h.

typedef std::map<std::string, symbol_record>::const_iterator symbol_table::table_const_iterator
private

Definition at line 2282 of file symtab.h.

typedef std::map<std::string, symbol_record>::iterator symbol_table::table_iterator
private

Definition at line 2284 of file symtab.h.

Constructor & Destructor Documentation

symbol_table::symbol_table ( const symbol_table )
private
symbol_table::symbol_table ( scope_id  scope)
inlineprivate

Definition at line 2370 of file symtab.h.

symbol_table::~symbol_table ( void  )
inlineprivate

Definition at line 2375 of file symtab.h.

Member Function Documentation

static void symbol_table::add_dispatch ( const std::string &  name,
const std::string &  type,
const std::string &  fname 
)
inlinestatic

Definition at line 1796 of file symtab.h.

References symbol_table::fcn_info::add_dispatch().

Referenced by F__dispatch__().

void symbol_table::add_nest_child ( symbol_table st)
inlineprivate

Definition at line 2435 of file symtab.h.

References nest_parent.

static void symbol_table::add_to_parent_map ( const std::string &  classname,
const std::list< std::string > &  parent_list 
)
inlinestatic

Definition at line 2220 of file symtab.h.

Referenced by octave_class::octave_class().

static void symbol_table::alias_built_in_function ( const std::string &  alias,
const std::string &  name 
)
inlinestatic
static std::list<symbol_record> symbol_table::all_variables ( scope_id  scope = xcurrent_scope,
context_id  context = xdefault_context,
bool  defined_only = true,
unsigned int  exclude = symbol_record::hidden 
)
inlinestatic
static scope_id symbol_table::alloc_scope ( void  )
inlinestatic
static void symbol_table::assign ( const std::string &  name,
const octave_value value = octave_value (),
scope_id  scope = xcurrent_scope,
context_id  context = xdefault_context,
bool  force_add = false 
)
inlinestatic
static bool symbol_table::at_top_level ( void  )
inlinestatic

Definition at line 1274 of file symtab.h.

Referenced by DEFUN(), Fwarning(), intern_argv(), main_loop(), and warning_1().

static std::list<std::string> symbol_table::built_in_function_names ( void  )
inlinestatic

Definition at line 2091 of file symtab.h.

References octave_value::is_defined().

Referenced by F__builtins__(), and make_name_list().

octave_value symbol_table::builtin_find ( const std::string &  name)
static

Definition at line 1160 of file symtab.cc.

References do_builtin_find(), get_instance(), octave_value(), and xcurrent_scope.

static void symbol_table::cache_name ( scope_id  scope,
const std::string &  name 
)
inlinestatic
void symbol_table::cleanup ( void  )
static

Definition at line 1472 of file symtab.cc.

References all_instances, class_precedence_table, clear_all(), fcn_table, global_table, and parent_map.

Referenced by do_octave_atexit().

static void symbol_table::clear ( const std::string &  name)
inlinestatic

Definition at line 1621 of file symtab.h.

References clear_variable().

Referenced by install_loaded_variable().

static void symbol_table::clear_all ( bool  force = false)
inlinestatic

Definition at line 1626 of file symtab.h.

Referenced by cleanup(), do_matlab_compatible_clear(), and Fclear().

static void symbol_table::clear_dispatch ( const std::string &  name,
const std::string &  type 
)
inlinestatic

Definition at line 1817 of file symtab.h.

References symbol_table::fcn_info::clear_dispatch(), and symbol_table::fcn_info::find().

Referenced by F__dispatch__().

static void symbol_table::clear_dld_function ( const std::string &  name)
inlinestatic
static void symbol_table::clear_function ( const std::string &  name)
inlinestatic

Definition at line 1663 of file symtab.h.

Referenced by clear_function(), and do_clear_functions().

static void symbol_table::clear_function_pattern ( const std::string &  pat)
inlinestatic

Definition at line 1692 of file symtab.h.

References glob_match::match().

Referenced by do_clear_functions().

static void symbol_table::clear_functions ( bool  force = false)
inlinestatic

Definition at line 1657 of file symtab.h.

Referenced by do_clear_functions().

static void symbol_table::clear_global ( const std::string &  name)
inlinestatic

Definition at line 1668 of file symtab.h.

References do_clear_global().

Referenced by do_clear_globals().

static void symbol_table::clear_global_pattern ( const std::string &  pat)
inlinestatic

Definition at line 1703 of file symtab.h.

References do_clear_global_pattern().

Referenced by do_clear_globals().

static void symbol_table::clear_mex_functions ( void  )
inlinestatic

Definition at line 1764 of file symtab.h.

References symbol_table::fcn_info::clear_mex_function().

Referenced by clear_mex_functions().

static void symbol_table::clear_objects ( scope_id  scope = xcurrent_scope)
inlinestatic

Definition at line 1649 of file symtab.h.

References do_clear_objects().

Referenced by do_matlab_compatible_clear(), and Fclear().

static void symbol_table::clear_symbol ( const std::string &  name)
inlinestatic

Definition at line 1684 of file symtab.h.

References clear_function(), and clear_variable().

Referenced by clear_symbol().

static void symbol_table::clear_symbol_pattern ( const std::string &  pat)
inlinestatic

Definition at line 1727 of file symtab.h.

Referenced by do_clear_symbols(), and do_matlab_compatible_clear().

static void symbol_table::clear_user_function ( const std::string &  name)
inlinestatic

Definition at line 1735 of file symtab.h.

References symbol_table::fcn_info::clear_user_function().

static void symbol_table::clear_variable ( const std::string &  name)
inlinestatic

Definition at line 1676 of file symtab.h.

References do_clear_variable().

Referenced by clear_variable(), and do_clear_variables().

static void symbol_table::clear_variable_pattern ( const std::string &  pat)
inlinestatic

Definition at line 1711 of file symtab.h.

References do_clear_variable_pattern().

Referenced by do_clear_variables().

static void symbol_table::clear_variable_regexp ( const std::string &  pat)
inlinestatic

Definition at line 1719 of file symtab.h.

References do_clear_variable_regexp().

Referenced by do_clear_variables().

static void symbol_table::clear_variables ( scope_id  scope)
inlinestatic

Definition at line 1635 of file symtab.h.

References do_clear_variables().

static void symbol_table::clear_variables ( void  )
inlinestatic
static std::list<std::string> symbol_table::cmdline_function_names ( void  )
inlinestatic

Definition at line 2110 of file symtab.h.

References octave_value::is_defined().

Referenced by make_name_list().

static context_id symbol_table::current_context ( void  )
inlinestatic
static scope_id symbol_table::current_scope ( void  )
inlinestatic
std::list<symbol_record> symbol_table::do_all_variables ( context_id  context,
bool  defined_only,
unsigned int  exclude 
) const
inlineprivate
void symbol_table::do_assign ( const std::string &  name,
const octave_value value,
context_id  context,
bool  force_add 
)
inlineprivate

Definition at line 2540 of file symtab.h.

References symbol_table::symbol_record::assign().

Referenced by assign().

octave_value symbol_table::do_builtin_find ( const std::string &  name)
private

Definition at line 1368 of file symtab.cc.

References symbol_table::fcn_info::builtin_find(), fcn_table, and octave_value::is_defined().

Referenced by builtin_find().

void symbol_table::do_cache_name ( const std::string &  name)
inlineprivate

Definition at line 2866 of file symtab.h.

Referenced by cache_name(), and get_instance().

void symbol_table::do_clear_global ( const std::string &  name)
inlineprivate
void symbol_table::do_clear_global_pattern ( const std::string &  pat)
inlineprivate
void symbol_table::do_clear_objects ( void  )
inlineprivate

Definition at line 2655 of file symtab.h.

References octave_value::is_object(), and symbol_table::symbol_record::varval().

Referenced by clear_objects().

void symbol_table::do_clear_variable ( const std::string &  name)
inlineprivate

Definition at line 2685 of file symtab.h.

Referenced by clear_variable().

void symbol_table::do_clear_variable_pattern ( const std::string &  pat)
inlineprivate
void symbol_table::do_clear_variable_regexp ( const std::string &  pat)
inlineprivate
void symbol_table::do_clear_variables ( void  )
inlineprivate

Definition at line 2649 of file symtab.h.

Referenced by clear_variables().

void symbol_table::do_dump ( std::ostream &  os)
private

Definition at line 1440 of file symtab.cc.

References octave_value::dump(), persistent_table, and table.

Referenced by dump().

void symbol_table::do_dup_scope ( symbol_table new_symbol_table) const
inlineprivate

Definition at line 2448 of file symtab.h.

References insert_symbol_record(), and my_scope.

Referenced by dup_scope().

void symbol_table::do_erase_persistent ( const std::string &  name)
inlineprivate

Definition at line 2606 of file symtab.h.

Referenced by erase_persistent().

octave_value symbol_table::do_find ( const std::string &  name,
const octave_value_list args,
bool  skip_variables,
bool  local_funcs 
)
private
symbol_record symbol_table::do_find_symbol ( const std::string &  name)
inlineprivate

Definition at line 2455 of file symtab.h.

Referenced by find_symbol().

std::list<symbol_record> symbol_table::do_glob ( const std::string &  pattern,
bool  vars_only = false 
) const
inlineprivate

Definition at line 2785 of file symtab.h.

References symbol_table::symbol_record::is_variable(), and glob_match::match().

Referenced by glob(), and glob_variables().

void symbol_table::do_inherit ( symbol_table donor_table,
context_id  donor_context 
)
inlineprivate
symbol_record& symbol_table::do_insert ( const std::string &  name,
bool  force_add = false 
)
inlineprivate

Definition at line 2502 of file symtab.h.

References look_nonlocal(), and symbol_table::symbol_record::mark_added_static().

Referenced by insert().

bool symbol_table::do_is_global ( const std::string &  name) const
inlineprivate

Definition at line 2855 of file symtab.h.

Referenced by is_global().

bool symbol_table::do_is_local_variable ( const std::string &  name) const
inlineprivate

Definition at line 2846 of file symtab.h.

Referenced by is_local_variable().

bool symbol_table::do_is_variable ( const std::string &  name) const
inlineprivate

Definition at line 2614 of file symtab.h.

References symbol_table::symbol_record::is_variable().

Referenced by is_variable().

void symbol_table::do_mark_automatic ( const std::string &  name)
inlineprivate

Definition at line 2750 of file symtab.h.

Referenced by mark_automatic().

void symbol_table::do_mark_global ( const std::string &  name)
inlineprivate

Definition at line 2760 of file symtab.h.

Referenced by mark_global().

void symbol_table::do_mark_hidden ( const std::string &  name)
inlineprivate

Definition at line 2755 of file symtab.h.

Referenced by mark_hidden().

void symbol_table::do_persistent_assign ( const std::string &  name,
const octave_value value 
)
inlineprivate

Definition at line 2579 of file symtab.h.

Referenced by persistent_assign().

octave_value& symbol_table::do_persistent_varref ( const std::string &  name)
inlineprivate
octave_value symbol_table::do_persistent_varval ( const std::string &  name)
inlineprivate

Definition at line 2599 of file symtab.h.

Referenced by persistent_varval().

void symbol_table::do_pop_context ( void  )
inlineprivate

Definition at line 2636 of file symtab.h.

Referenced by pop_context().

void symbol_table::do_push_context ( void  )
inlineprivate

Definition at line 2630 of file symtab.h.

Referenced by push_context().

std::list<symbol_record> symbol_table::do_regexp ( const std::string &  pattern,
bool  vars_only = false 
) const
inlineprivate

Definition at line 2808 of file symtab.h.

References regexp::is_match(), and symbol_table::symbol_record::is_variable().

Referenced by regexp(), and regexp_variables().

void symbol_table::do_rename ( const std::string &  old_name,
const std::string &  new_name 
)
inlineprivate

Definition at line 2524 of file symtab.h.

References symbol_table::symbol_record::rename().

Referenced by rename().

void symbol_table::do_update_nest ( void  )
private
std::list<std::string> symbol_table::do_variable_names ( void  )
inlineprivate

Definition at line 2831 of file symtab.h.

Referenced by top_level_variable_names(), and variable_names().

octave_value& symbol_table::do_varref ( const std::string &  name,
context_id  context,
bool  force_add 
)
inlineprivate

Definition at line 2557 of file symtab.h.

References symbol_table::symbol_record::varref().

Referenced by force_varref(), top_level_varref(), and varref().

octave_value symbol_table::do_varval ( const std::string &  name,
context_id  context 
) const
inlineprivate

Definition at line 2572 of file symtab.h.

References octave_value().

Referenced by do_inherit(), and varval().

std::list< workspace_element > symbol_table::do_workspace_info ( void  ) const
private
void symbol_table::dump ( std::ostream &  os,
scope_id  scope = xcurrent_scope 
)
static
void symbol_table::dump_functions ( std::ostream &  os)
static

Definition at line 1275 of file symtab.cc.

References fcn_table.

Referenced by F__dump_symtab_info__().

void symbol_table::dump_global ( std::ostream &  os)
static

Definition at line 1255 of file symtab.cc.

References octave_value::dump(), and global_table.

Referenced by dump(), and F__dump_symtab_info__().

static scope_id symbol_table::dup_scope ( scope_id  scope)
inlinestatic

Definition at line 1221 of file symtab.h.

References do_dup_scope().

Referenced by tree_anon_fcn_handle::dup(), and tree_anon_fcn_handle::rvalue1().

static void symbol_table::erase_persistent ( const std::string &  name)
inlinestatic
static void symbol_table::erase_scope ( scope_id  scope)
inlinestatic
static void symbol_table::erase_subfunctions_in_scope ( scope_id  scope)
inlinestatic

Definition at line 1207 of file symtab.h.

Referenced by octave_user_function::erase_subfunctions().

octave_value symbol_table::find ( const std::string &  name,
const octave_value_list args = octave_value_list (),
bool  skip_variables = false,
bool  local_funcs = true 
)
static

Definition at line 1147 of file symtab.cc.

References do_find(), get_instance(), octave_value(), and xcurrent_scope.

Referenced by find_function(), and safe_symbol_lookup().

static octave_value symbol_table::find_autoload ( const std::string &  name)
inlinestatic
static octave_value symbol_table::find_built_in_function ( const std::string &  name)
inlinestatic

Definition at line 1492 of file symtab.h.

References octave_value().

Referenced by install_built_in_docstrings().

octave_value symbol_table::find_function ( const std::string &  name,
const octave_value_list args = octave_value_list (),
bool  local_funcs = true 
)
static
static octave_value symbol_table::find_method ( const std::string &  name,
const std::string &  dispatch_type 
)
inlinestatic
static symbol_record symbol_table::find_symbol ( const std::string &  name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1252 of file symtab.h.

References do_find_symbol().

Referenced by do_who(), tree_identifier::dup(), and jit_convert::get_variable().

static octave_value symbol_table::find_user_function ( const std::string &  name)
inlinestatic
static void symbol_table::force_assign ( const std::string &  name,
const octave_value value = octave_value (),
scope_id  scope = xcurrent_scope,
context_id  context = xdefault_context 
)
inlinestatic

Definition at line 1336 of file symtab.h.

References context.

Referenced by bind_ans(), and octave_user_function::bind_automatic_vars().

static octave_value& symbol_table::force_varref ( const std::string &  name,
scope_id  scope = xcurrent_scope,
context_id  context = xdefault_context 
)
inlinestatic

Definition at line 1346 of file symtab.h.

References context, and do_varref().

static void symbol_table::free_scope ( scope_id  scope)
inlinestatic

Definition at line 2209 of file symtab.h.

References error(), and symbol_table::scope_id_cache::free().

static octave_user_function* symbol_table::get_curr_fcn ( scope_id  scope = xcurrent_scope)
inlinestatic
static fcn_info::dispatch_map_type symbol_table::get_dispatch ( const std::string &  name)
inlinestatic

Definition at line 1841 of file symtab.h.

References symbol_table::fcn_info::get_dispatch().

Referenced by F__dispatch__(), and octave_fcn_binder::maybe_binder().

static fcn_info* symbol_table::get_fcn_info ( const std::string &  name)
inlinestaticprivate

Definition at line 2490 of file symtab.h.

Referenced by symbol_table::symbol_record::find().

static symbol_table* symbol_table::get_instance ( scope_id  scope,
bool  create = true 
)
inlinestaticprivate
static std::list<symbol_record> symbol_table::glob ( const std::string &  pattern)
inlinestatic

Definition at line 1940 of file symtab.h.

References do_glob().

Referenced by save_vars().

static std::list<symbol_record> symbol_table::glob_global_variables ( const std::string &  pattern)
inlinestatic

Definition at line 1969 of file symtab.h.

References glob_match::match().

Referenced by do_who().

static std::list<symbol_record> symbol_table::glob_variables ( const std::string &  pattern)
inlinestatic

Definition at line 1954 of file symtab.h.

References do_glob().

Referenced by do_who().

static std::list<symbol_record> symbol_table::glob_variables ( const string_vector patterns)
inlinestatic

Definition at line 2014 of file symtab.h.

References Array< T >::length().

static void symbol_table::global_assign ( const std::string &  name,
const octave_value value = octave_value () 
)
inlinestatic

Definition at line 1366 of file symtab.h.

Referenced by install_loaded_variable(), and set_global_value().

static scope_id symbol_table::global_scope ( void  )
inlinestatic

Definition at line 1131 of file symtab.h.

static std::list<std::string> symbol_table::global_variable_names ( void  )
inlinestatic

Definition at line 2064 of file symtab.h.

Referenced by do_clear_globals().

static octave_value& symbol_table::global_varref ( const std::string &  name)
inlinestatic

Definition at line 1380 of file symtab.h.

static octave_value symbol_table::global_varval ( const std::string &  name)
inlinestatic
static std::string symbol_table::help_for_dispatch ( const std::string &  name)
inlinestatic

Definition at line 1857 of file symtab.h.

References symbol_table::fcn_info::help_for_dispatch().

static void symbol_table::inherit ( scope_id  scope,
scope_id  donor_scope,
context_id  donor_context 
)
inlinestatic

Definition at line 1261 of file symtab.h.

References do_inherit().

Referenced by tree_anon_fcn_handle::dup(), and tree_anon_fcn_handle::rvalue1().

static symbol_record& symbol_table::insert ( const std::string &  name,
scope_id  scope = xcurrent_scope 
)
inlinestatic
void symbol_table::insert_symbol_record ( const symbol_record sr)
inlineprivate

Definition at line 2442 of file symtab.h.

References symbol_table::symbol_record::name().

Referenced by do_dup_scope().

static void symbol_table::install_built_in_function ( const std::string &  name,
const octave_value fcn 
)
inlinestatic
static void symbol_table::install_cmdline_function ( const std::string &  name,
const octave_value fcn 
)
inlinestatic
void symbol_table::install_nestfunction ( const std::string &  name,
const octave_value fcn,
scope_id  parent_scope 
)
static
static void symbol_table::install_subfunction ( const std::string &  name,
const octave_value fcn,
scope_id  scope 
)
inlinestatic
static void symbol_table::install_user_function ( const std::string &  name,
const octave_value fcn 
)
inlinestatic

Definition at line 1579 of file symtab.h.

References symbol_table::fcn_info::install_user_function().

static bool symbol_table::is_built_in_function_name ( const std::string &  name)
inlinestatic

Definition at line 1464 of file symtab.h.

References octave_value::is_defined().

Referenced by load_path::add_to_fcn_map().

static bool symbol_table::is_global ( const std::string &  name)
inlinestatic
static bool symbol_table::is_local_variable ( const std::string &  name)
inlinestatic

Definition at line 2129 of file symtab.h.

References do_is_local_variable().

Referenced by do_matlab_compatible_clear().

bool symbol_table::is_superiorto ( const std::string &  a,
const std::string &  b 
)
static

Definition at line 1048 of file symtab.cc.

References class_precedence_table.

Referenced by get_dispatch_type(), and set_class_relationship().

static bool symbol_table::is_variable ( const std::string &  name)
inlinestatic

Definition at line 1456 of file symtab.h.

References do_is_variable().

Referenced by do_who(), octave_base_lexer::is_variable(), and save_vars().

static void symbol_table::lock_subfunctions ( scope_id  scope = xcurrent_scope)
inlinestatic

Definition at line 2175 of file symtab.h.

bool symbol_table::look_nonlocal ( const std::string &  name,
symbol_record result 
)
inlineprivate

Definition at line 2870 of file symtab.h.

References look_nonlocal().

Referenced by do_insert(), do_update_nest(), and look_nonlocal().

static void symbol_table::mark_automatic ( const std::string &  name)
inlinestatic

Definition at line 1902 of file symtab.h.

References do_mark_automatic().

Referenced by octave_user_function::bind_automatic_vars().

static void symbol_table::mark_global ( const std::string &  name)
inlinestatic

Definition at line 1918 of file symtab.h.

References do_mark_global().

Referenced by install_loaded_variable().

static void symbol_table::mark_hidden ( const std::string &  name)
inlinestatic

Definition at line 1910 of file symtab.h.

References do_mark_hidden().

Referenced by octave_user_function::bind_automatic_vars(), and intern_argv().

static void symbol_table::mark_subfunctions_in_scope_as_private ( scope_id  scope,
const std::string &  class_name 
)
inlinestatic

Definition at line 1214 of file symtab.h.

Referenced by octave_user_function::mark_as_private_function().

symbol_table& symbol_table::operator= ( const symbol_table )
private
static std::list<std::string> symbol_table::parent_classes ( const std::string &  dispatch_type)
inlinestatic
static void symbol_table::persistent_assign ( const std::string &  name,
const octave_value value = octave_value () 
)
inlinestatic

Definition at line 1421 of file symtab.h.

References do_persistent_assign().

Referenced by symbol_table::symbol_record::symbol_record_rep::clear().

static octave_value& symbol_table::persistent_varref ( const std::string &  name)
inlinestatic

Definition at line 1431 of file symtab.h.

References do_persistent_varref().

static octave_value symbol_table::persistent_varval ( const std::string &  name)
inlinestatic
static void symbol_table::pop_context ( void  )
inlinestatic

Definition at line 1886 of file symtab.h.

References do_pop_context(), and error().

Referenced by octave_user_function::do_multi_index_op().

static void symbol_table::pop_context ( void )
inlinestatic

Definition at line 1900 of file symtab.h.

References pop_context().

Referenced by pop_context().

static void symbol_table::print_dispatch ( std::ostream &  os,
const std::string &  name 
)
inlinestatic

Definition at line 1829 of file symtab.h.

References symbol_table::fcn_info::print_dispatch().

Referenced by F__dispatch__().

static void symbol_table::push_context ( void  )
inlinestatic

Definition at line 1873 of file symtab.h.

References do_push_context(), and error().

Referenced by octave_user_function::do_multi_index_op().

static std::list<symbol_record> symbol_table::regexp ( const std::string &  pattern)
inlinestatic

Definition at line 1947 of file symtab.h.

References do_regexp().

static std::list<symbol_record> symbol_table::regexp_global_variables ( const std::string &  pattern)
inlinestatic

Definition at line 1992 of file symtab.h.

References regexp::is_match().

Referenced by do_who().

static std::list<symbol_record> symbol_table::regexp_variables ( const std::string &  pattern)
inlinestatic

Definition at line 1961 of file symtab.h.

References do_regexp().

Referenced by do_who().

static std::list<symbol_record> symbol_table::regexp_variables ( const string_vector patterns)
inlinestatic

Definition at line 2031 of file symtab.h.

References Array< T >::length().

static void symbol_table::rename ( const std::string &  old_name,
const std::string &  new_name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1296 of file symtab.h.

References do_rename().

Referenced by main_window::rename_variable_callback().

static std::list<scope_id> symbol_table::scopes ( void  )
inlinestatic

Definition at line 1246 of file symtab.h.

Referenced by F__dump_symtab_info__().

bool symbol_table::set_class_relationship ( const std::string &  sup_class,
const std::string &  inf_class 
)
static

Definition at line 1020 of file symtab.cc.

References class_precedence_table, and is_superiorto().

Referenced by DEFUN().

static void symbol_table::set_curr_fcn ( octave_user_function curr_fcn,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 2258 of file symtab.h.

References curr_fcn.

Referenced by octave_user_function::octave_user_function().

static void symbol_table::set_scope ( scope_id  scope)
inlinestatic
static void symbol_table::set_scope_and_context ( scope_id  scope,
context_id  context 
)
inlinestatic
void symbol_table::stash_dir_name_for_subfunctions ( scope_id  scope,
const std::string &  dir_name 
)
static
static std::map<std::string, octave_value> symbol_table::subfunctions_defined_in_scope ( scope_id  scope = xcurrent_scope)
inlinestatic

Definition at line 2190 of file symtab.h.

Referenced by dump(), and octave_user_function::subfunctions().

static void symbol_table::top_level_assign ( const std::string &  name,
const octave_value value = octave_value () 
)
inlinestatic

Definition at line 1397 of file symtab.h.

Referenced by set_top_level_value().

static std::list<std::string> symbol_table::top_level_variable_names ( void  )
inlinestatic

Definition at line 2077 of file symtab.h.

References do_variable_names().

static octave_value& symbol_table::top_level_varref ( const std::string &  name)
inlinestatic

Definition at line 1405 of file symtab.h.

References do_varref().

static octave_value symbol_table::top_level_varval ( const std::string &  name)
inlinestatic

Definition at line 1415 of file symtab.h.

Referenced by get_top_level_value().

static scope_id symbol_table::top_scope ( void  )
inlinestatic
static void symbol_table::unlock_subfunctions ( scope_id  scope = xcurrent_scope)
inlinestatic

Definition at line 2182 of file symtab.h.

static void symbol_table::update_nest ( scope_id  scope)
inlinestatic

Definition at line 1572 of file symtab.h.

References do_update_nest().

static std::list<std::string> symbol_table::user_function_names ( void  )
inlinestatic

Definition at line 2047 of file symtab.h.

Referenced by do_clear_functions().

static std::list<std::string> symbol_table::variable_names ( void  )
inlinestatic

Definition at line 2084 of file symtab.h.

References do_variable_names().

Referenced by do_clear_variables(), and make_name_list().

static octave_value& symbol_table::varref ( const std::string &  name,
scope_id  scope = xcurrent_scope,
context_id  context = xdefault_context,
bool  force_add = false 
)
inlinestatic

Definition at line 1322 of file symtab.h.

References context, and do_varref().

static octave_value symbol_table::varval ( const std::string &  name,
scope_id  scope = xcurrent_scope,
context_id  context = xdefault_context 
)
inlinestatic
static std::list<workspace_element> symbol_table::workspace_info ( void  )
inlinestatic

Member Data Documentation

std::map< symbol_table::scope_id, symbol_table * > symbol_table::all_instances
staticprivate

Definition at line 2338 of file symtab.h.

Referenced by cleanup().

std::map< std::string, std::set< std::string > > symbol_table::class_precedence_table
staticprivate

Definition at line 2346 of file symtab.h.

Referenced by cleanup(), is_superiorto(), and set_class_relationship().

octave_user_function* symbol_table::curr_fcn
private
std::map< std::string, symbol_table::fcn_info > symbol_table::fcn_table
staticprivate
std::map< std::string, octave_value > symbol_table::global_table
staticprivate
symbol_table * symbol_table::instance = 0
staticprivate

Definition at line 2335 of file symtab.h.

scope_id symbol_table::my_scope
private

Definition at line 2307 of file symtab.h.

Referenced by do_dup_scope().

std::vector<symbol_table*> symbol_table::nest_children
private

Definition at line 2317 of file symtab.h.

Referenced by do_update_nest().

symbol_table* symbol_table::nest_parent
private

Definition at line 2320 of file symtab.h.

Referenced by add_nest_child(), and do_update_nest().

std::map< std::string, std::list< std::string > > symbol_table::parent_map
staticprivate

Definition at line 2354 of file symtab.h.

Referenced by cleanup().

std::map<std::string, octave_value> symbol_table::persistent_table
private

Definition at line 2332 of file symtab.h.

Referenced by do_dump().

bool symbol_table::static_workspace
private

Definition at line 2326 of file symtab.h.

Referenced by do_update_nest().

std::map<std::string, symbol_record> symbol_table::table
private

Definition at line 2314 of file symtab.h.

Referenced by do_dump(), do_find(), do_update_nest(), and do_workspace_info().

std::string symbol_table::table_name
private

Definition at line 2311 of file symtab.h.

Referenced by dump().

symbol_table::context_id symbol_table::xcurrent_context = 0
staticprivate
symbol_table::scope_id symbol_table::xcurrent_scope = 1
staticprivate
const context_id symbol_table::xdefault_context = static_cast<context_id> (-1)
staticprivate

Definition at line 2368 of file symtab.h.

const symbol_table::scope_id symbol_table::xglobal_scope = 0
staticprivate

Definition at line 2361 of file symtab.h.

Referenced by dump().

const symbol_table::scope_id symbol_table::xtop_scope = 1
staticprivate

Definition at line 2362 of file symtab.h.

Referenced by find_function().


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