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

#include "symtab.h"

Collaboration diagram for symbol_table:

Public Types

typedef octave::fcn_info fcn_info
 
typedef octave::symbol_scope scope
 

Public Member Functions

 symbol_table (const symbol_table &)=delete
 
 symbol_table (interpreter &interp)
 
 ~symbol_table (void)=default
 
void add_to_parent_map (const std::string &classname, const std::list< std::string > &parent_list)
 
void alias_built_in_function (const std::string &alias, const std::string &name)
 
std::list< std::string > built_in_function_names (void)
 
octave_value builtin_find (const std::string &name, const symbol_scope &search_scope=symbol_scope())
 
void cleanup (void)
 
void clear_dld_function (const std::string &name)
 
void clear_function (const std::string &name)
 
void clear_function_pattern (const std::string &pat)
 
void clear_function_regexp (const std::string &pat)
 
void clear_functions (bool force=false)
 
void clear_mex_functions (void)
 
void clear_user_function (const std::string &name)
 
std::list< std::string > cmdline_function_names (void)
 
symbol_scope current_scope (void) const
 
octave_value dump (void) const
 
octave_value fcn_table_find (const std::string &name, const octave_value_list &args=ovl(), const symbol_scope &search_scope=symbol_scope())
 
octave_value find_autoload (const std::string &name)
 
octave_value find_built_in_function (const std::string &name)
 
octave_value find_cmdline_function (const std::string &name)
 
octave_value find_function (const std::string &name, const octave_value_list &args, const symbol_scope &search_scope=symbol_scope())
 
octave_value find_function (const std::string &name, const symbol_scope &search_scope=symbol_scope())
 
octave_value find_method (const std::string &name, const std::string &dispatch_type)
 
octave_value find_private_function (const std::string &dir_name, const std::string &name)
 
octave_value find_scoped_function (const std::string &name, const symbol_scope &search_scope)
 
octave_value find_user_function (const std::string &name)
 
fcn_infoget_fcn_info (const std::string &name)
 
void install_built_in_dispatch (const std::string &name, const std::string &klass)
 
void install_built_in_function (const std::string &name, const octave_value &fcn)
 
void install_cmdline_function (const std::string &name, const octave_value &fcn)
 
void install_local_function (const std::string &name, const octave_value &fcn, const std::string &file_name)
 
void install_user_function (const std::string &name, const octave_value &fcn)
 
bool is_built_in_function_name (const std::string &name)
 
bool is_superiorto (const std::string &a, const std::string &b)
 
symbol_tableoperator= (const symbol_table &)=delete
 
std::list< std::string > parent_classes (const std::string &dispatch_type)
 
bool set_class_relationship (const std::string &sup_class, const std::string &inf_class)
 
std::list< std::string > user_function_names (void)
 

Private Types

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_symbols_const_iterator
 
typedef std::map< std::string, octave_value >::iterator global_symbols_iterator
 
typedef std::map< std::string, std::list< std::string > >::iterator parent_map_iterator
 

Private Member Functions

octave_value dump_fcn_table_map (void) const
 
void install_builtins (void)
 

Private Attributes

std::map< std::string, std::set< std::string > > m_class_precedence_table
 
std::map< std::string, fcn_infom_fcn_table
 
interpreterm_interpreter
 
std::map< std::string, std::list< std::string > > m_parent_map
 

Detailed Description

Definition at line 53 of file symtab.h.

Member Typedef Documentation

◆ class_precedence_table_const_iterator

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

Definition at line 213 of file symtab.h.

◆ class_precedence_table_iterator

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

Definition at line 215 of file symtab.h.

◆ const_parent_map_iterator

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

Definition at line 221 of file symtab.h.

◆ fcn_info

typedef octave::fcn_info symbol_table::fcn_info

Definition at line 59 of file symtab.h.

◆ fcn_table_const_iterator

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

Definition at line 198 of file symtab.h.

◆ fcn_table_iterator

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

Definition at line 200 of file symtab.h.

◆ global_symbols_const_iterator

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

Definition at line 193 of file symtab.h.

◆ global_symbols_iterator

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

Definition at line 195 of file symtab.h.

◆ parent_map_iterator

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

Definition at line 223 of file symtab.h.

◆ scope

typedef octave::symbol_scope symbol_table::scope

Definition at line 58 of file symtab.h.

Constructor & Destructor Documentation

◆ symbol_table() [1/2]

symbol_table::symbol_table ( interpreter interp)

Definition at line 53 of file symtab.cc.

◆ symbol_table() [2/2]

symbol_table::symbol_table ( const symbol_table )
delete

◆ ~symbol_table()

symbol_table::~symbol_table ( void  )
default

Member Function Documentation

◆ add_to_parent_map()

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

Definition at line 664 of file symtab.cc.

References m_parent_map.

◆ alias_built_in_function()

void symbol_table::alias_built_in_function ( const std::string &  alias,
const std::string &  name 
)

◆ built_in_function_names()

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

◆ builtin_find()

octave_value symbol_table::builtin_find ( const std::string &  name,
const symbol_scope search_scope = symbol_scope () 
)

◆ cleanup()

void symbol_table::cleanup ( void  )

Definition at line 694 of file symtab.cc.

References clear_functions(), m_class_precedence_table, m_fcn_table, and m_parent_map.

Referenced by interpreter::shutdown().

◆ clear_dld_function()

void symbol_table::clear_dld_function ( const std::string &  name)

