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

#include "symtab.h"

Public Types

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

Public Member Functions

 symbol_table (interpreter &interp)
 
 ~symbol_table ()=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 ()
 
octave_value builtin_find (const std::string &name, const symbol_scope &search_scope=symbol_scope::invalid())
 
void cleanup ()
 
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 clear_user_function (const std::string &name)
 
std::list< std::string > cmdline_function_names ()
 
symbol_scope current_scope () const
 
octave_value dump () const
 
octave_value fcn_table_find (const std::string &name, const octave_value_list &args=ovl(), const symbol_scope &search_scope=symbol_scope::invalid())
 
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::invalid())
 
octave_value find_function (const std::string &name, const symbol_scope &search_scope=symbol_scope::invalid())
 
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)
 
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 ()
 

Detailed Description

Definition at line 53 of file symtab.h.

Member Typedef Documentation

◆ fcn_info

typedef octave::fcn_info symbol_table::fcn_info

Definition at line 59 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()

symbol_table::symbol_table ( interpreter interp)

Definition at line 53 of file symtab.cc.

◆ ~symbol_table()

symbol_table::~symbol_table ( )
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 690 of file symtab.cc.

◆ 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 ( )

Definition at line 620 of file symtab.cc.

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

◆ builtin_find()

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

◆ cleanup()

void symbol_table::cleanup ( )

Definition at line 722 of file symtab.cc.

References clear_functions().

◆ clear_dld_function()

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

◆ clear_function()

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

Definition at line 446 of file symtab.cc.

References clear_user_function().

Referenced by interpreter::clear_function(), and tree_evaluator::clear_symbol().

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

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

◆ clear_mex_functions()

void symbol_table::clear_mex_functions ( )

Definition at line 515 of file symtab.cc.

◆ clear_user_function()

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

Definition at line 484 of file symtab.cc.

References fcn_info::clear_user_function().

Referenced by clear_function().

◆ cmdline_function_names()

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

Definition at line 639 of file symtab.cc.

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

◆ current_scope()

symbol_scope symbol_table::current_scope ( ) const

◆ dump()

octave_value symbol_table::dump ( ) const

Definition at line 678 of file symtab.cc.

References m.

Referenced by F__dump_symtab_info__().

◆ 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::invalid () 
)

◆ find_autoload()

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

Definition at line 172 of file symtab.cc.

References fcn_info::find_autoload(), octave_value::is_defined(), and octave_value().

◆ 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::invalid () 
)

Definition at line 282 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()

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

◆ get_fcn_info()

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

Definition at line 732 of file symtab.cc.

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

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

◆ install_built_in_function()

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

Definition at line 411 of file symtab.cc.

References fcn_info::install_built_in_function().

Referenced by install_dld_function(), and install_mex_function().

◆ install_cmdline_function()

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

Definition at line 339 of file symtab.cc.

References fcn_info::install_cmdline_function().

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

References fcn_info::install_local_function().

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

References fcn_info::install_user_function().

◆ is_built_in_function_name()

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

Definition at line 69 of file symtab.cc.

References find_built_in_function(), and octave_value::is_defined().

◆ is_superiorto()

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

Definition at line 556 of file symtab.cc.

Referenced by set_class_relationship().

◆ parent_classes()

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

Definition at line 697 of file symtab.cc.

◆ set_class_relationship()

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

Definition at line 528 of file symtab.cc.

References is_superiorto().

◆ user_function_names()

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

Definition at line 603 of file symtab.cc.

Referenced by interpreter::user_function_names().


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