GNU Octave  4.2.1
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 | Static Public Attributes | 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::stringbuilt_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, scope_id scope=xcurrent_scope)
 
static void clear_global_pattern (const std::string &pat, scope_id scope=xcurrent_scope)
 
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, scope_id scope=xcurrent_scope)
 
static void clear_variable_pattern (const std::string &pat, scope_id scope=xcurrent_scope)
 
static void clear_variable_regexp (const std::string &pat, scope_id scope=xcurrent_scope)
 
static void clear_variables (scope_id scope)
 
static void clear_variables (void)
 
static std::list< std::stringcmdline_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, scope_id scope=xcurrent_scope)
 
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_cmdline_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 octave_value find_submethod (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)
 
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, scope_id scope=xcurrent_scope)
 
static std::list< symbol_recordglob_global_variables (const std::string &pattern)
 
static std::list< symbol_recordglob_variables (const std::string &pattern, scope_id scope=xcurrent_scope)
 
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::stringglobal_variable_names (void)
 
static octave_valueglobal_varref (const std::string &name)
 
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, scope_id scope=xcurrent_scope)
 
static bool is_local_variable (const std::string &name, scope_id scope=xcurrent_scope)
 
static bool is_superiorto (const std::string &a, const std::string &b)
 
static bool is_variable (const std::string &name, scope_id scope=xcurrent_scope)
 
static void lock_subfunctions (scope_id scope=xcurrent_scope)
 
static void mark_automatic (const std::string &name, scope_id scope=xcurrent_scope)
 
static void mark_global (const std::string &name, scope_id scope=xcurrent_scope)
 
static void mark_hidden (const std::string &name, scope_id scope=xcurrent_scope)
 
static void mark_subfunctions_in_scope_as_private (scope_id scope, const std::string &class_name)
 
static std::list< std::stringparent_classes (const std::string &dispatch_type)
 
static void persistent_assign (const std::string &name, scope_id scope, const octave_value &value=octave_value())
 
static void persistent_assign (const std::string &name, const octave_value &value=octave_value())
 
static octave_valuepersistent_varref (const std::string &name)
 
static octave_value persistent_varval (const std::string &name, scope_id scope=xcurrent_scope)
 
static void pop_context (scope_id scope)
 
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 (scope_id scope=xcurrent_scope)
 
static std::list< symbol_recordregexp (const std::string &pattern, scope_id scope=xcurrent_scope)
 
static std::list< symbol_recordregexp_global_variables (const std::string &pattern)
 
static std::list< symbol_recordregexp_variables (const std::string &pattern, scope_id scope=xcurrent_scope)
 
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::stringtop_level_variable_names (void)
 
static octave_valuetop_level_varref (const std::string &name)
 
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::stringuser_function_names (void)
 
static std::list< std::stringvariable_names (scope_id scope=xcurrent_scope)
 
static octave_valuevarref (const std::string &name, scope_id scope=xcurrent_scope, context_id context=xdefault_context, bool force_add=false)
 
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 (scope_id scope=xcurrent_scope)
 

Static Public Attributes

static octave_value dummy_octave_value
 
static symbol_record dummy_symbol_record
 

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::stringdo_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 46 of file symtab.h.

Member Typedef Documentation

Definition at line 2361 of file symtab.h.

Definition at line 2363 of file symtab.h.

Definition at line 2413 of file symtab.h.

Definition at line 2415 of file symtab.h.

Definition at line 2421 of file symtab.h.

Definition at line 55 of file symtab.h.

Definition at line 2366 of file symtab.h.

Definition at line 2368 of file symtab.h.

Definition at line 2351 of file symtab.h.

Definition at line 2353 of file symtab.h.

Definition at line 2423 of file symtab.h.

Definition at line 2356 of file symtab.h.

Definition at line 2358 of file symtab.h.

Definition at line 54 of file symtab.h.

Definition at line 2346 of file symtab.h.

Definition at line 2348 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 2434 of file symtab.h.

symbol_table::~symbol_table ( void  )
inlineprivate

Definition at line 2439 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 1848 of file symtab.h.

References symbol_table::fcn_info::add_dispatch(), name, and p.