◆ clear_function()

void symbol_table::clear_function ( const std::string &  name)

◆ clear_function_pattern()

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

◆ clear_function_regexp()

void symbol_table::clear_function_regexp ( const std::string &  pat)

◆ clear_functions()

void symbol_table::clear_functions ( bool  force = false)

Definition at line 426 of file symtab.cc.

References m_fcn_table.

Referenced by cleanup(), tree_evaluator::clear_all(), and interpreter::clear_functions().

◆ clear_mex_functions()

void symbol_table::clear_mex_functions ( void  )

Definition at line 498 of file symtab.cc.

References m_fcn_table.

Referenced by interpreter::shutdown().

◆ clear_user_function()

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

◆ cmdline_function_names()

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

Definition at line 615 of file symtab.cc.

References octave_value::is_defined(), m_fcn_table, and octave_value::sort().

◆ current_scope()

symbol_scope symbol_table::current_scope ( void  ) const

◆ dump()

octave_value symbol_table::dump ( void  ) const

◆ dump_fcn_table_map()

octave_value symbol_table::dump_fcn_table_map ( void  ) const
private

Definition at line 709 of file symtab.cc.

References fcn_info::dump(), m_fcn_table, and octave_value().

Referenced by dump().

◆ fcn_table_find()

octave_value symbol_table::fcn_table_find ( const std::string &  name,
const octave_value_list args = ovl (),
const symbol_scope search_scope = symbol_scope () 
)

◆ find_autoload()

octave_value symbol_table::find_autoload ( const std::string &  name)

◆ find_built_in_function()

octave_value symbol_table::find_built_in_function ( const std::string &  name)

◆ find_cmdline_function()

octave_value symbol_table::find_cmdline_function ( const std::string &  name)

◆ find_function() [1/2]

octave_value symbol_table::find_function ( const std::string &  name,
const octave_value_list args,
const symbol_scope search_scope = symbol_scope () 
)

Definition at line 277 of file symtab.cc.

References fcn_table_find(), and octave_value().

◆ find_function() [2/2]

◆ find_method()

octave_value symbol_table::find_method ( const std::string &  name,
const std::string &  dispatch_type 
)

◆ find_private_function()

octave_value symbol_table::find_private_function ( const std::string &  dir_name,
const std::string &  name 
)

◆ find_scoped_function()

octave_value symbol_table::find_scoped_function ( const std::string &  name,
const symbol_scope search_scope 
)

◆ find_user_function()

◆ get_fcn_info()

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

Definition at line 703 of file symtab.cc.

References m_fcn_table.

Referenced by F__dump_symtab_info__().

◆ install_built_in_dispatch()

void symbol_table::install_built_in_dispatch ( const std::string &  name,
const std::string &  klass 
)

Definition at line 566 of file symtab.cc.

References error(), fcn_info::install_built_in_dispatch(), and m_fcn_table.

◆ install_built_in_function()

void symbol_table::install_built_in_function ( const std::string &  name,
const octave_value fcn 
)

◆ install_builtins()

void symbol_table::install_builtins ( void  )
private

◆ install_cmdline_function()

void symbol_table::install_cmdline_function ( const std::string &  name,
const octave_value fcn 
)

Definition at line 332 of file symtab.cc.

References fcn_info::install_cmdline_function(), and m_fcn_table.

Referenced by tree_evaluator::visit_function_def().

◆ install_local_function()

void symbol_table::install_local_function ( const std::string &  name,
const octave_value fcn,
const std::string &  file_name 
)

Definition at line 356 of file symtab.cc.

References fcn_info::install_local_function(), and m_fcn_table.

Referenced by base_parser::finish_classdef_file().

◆ install_user_function()

void symbol_table::install_user_function ( const std::string &  name,
const octave_value fcn 
)

Definition at line 378 of file symtab.cc.

References fcn_info::install_user_function(), and m_fcn_table.

◆ is_built_in_function_name()

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

◆ is_superiorto()

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

Definition at line 537 of file symtab.cc.

References m_class_precedence_table.

Referenced by get_dispatch_type(), and set_class_relationship().

◆ operator=()

symbol_table& symbol_table::operator= ( const symbol_table )
delete

◆ parent_classes()

std::list< std::string > symbol_table::parent_classes ( const std::string &  dispatch_type)

Definition at line 670 of file symtab.cc.

References m_parent_map.

Referenced by fcn_info::fcn_info_rep::load_class_method(), and out_of_date_check().

◆ set_class_relationship()

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

Definition at line 510 of file symtab.cc.

References is_superiorto(), and m_class_precedence_table.

Referenced by Finferiorto(), and Fsuperiorto().

◆ user_function_names()

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

Definition at line 581 of file symtab.cc.

References m_fcn_table.

Referenced by interpreter::user_function_names().

Member Data Documentation

◆ m_class_precedence_table

std::map<std::string, std::set<std::string> > symbol_table::m_class_precedence_table
private

Definition at line 210 of file symtab.h.

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

◆ m_fcn_table

◆ m_interpreter

interpreter& symbol_table::m_interpreter
private

Definition at line 190 of file symtab.h.

Referenced by current_scope().

◆ m_parent_map

std::map<std::string, std::list<std::string> > symbol_table::m_parent_map
private

Definition at line 218 of file symtab.h.

Referenced by add_to_parent_map(), cleanup(), dump(), and parent_classes().


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