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

#include "symtab.h"

Collaboration diagram for octave::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)
 
void assign (const std::string &name, const octave_value &value, bool)
 
void assign (const std::string &name, const octave_value &value=octave_value())
 
bool at_top_level (void)
 
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_all (bool force=false)
 
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_global (const std::string &name)
 
void clear_global_pattern (const std::string &pattern)
 
void clear_mex_functions (void)
 
void clear_symbol (const std::string &name)
 
void clear_symbol_pattern (const std::string &pattern)
 
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 global_assign (const std::string &name, const octave_value &value=octave_value())
 
std::list< std::string > global_variable_names (void)
 
octave_value global_varval (const std::string &name) const
 
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)
 
void top_level_assign (const std::string &name, const octave_value &value=octave_value())
 
std::list< std::string > top_level_variable_names (void)
 
octave_value top_level_varval (const std::string &name) const
 
std::list< std::string > user_function_names (void)
 
std::list< std::string > variable_names (void)
 
octave_value varval (const std::string &name) const
 

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 octave::symbol_table::class_precedence_table_const_iterator
private

Definition at line 270 of file symtab.h.

◆ class_precedence_table_iterator

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

Definition at line 272 of file symtab.h.

◆ const_parent_map_iterator

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

Definition at line 278 of file symtab.h.

◆ fcn_info

Definition at line 59 of file symtab.h.

◆ fcn_table_const_iterator

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

Definition at line 255 of file symtab.h.

◆ fcn_table_iterator

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

Definition at line 257 of file symtab.h.

◆ global_symbols_const_iterator

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

Definition at line 250 of file symtab.h.

◆ global_symbols_iterator

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

Definition at line 252 of file symtab.h.

◆ parent_map_iterator

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

Definition at line 280 of file symtab.h.

◆ scope

Definition at line 58 of file symtab.h.

Constructor & Destructor Documentation

◆ symbol_table() [1/2]

octave::symbol_table::symbol_table ( interpreter interp)

Definition at line 53 of file symtab.cc.

References install_builtins().

◆ symbol_table() [2/2]

octave::symbol_table::symbol_table ( const symbol_table )
delete

◆ ~symbol_table()

octave::symbol_table::~symbol_table ( void  )
default

Member Function Documentation

◆ add_to_parent_map()

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

Definition at line 663 of file symtab.cc.

References m_parent_map.

Referenced by octave_class::octave_class().

◆ alias_built_in_function()

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

◆ assign() [1/2]

void octave::symbol_table::assign ( const std::string &  name,
const octave_value value,
bool   
)

◆ assign() [2/2]

void octave::symbol_table::assign ( const std::string &  name,
const octave_value value = octave_value () 
)

Definition at line 768 of file symtab.cc.

References octave::interpreter::assign(), m_interpreter, and name.

◆ at_top_level()

bool octave::symbol_table::at_top_level ( void  )

Definition at line 726 of file symtab.cc.

References octave::interpreter::at_top_level(), and m_interpreter.

◆ built_in_function_names()

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

◆ builtin_find()

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

◆ cleanup()

void octave::symbol_table::cleanup ( void  )

◆ clear_all()

void octave::symbol_table::clear_all ( bool  force = false)

Definition at line 774 of file symtab.cc.

References octave::interpreter::clear_all(), and m_interpreter.

◆ clear_dld_function()

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

◆ clear_function()

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

◆ clear_function_pattern()

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

◆ clear_function_regexp()

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

◆ clear_functions()

void octave::symbol_table::clear_functions ( bool  force = false)

◆ clear_global()

void octave::symbol_table::clear_global ( const std::string &  name)

Definition at line 780 of file symtab.cc.

References octave::interpreter::clear_global_variable(), m_interpreter, and name.

◆ clear_global_pattern()

void octave::symbol_table::clear_global_pattern ( const std::string &  pattern)

◆ clear_mex_functions()

void octave::symbol_table::clear_mex_functions ( void  )

Definition at line 498 of file symtab.cc.

References m_fcn_table.

Referenced by octave::interpreter::shutdown().

◆ clear_symbol()