Referenced by F__dispatch__().

void symbol_table::add_nest_child ( symbol_table st)
inlineprivate

Definition at line 2499 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 2284 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 1300 of file symtab.h.

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

Definition at line 2153 of file symtab.h.

References fcn, octave_value::is_defined(), p, and retval.

Referenced by make_name_list().

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

Definition at line 1268 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
static void symbol_table::clear ( const std::string name)
inlinestatic

Definition at line 1665 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 1670 of file symtab.h.

Referenced by cleanup().

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

Definition at line 1869 of file symtab.h.

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

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 1710 of file symtab.h.

Referenced by clear_function().

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

Definition at line 1741 of file symtab.h.

References glob_match::match(), p, and pattern().

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

Definition at line 1704 of file symtab.h.

References p.

static void symbol_table::clear_global ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1715 of file symtab.h.

References do_clear_global().

static void symbol_table::clear_global_pattern ( const std::string pat,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1752 of file symtab.h.

References do_clear_global_pattern().

static void symbol_table::clear_mex_functions ( void  )
inlinestatic

Definition at line 1816 of file symtab.h.

References symbol_table::fcn_info::clear_mex_function(), and p.

Referenced by clear_mex_functions().

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

Definition at line 1696 of file symtab.h.

References do_clear_objects().

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

Definition at line 1733 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 1779 of file symtab.h.

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

Definition at line 1787 of file symtab.h.

References symbol_table::fcn_info::clear_user_function(), and p.

Referenced by file_editor_tab::exit_debug_and_clear().

static void symbol_table::clear_variable ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1724 of file symtab.h.

References do_clear_variable().

Referenced by clear_variable().

static void symbol_table::clear_variable_pattern ( const std::string pat,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1761 of file symtab.h.

References do_clear_variable_pattern().

static void symbol_table::clear_variable_regexp ( const std::string pat,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1770 of file symtab.h.

References do_clear_variable_regexp().

static void symbol_table::clear_variables ( scope_id  scope)
inlinestatic

Definition at line 1683 of file symtab.h.

References do_clear_variables().

static void symbol_table::clear_variables ( void  )
inlinestatic

Definition at line 1691 of file symtab.h.

Referenced by octave_user_function::do_multi_index_op(), and do_who().

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

Definition at line 2172 of file symtab.h.

References fcn, octave_value::is_defined(), p, and retval.

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 2604 of file symtab.h.

References symbol_table::symbol_record::assign(), and p.

Referenced by assign().

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

Definition at line 1515 of file symtab.cc.

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

Referenced by builtin_find().

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

Definition at line 2928 of file symtab.h.

References name.

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 2719 of file symtab.h.

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

Referenced by clear_objects().

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

Definition at line 2749 of file symtab.h.

References p.

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 2713 of file symtab.h.

References p.

Referenced by clear_variables().

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

Definition at line 1593 of file symtab.cc.

References octave_value::dump(), nm, p, persistent_table, string, table, and val.

Referenced by dump().

void symbol_table::do_dup_scope ( symbol_table new_symbol_table) const
inlineprivate

Definition at line 2512 of file symtab.h.

References insert_symbol_record(), my_scope, and p.

Referenced by dup_scope().

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

Definition at line 2670 of file symtab.h.

References p.

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 2519 of file symtab.h.

References p.

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 2847 of file symtab.h.

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

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 2566 of file symtab.h.

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

Referenced by insert().

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

Definition at line 2917 of file symtab.h.

References p.

Referenced by is_global().

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

Definition at line 2908 of file symtab.h.

References p.

Referenced by is_local_variable().

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

Definition at line 2678 of file symtab.h.

References symbol_table::symbol_record::is_variable(), p, and retval.

Referenced by is_variable().

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

Definition at line 2812 of file symtab.h.

Referenced by mark_automatic().

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

Definition at line 2822 of file symtab.h.

Referenced by mark_global().

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

Definition at line 2817 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 2643 of file symtab.h.

References p, and value().

Referenced by persistent_assign().

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

Definition at line 2655 of file symtab.h.

References p.

Referenced by persistent_varref(), and symbol_table::symbol_record::symbol_record_rep::varref().

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

Definition at line 2663 of file symtab.h.

References p.

Referenced by persistent_varval().

void symbol_table::do_pop_context ( void  )
inlineprivate

Definition at line 2700 of file symtab.h.

References p.

Referenced by pop_context().

void symbol_table::do_push_context ( void  )
inlineprivate

Definition at line 2694 of file symtab.h.

References p.

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 2870 of file symtab.h.

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

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 2588 of file symtab.h.

References p, and 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 2893 of file symtab.h.

References p, and retval.

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 2621 of file symtab.h.

References p, and 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 2636 of file symtab.h.

References octave_value(), and p.

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 1422 of file symtab.cc.

References fcn_table, and p.

Referenced by F__dump_symtab_info__().

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

Definition at line 1402 of file symtab.cc.

References octave_value::dump(), global_table, nm, p, string, and val.

Referenced by dump(), and F__dump_symtab_info__().

static scope_id symbol_table::dup_scope ( scope_id  scope)
inlinestatic

Definition at line 1247 of file symtab.h.

References do_dup_scope(), and retval.

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

static void symbol_table::erase_persistent ( const std::string name,
scope_id  scope = xcurrent_scope 
)
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 1233 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
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
static octave_value symbol_table::find_cmdline_function ( const std::string name)
inlinestatic

Definition at line 1558 of file symtab.h.

References octave_value(), and p.

Referenced by F__get_cmdline_fcn_txt__(), and symbol_exist().

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
octave_value symbol_table::find_submethod ( const std::string name,
const std::string dispatch_type 
)
static
static symbol_record symbol_table::find_symbol ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1278 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 1355 of file symtab.h.

References context, and value().

Referenced by 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 1365 of file symtab.h.

References context, and do_varref().

static void symbol_table::free_scope ( scope_id  scope)
inlinestatic

Definition at line 2273 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 1893 of file symtab.h.

References symbol_table::fcn_info::get_dispatch(), p, and retval.

Referenced by F__dispatch__().

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

Definition at line 2554 of file symtab.h.

References p.

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,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1998 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 2031 of file symtab.h.

References glob_match::match(), p, and retval.

Referenced by do_who().

static std::list<symbol_record> symbol_table::glob_variables ( const std::string pattern,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 2014 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 2076 of file symtab.h.

References Array< T >::numel(), retval, and tmp.

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

Definition at line 1383 of file symtab.h.

References p, and value().

Referenced by install_loaded_variable().

static scope_id symbol_table::global_scope ( void  )
inlinestatic

Definition at line 1160 of file symtab.h.

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

Definition at line 2126 of file symtab.h.

References p, and retval.

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

Definition at line 1397 of file symtab.h.

References p.

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 1909 of file symtab.h.

References symbol_table::fcn_info::help_for_dispatch(), p, retval, and string.

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

Definition at line 1287 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

Definition at line 1312 of file symtab.h.

References do_insert(), and dummy_symbol_record.

Referenced by symbol_table::symbol_reference::update().

void symbol_table::insert_symbol_record ( const symbol_record sr)
inlineprivate

Definition at line 2506 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 1623 of file symtab.h.

References symbol_table::fcn_info::install_user_function(), name, and p.

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

Definition at line 1487 of file symtab.h.

References octave_value::is_defined(), and val.

Referenced by load_path::loader::add_to_fcn_map(), and symbol_exist().

static bool symbol_table::is_global ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic
static bool symbol_table::is_local_variable ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 2191 of file symtab.h.

References do_is_local_variable().

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

Definition at line 1155 of file symtab.cc.

References class_precedence_table, and p.

Referenced by get_dispatch_type(), and set_class_relationship().

static bool symbol_table::is_variable ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1478 of file symtab.h.

References do_is_variable().

Referenced by do_who(), and save_vars().

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

Definition at line 2239 of file symtab.h.

References p.

Referenced by octave_user_function::lock_subfunctions().

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

Definition at line 2932 of file symtab.h.

References look_nonlocal(), and p.

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

static void symbol_table::mark_automatic ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1957 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,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1975 of file symtab.h.

References do_mark_global().

Referenced by install_loaded_variable().

static void symbol_table::mark_hidden ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 1966 of file symtab.h.

References do_mark_hidden().

Referenced by octave_user_function::bind_automatic_vars().

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

Definition at line 1240 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,
scope_id  scope,
const octave_value value = octave_value () 
)
inlinestatic

Definition at line 1436 of file symtab.h.

References do_persistent_assign(), and value().

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

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

Definition at line 1446 of file symtab.h.

References value().

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

Definition at line 1454 of file symtab.h.

References do_persistent_varref().

static octave_value symbol_table::persistent_varval ( const std::string name,
scope_id  scope = xcurrent_scope 
)
inlinestatic
static void symbol_table::pop_context ( scope_id  scope)
inlinestatic

Definition at line 1940 of file symtab.h.

References do_pop_context(), and error().

static void symbol_table::pop_context ( void  )
inlinestatic

Definition at line 1951 of file symtab.h.

References pop_context().

Referenced by octave_user_function::do_multi_index_op(), and pop_context().

static void symbol_table::pop_context ( void *  )
inlinestatic

Definition at line 1955 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 1881 of file symtab.h.

References p, and symbol_table::fcn_info::print_dispatch().

Referenced by F__dispatch__().

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

Definition at line 1925 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,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 2006 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 2054 of file symtab.h.

References octave::regexp::is_match(), p, and retval.

Referenced by do_who().

static std::list<symbol_record> symbol_table::regexp_variables ( const std::string pattern,
scope_id  scope = xcurrent_scope 
)
inlinestatic

Definition at line 2022 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 2093 of file symtab.h.

References Array< T >::numel(), retval, and tmp.

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

Definition at line 1320 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 1272 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 1127 of file symtab.cc.

References class_precedence_table, and is_superiorto().

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

Definition at line 2322 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 2254 of file symtab.h.

References nm, p, retval, string, and tmp.

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 1414 of file symtab.h.

References value().

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

Definition at line 2139 of file symtab.h.

References do_variable_names().

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

Definition at line 1422 of file symtab.h.

References do_varref().

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

Definition at line 1430 of file symtab.h.

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

Definition at line 2246 of file symtab.h.

References p.

Referenced by octave_user_function::unlock_subfunctions().

static void symbol_table::update_nest ( scope_id  scope)
inlinestatic

Definition at line 1616 of file symtab.h.

References do_update_nest().

Referenced by octave::base_parser::finish_function().

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

Definition at line 2109 of file symtab.h.

References p, and retval.

static std::list<std::string> symbol_table::variable_names ( scope_id  scope = xcurrent_scope)
inlinestatic

Definition at line 2146 of file symtab.h.

References do_variable_names().

Referenced by 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 1344 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 ( scope_id  scope = xcurrent_scope)
inlinestatic

Member Data Documentation

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

Definition at line 2402 of file symtab.h.

Referenced by cleanup().

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

Definition at line 2410 of file symtab.h.

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

octave_user_function* symbol_table::curr_fcn
private
octave_value symbol_table::dummy_octave_value
static

Definition at line 52 of file symtab.h.

symbol_table::symbol_record symbol_table::dummy_symbol_record
static

Definition at line 657 of file symtab.h.

Referenced by insert().

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 2399 of file symtab.h.

scope_id symbol_table::my_scope
private

Definition at line 2371 of file symtab.h.

Referenced by do_dup_scope().

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

Definition at line 2381 of file symtab.h.

Referenced by do_update_nest().

symbol_table* symbol_table::nest_parent
private

Definition at line 2384 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 2418 of file symtab.h.

Referenced by cleanup().

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

Definition at line 2396 of file symtab.h.

Referenced by do_dump().

bool symbol_table::static_workspace
private

Definition at line 2390 of file symtab.h.

Referenced by do_update_nest().

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

Definition at line 2378 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 2375 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 2432 of file symtab.h.

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

Definition at line 2425 of file symtab.h.

Referenced by dump().

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

Definition at line 2426 of file symtab.h.

Referenced by find_function(), and find_submethod().


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