void octave::symbol_table::clear_symbol ( const std::string &  name)

Definition at line 792 of file symtab.cc.

References octave::interpreter::clear_symbol(), m_interpreter, and name.

◆ clear_symbol_pattern()

void octave::symbol_table::clear_symbol_pattern ( const std::string &  pattern)

Definition at line 798 of file symtab.cc.

References octave::interpreter::clear_symbol_pattern(), and m_interpreter.

◆ clear_user_function()

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

◆ cmdline_function_names()

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

Definition at line 615 of file symtab.cc.

References octave_value::is_defined(), m_fcn_table, retval, and Array< T >::sort().

◆ current_scope()

symbol_scope octave::symbol_table::current_scope ( void  ) const

◆ dump()

octave_value octave::symbol_table::dump ( void  ) const

◆ dump_fcn_table_map()

octave_value octave::symbol_table::dump_fcn_table_map ( void  ) const
private

Definition at line 708 of file symtab.cc.

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

Referenced by dump().

◆ fcn_table_find()

octave_value octave::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 octave::symbol_table::find_autoload ( const std::string &  name)

◆ find_built_in_function()

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

◆ find_cmdline_function()

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

◆ find_function() [1/2]

octave_value octave::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(), name, and octave_value().

◆ find_function() [2/2]

◆ find_method()

◆ find_private_function()

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

◆ find_scoped_function()

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

◆ find_user_function()

◆ get_fcn_info()

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

Definition at line 702 of file symtab.cc.

References m_fcn_table, and name.

Referenced by F__dump_symtab_info__().

◆ global_assign()

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

Definition at line 804 of file symtab.cc.

References octave::interpreter::global_assign(), m_interpreter, and name.

◆ global_variable_names()

std::list< std::string > octave::symbol_table::global_variable_names ( void  )

Definition at line 750 of file symtab.cc.

References octave::interpreter::global_variable_names(), and m_interpreter.

◆ global_varval()

octave_value octave::symbol_table::global_varval ( const std::string &  name) const

Definition at line 738 of file symtab.cc.

References octave::interpreter::global_varval(), m_interpreter, and name.

◆ install_built_in_dispatch()

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

Definition at line 566 of file symtab.cc.

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

◆ install_built_in_function()

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

◆ install_builtins()

void octave::symbol_table::install_builtins ( void  )
private

Referenced by symbol_table().

◆ install_cmdline_function()

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

◆ install_local_function()

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

◆ install_user_function()

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

Definition at line 378 of file symtab.cc.

References octave::fcn_info::install_user_function(), m_fcn_table, and name.

◆ is_built_in_function_name()

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

◆ is_superiorto()

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

◆ operator=()

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

◆ parent_classes()

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

◆ set_class_relationship()

bool octave::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().

◆ top_level_assign()

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

Definition at line 811 of file symtab.cc.

References m_interpreter, name, and octave::interpreter::top_level_assign().

◆ top_level_variable_names()

std::list< std::string > octave::symbol_table::top_level_variable_names ( void  )

Definition at line 756 of file symtab.cc.

References m_interpreter, and octave::interpreter::top_level_variable_names().

◆ top_level_varval()

octave_value octave::symbol_table::top_level_varval ( const std::string &  name) const

Definition at line 744 of file symtab.cc.

References m_interpreter, name, and octave::interpreter::top_level_varval().

◆ user_function_names()

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

Definition at line 581 of file symtab.cc.

References m_fcn_table, retval, and Array< T >::sort().

Referenced by octave::interpreter::user_function_names().

◆ variable_names()

std::list< std::string > octave::symbol_table::variable_names ( void  )

Definition at line 762 of file symtab.cc.

References m_interpreter, and octave::interpreter::variable_names().

◆ varval()

octave_value octave::symbol_table::varval ( const std::string &  name) const

Definition at line 732 of file symtab.cc.

References m_interpreter, name, and octave::interpreter::varval().

Member Data Documentation

◆ m_class_precedence_table

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

Definition at line 267 of file symtab.h.

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

◆ m_fcn_table

◆ m_interpreter

◆ m_parent_map

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

Definition at line 275 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: