C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
exprtk::symbol_table< T > Class Template Reference

#include <exprtk.hpp>

Collaboration diagram for exprtk::symbol_table< T >:
[legend]

Classes

struct  freefunc00
struct  freefunc01
struct  freefunc02
struct  freefunc03
struct  freefunc04
struct  freefunc05
struct  freefunc06
struct  freefunc07
struct  freefunc08
struct  freefunc09
struct  freefunc10
struct  freefunc11
struct  freefunc12
struct  freefunc13
struct  freefunc14
struct  freefunc15
struct  type_store
struct  control_block

Public Types

enum  symtab_mutability_type { e_unknown = 0 , e_mutable = 1 , e_immutable = 2 }
typedef T(* ff00_functor) ()
typedef T(* ff01_functor) (T)
typedef T(* ff02_functor) (T, T)
typedef T(* ff03_functor) (T, T, T)
typedef T(* ff04_functor) (T, T, T, T)
typedef T(* ff05_functor) (T, T, T, T, T)
typedef T(* ff06_functor) (T, T, T, T, T, T)
typedef T(* ff07_functor) (T, T, T, T, T, T, T)
typedef T(* ff08_functor) (T, T, T, T, T, T, T, T)
typedef T(* ff09_functor) (T, T, T, T, T, T, T, T, T)
typedef T(* ff10_functor) (T, T, T, T, T, T, T, T, T, T)
typedef T(* ff11_functor) (T, T, T, T, T, T, T, T, T, T, T)
typedef T(* ff12_functor) (T, T, T, T, T, T, T, T, T, T, T, T)
typedef T(* ff13_functor) (T, T, T, T, T, T, T, T, T, T, T, T, T)
typedef T(* ff14_functor) (T, T, T, T, T, T, T, T, T, T, T, T, T, T)
typedef T(* ff15_functor) (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)
typedef vector_holder_tvector_holder_ptr

Public Member Functions

 symbol_table (const symtab_mutability_type mutability=e_mutable)
 ~symbol_table ()
 symbol_table (const symbol_table< T > &st)
symbol_table< T > & operator= (const symbol_table< T > &st)
bool operator== (const symbol_table< T > &st) const
symtab_mutability_type mutability () const
void clear_variables (const bool delete_node=true)
void clear_functions ()
void clear_strings ()
void clear_vectors ()
void clear_local_constants ()
void clear ()
std::size_t variable_count () const
std::size_t stringvar_count () const
std::size_t function_count () const
std::size_t vector_count () const
variable_ptr get_variable (const std::string &variable_name) const
variable_ptr get_variable (const T &var_ref) const
stringvar_ptr get_stringvar (const std::string &string_name) const
stringvar_base< T > get_stringvar_base (const std::string &string_name) const
function_ptr get_function (const std::string &function_name) const
vararg_function_ptr get_vararg_function (const std::string &vararg_function_name) const
generic_function_ptr get_generic_function (const std::string &function_name) const
generic_function_ptr get_string_function (const std::string &function_name) const
generic_function_ptr get_overload_function (const std::string &function_name) const
vector_holder_ptr get_vector (const std::string &vector_name) const
T & variable_ref (const std::string &symbol_name)
std::string & stringvar_ref (const std::string &symbol_name)
bool is_constant_node (const std::string &symbol_name) const
bool is_constant_string (const std::string &symbol_name) const
bool create_variable (const std::string &variable_name, const T &value=T(0))
bool create_stringvar (const std::string &stringvar_name, const std::string &value=std::string(""))
bool add_variable (const std::string &variable_name, T &t, const bool is_constant=false)
bool add_constant (const std::string &constant_name, const T &value)
bool add_stringvar (const std::string &stringvar_name, std::string &s, const bool is_constant=false)
bool add_function (const std::string &function_name, function_t &function)
bool add_function (const std::string &vararg_function_name, vararg_function_t &vararg_function)
bool add_function (const std::string &function_name, generic_function_t &function)
bool add_function (const std::string &function_name, ff00_functor function)
bool add_function (const std::string &function_name, ff01_functor function)
bool add_function (const std::string &function_name, ff02_functor function)
bool add_function (const std::string &function_name, ff03_functor function)
bool add_function (const std::string &function_name, ff04_functor function)
bool add_function (const std::string &function_name, ff05_functor function)
bool add_function (const std::string &function_name, ff06_functor function)
bool add_function (const std::string &function_name, ff07_functor function)
bool add_function (const std::string &function_name, ff08_functor function)
bool add_function (const std::string &function_name, ff09_functor function)
bool add_function (const std::string &function_name, ff10_functor function)
bool add_function (const std::string &function_name, ff11_functor function)
bool add_function (const std::string &function_name, ff12_functor function)
bool add_function (const std::string &function_name, ff13_functor function)
bool add_function (const std::string &function_name, ff14_functor function)
bool add_function (const std::string &function_name, ff15_functor function)
bool add_reserved_function (const std::string &function_name, function_t &function)
bool add_reserved_function (const std::string &vararg_function_name, vararg_function_t &vararg_function)
bool add_reserved_function (const std::string &function_name, generic_function_t &function)
bool add_reserved_function (const std::string &function_name, ff00_functor function)
bool add_reserved_function (const std::string &function_name, ff01_functor function)
bool add_reserved_function (const std::string &function_name, ff02_functor function)
bool add_reserved_function (const std::string &function_name, ff03_functor function)
bool add_reserved_function (const std::string &function_name, ff04_functor function)
bool add_reserved_function (const std::string &function_name, ff05_functor function)
bool add_reserved_function (const std::string &function_name, ff06_functor function)
bool add_reserved_function (const std::string &function_name, ff07_functor function)
bool add_reserved_function (const std::string &function_name, ff08_functor function)
bool add_reserved_function (const std::string &function_name, ff09_functor function)
bool add_reserved_function (const std::string &function_name, ff10_functor function)
bool add_reserved_function (const std::string &function_name, ff11_functor function)
bool add_reserved_function (const std::string &function_name, ff12_functor function)
bool add_reserved_function (const std::string &function_name, ff13_functor function)
bool add_reserved_function (const std::string &function_name, ff14_functor function)
bool add_reserved_function (const std::string &function_name, ff15_functor function)
template<std::size_t N>
bool add_vector (const std::string &vector_name, T(&v)[N])
bool add_vector (const std::string &vector_name, T *v, const std::size_t &v_size)
template<typename Allocator>
bool add_vector (const std::string &vector_name, std::vector< T, Allocator > &v)
bool add_vector (const std::string &vector_name, exprtk::vector_view< T > &v)
bool remove_variable (const std::string &variable_name, const bool delete_node=true)
bool remove_stringvar (const std::string &string_name)
bool remove_function (const std::string &function_name)
bool remove_vararg_function (const std::string &vararg_function_name)
bool remove_vector (const std::string &vector_name)
bool add_constants ()
bool add_pi ()
bool add_epsilon ()
bool add_infinity ()
template<typename Package>
bool add_package (Package &package)
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t get_variable_list (Sequence< std::pair< std::string, T >, Allocator > &vlist) const
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t get_variable_list (Sequence< std::string, Allocator > &vlist) const
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t get_stringvar_list (Sequence< std::pair< std::string, std::string >, Allocator > &svlist) const
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t get_stringvar_list (Sequence< std::string, Allocator > &svlist) const
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t get_vector_list (Sequence< std::string, Allocator > &vec_list) const
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t get_function_list (Sequence< std::string, Allocator > &function_list) const
std::vector< std::string > get_function_list () const
bool symbol_exists (const std::string &symbol_name, const bool check_reserved_symb=true) const
bool is_variable (const std::string &variable_name) const
bool is_stringvar (const std::string &stringvar_name) const
bool is_conststr_stringvar (const std::string &symbol_name) const
bool is_function (const std::string &function_name) const
bool is_vararg_function (const std::string &vararg_function_name) const
bool is_vector (const std::string &vector_name) const
std::string get_variable_name (const expression_ptr &ptr) const
std::string get_vector_name (const vector_holder_ptr &ptr) const
std::string get_stringvar_name (const expression_ptr &ptr) const
std::string get_conststr_stringvar_name (const expression_ptr &ptr) const
bool valid () const
void load_from (const symbol_table< T > &st)
void load_variables_from (const symbol_table< T > &st)
void load_vectors_from (const symbol_table< T > &st)

Protected Types

typedef details::expression_node< T > * expression_ptr
typedef details::variable_node< T > variable_t
typedef details::vector_holder< T > vector_holder_t
typedef variable_tvariable_ptr
typedef details::stringvar_node< T > stringvar_t
typedef stringvar_tstringvar_ptr
typedef ifunction< T > function_t
typedef ivararg_function< T > vararg_function_t
typedef igeneric_function< T > generic_function_t
typedef function_tfunction_ptr
typedef vararg_function_tvararg_function_ptr
typedef generic_function_tgeneric_function_ptr

Static Protected Attributes

static const std::size_t lut_size = 256

Private Types

typedef control_block::st_data local_data_t

Private Member Functions

bool valid_symbol (const std::string &symbol, const bool check_reserved_symb=true) const
bool valid_function (const std::string &symbol) const
local_data_tlocal_data ()
const local_data_tlocal_data () const

Private Attributes

control_blockcontrol_block_

Friends

class parser< T >

Detailed Description

template<typename T>
class exprtk::symbol_table< T >

Definition at line 20089 of file exprtk.hpp.

Member Typedef Documentation

◆ expression_ptr

template<typename T>
typedef details::expression_node<T>* exprtk::symbol_table< T >::expression_ptr
protected

Definition at line 20678 of file exprtk.hpp.

◆ ff00_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff00_functor) ()

Definition at line 20100 of file exprtk.hpp.

◆ ff01_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff01_functor) (T)

Definition at line 20101 of file exprtk.hpp.

◆ ff02_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff02_functor) (T, T)

Definition at line 20102 of file exprtk.hpp.

◆ ff03_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff03_functor) (T, T, T)

Definition at line 20103 of file exprtk.hpp.

◆ ff04_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff04_functor) (T, T, T, T)

Definition at line 20104 of file exprtk.hpp.

◆ ff05_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff05_functor) (T, T, T, T, T)

Definition at line 20105 of file exprtk.hpp.

◆ ff06_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff06_functor) (T, T, T, T, T, T)

Definition at line 20106 of file exprtk.hpp.

◆ ff07_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff07_functor) (T, T, T, T, T, T, T)

Definition at line 20107 of file exprtk.hpp.

◆ ff08_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff08_functor) (T, T, T, T, T, T, T, T)

Definition at line 20108 of file exprtk.hpp.

◆ ff09_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff09_functor) (T, T, T, T, T, T, T, T, T)

Definition at line 20109 of file exprtk.hpp.

◆ ff10_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff10_functor) (T, T, T, T, T, T, T, T, T, T)

Definition at line 20110 of file exprtk.hpp.

◆ ff11_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff11_functor) (T, T, T, T, T, T, T, T, T, T, T)

Definition at line 20111 of file exprtk.hpp.

◆ ff12_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff12_functor) (T, T, T, T, T, T, T, T, T, T, T, T)

Definition at line 20112 of file exprtk.hpp.

◆ ff13_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff13_functor) (T, T, T, T, T, T, T, T, T, T, T, T, T)

Definition at line 20113 of file exprtk.hpp.

◆ ff14_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff14_functor) (T, T, T, T, T, T, T, T, T, T, T, T, T, T)

Definition at line 20114 of file exprtk.hpp.

◆ ff15_functor

template<typename T>
typedef T(* exprtk::symbol_table< T >::ff15_functor) (T, T, T, T, T, T, T, T, T, T, T, T, T, T, T)

Definition at line 20115 of file exprtk.hpp.

◆ function_ptr

template<typename T>
typedef function_t* exprtk::symbol_table< T >::function_ptr
protected

Definition at line 20689 of file exprtk.hpp.

◆ function_t

template<typename T>
typedef ifunction<T> exprtk::symbol_table< T >::function_t
protected

Definition at line 20686 of file exprtk.hpp.

◆ generic_function_ptr

template<typename T>
typedef generic_function_t* exprtk::symbol_table< T >::generic_function_ptr
protected

Definition at line 20691 of file exprtk.hpp.

◆ generic_function_t

template<typename T>
typedef igeneric_function<T> exprtk::symbol_table< T >::generic_function_t
protected

Definition at line 20688 of file exprtk.hpp.

◆ local_data_t

template<typename T>
typedef control_block::st_data exprtk::symbol_table< T >::local_data_t
private

Definition at line 21810 of file exprtk.hpp.

◆ stringvar_ptr

template<typename T>
typedef stringvar_t* exprtk::symbol_table< T >::stringvar_ptr
protected

Definition at line 20684 of file exprtk.hpp.

◆ stringvar_t

template<typename T>
typedef details::stringvar_node<T> exprtk::symbol_table< T >::stringvar_t
protected

Definition at line 20683 of file exprtk.hpp.

◆ vararg_function_ptr

template<typename T>
typedef vararg_function_t* exprtk::symbol_table< T >::vararg_function_ptr
protected

Definition at line 20690 of file exprtk.hpp.

◆ vararg_function_t

template<typename T>
typedef ivararg_function<T> exprtk::symbol_table< T >::vararg_function_t
protected

Definition at line 20687 of file exprtk.hpp.

◆ variable_ptr

template<typename T>
typedef variable_t* exprtk::symbol_table< T >::variable_ptr
protected

Definition at line 20681 of file exprtk.hpp.

◆ variable_t

template<typename T>
typedef details::variable_node<T> exprtk::symbol_table< T >::variable_t
protected

Definition at line 20679 of file exprtk.hpp.

◆ vector_holder_ptr

template<typename T>
typedef vector_holder_t* exprtk::symbol_table< T >::vector_holder_ptr

Definition at line 21023 of file exprtk.hpp.

◆ vector_holder_t

template<typename T>
typedef details::vector_holder<T> exprtk::symbol_table< T >::vector_holder_t
protected

Definition at line 20680 of file exprtk.hpp.

Member Enumeration Documentation

◆ symtab_mutability_type

Enumerator
e_unknown 
e_mutable 
e_immutable 

Definition at line 20093 of file exprtk.hpp.

20094 {
20095 e_unknown = 0,
20096 e_mutable = 1,
20097 e_immutable = 2
20098 };

Constructor & Destructor Documentation

◆ symbol_table() [1/2]

template<typename T>
exprtk::symbol_table< T >::symbol_table ( const symtab_mutability_type mutability = e_mutable)
inlineexplicit

Definition at line 20811 of file exprtk.hpp.

20813 {
20814 control_block_->set_mutability(mutability);
20815 clear();
20816 }
symtab_mutability_type mutability() const
Definition exprtk.hpp:20848
control_block * control_block_
Definition exprtk.hpp:21822
static control_block * create()
Definition exprtk.hpp:20774

References clear(), control_block_, e_mutable, and mutability().

Referenced by load_from(), load_variables_from(), load_vectors_from(), operator=(), operator==(), and symbol_table().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~symbol_table()

template<typename T>
exprtk::symbol_table< T >::~symbol_table ( )
inline

Definition at line 20818 of file exprtk.hpp.

20819 {
20820 exprtk::details::dump_ptr("~symbol_table", this);
20822 }
void dump_ptr(const std::string &, const void *)
Definition exprtk.hpp:5312
static void destroy(control_block *&cntrl_blck, SymTab *sym_tab)
Definition exprtk.hpp:20780

References control_block_, exprtk::symbol_table< T >::control_block::destroy(), and exprtk::details::dump_ptr().

Here is the call graph for this function:

◆ symbol_table() [2/2]

template<typename T>
exprtk::symbol_table< T >::symbol_table ( const symbol_table< T > & st)
inline

Definition at line 20824 of file exprtk.hpp.

20825 {
20827 control_block_->ref_count++;
20828 }

References control_block_, and symbol_table().

Here is the call graph for this function:

Member Function Documentation

◆ add_constant()

template<typename T>
bool exprtk::symbol_table< T >::add_constant ( const std::string & constant_name,
const T & value )
inline

Definition at line 21127 of file exprtk.hpp.

21128 {
21129 if (!valid())
21130 return false;
21131 else if (!valid_symbol(constant_name))
21132 return false;
21133 else if (symbol_exists(constant_name))
21134 return false;
21135
21136 local_data().local_symbol_list_.push_back(value);
21137 T& t = local_data().local_symbol_list_.back();
21138
21139 return add_variable(constant_name, t, true);
21140 }
bool valid_symbol(const std::string &symbol, const bool check_reserved_symb=true) const
Definition exprtk.hpp:21758
local_data_t & local_data()
Definition exprtk.hpp:21812
bool add_variable(const std::string &variable_name, T &t, const bool is_constant=false)
Definition exprtk.hpp:21115
bool valid() const
Definition exprtk.hpp:21640
bool symbol_exists(const std::string &symbol_name, const bool check_reserved_symb=true) const
Definition exprtk.hpp:21536

References add_variable(), local_data(), exprtk::symbol_table< T >::control_block::st_data::local_symbol_list_, symbol_exists(), valid(), and valid_symbol().

Referenced by add_epsilon(), add_infinity(), add_pi(), black_scholes_merton_model(), exprtk::compute(), exprtk::compute(), exprtk::compute(), and exprtk::parser< Type >::parse_symtab_symbol().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_constants()

template<typename T>
bool exprtk::symbol_table< T >::add_constants ( )
inline

Definition at line 21416 of file exprtk.hpp.

21417 {
21418 return add_pi () &&
21419 add_epsilon () &&
21420 add_infinity() ;
21421 }

References add_epsilon(), add_infinity(), and add_pi().

Referenced by exprtk::function_compositor< T >::compile_expression(), exprtk::compute(), exprtk::compute(), exprtk::compute(), exprtk::compute(), main(), main(), run_test04(), run_test05(), run_test09(), run_test10(), run_test14(), run_test15(), run_test16(), run_test17(), run_test18(), run_test20(), test_expression(), and test_gen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_epsilon()

template<typename T>
bool exprtk::symbol_table< T >::add_epsilon ( )
inline

Definition at line 21430 of file exprtk.hpp.

21431 {
21433 return add_constant("epsilon",local_epsilon);
21434 }
bool add_constant(const std::string &constant_name, const T &value)
Definition exprtk.hpp:21127

References add_constant().

Referenced by add_constants().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_function() [1/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff00_functor function )
inline

Definition at line 21226 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [2/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff01_functor function )
inline

Definition at line 21226 of file exprtk.hpp.

◆ add_function() [3/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff02_functor function )
inline

Definition at line 21227 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [4/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff03_functor function )
inline

Definition at line 21227 of file exprtk.hpp.

◆ add_function() [5/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff04_functor function )
inline

Definition at line 21228 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [6/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff05_functor function )
inline

Definition at line 21228 of file exprtk.hpp.

◆ add_function() [7/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff06_functor function )
inline

Definition at line 21229 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [8/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff07_functor function )
inline

Definition at line 21229 of file exprtk.hpp.

◆ add_function() [9/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff08_functor function )
inline

Definition at line 21230 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [10/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff09_functor function )
inline

Definition at line 21230 of file exprtk.hpp.

◆ add_function() [11/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff10_functor function )
inline

Definition at line 21231 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [12/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff11_functor function )
inline

Definition at line 21231 of file exprtk.hpp.

◆ add_function() [13/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff12_functor function )
inline

Definition at line 21232 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [14/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff13_functor function )
inline

Definition at line 21232 of file exprtk.hpp.

◆ add_function() [15/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff14_functor function )
inline

Definition at line 21233 of file exprtk.hpp.

References exprtk_define_freefunction.

◆ add_function() [16/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
ff15_functor function )
inline

Definition at line 21233 of file exprtk.hpp.

◆ add_function() [17/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
function_t & function )
inline

Definition at line 21156 of file exprtk.hpp.

21157 {
21158 if (!valid())
21159 return false;
21160 else if (!valid_symbol(function_name))
21161 return false;
21162 else if (symbol_exists(function_name))
21163 return false;
21164 else
21166 }
type_store< function_t, function_t > function_store
Definition exprtk.hpp:20701

References exprtk::symbol_table< T >::control_block::st_data::function_store, local_data(), symbol_exists(), valid(), and valid_symbol().

Referenced by black_scholes_merton_model(), extract_expression_dependents(), exprtk::function_compositor< T >::forward(), load_from(), run_test09(), run_test10(), run_test12(), run_test14(), run_test16(), run_test18(), test_expression(), test_gen(), and vector_randu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_function() [18/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & function_name,
generic_function_t & function )
inline

Definition at line 21180 of file exprtk.hpp.

21181 {
21182 if (!valid())
21183 return false;
21184 else if (!valid_symbol(function_name))
21185 return false;
21186 else if (symbol_exists(function_name))
21187 return false;
21188 else
21189 {
21190 switch (function.rtrn_type)
21191 {
21193 return (std::string::npos == function.parameter_sequence.find_first_not_of("STVZ*?|")) ?
21195
21197 return (std::string::npos == function.parameter_sequence.find_first_not_of("STVZ*?|")) ?
21199
21201 return (std::string::npos == function.parameter_sequence.find_first_not_of("STVZ*?|:")) ?
21203 }
21204 }
21205
21206 return false;
21207 }
type_store< generic_function_t, generic_function_t > string_function_store
Definition exprtk.hpp:20704
type_store< generic_function_t, generic_function_t > overload_function_store
Definition exprtk.hpp:20705
type_store< generic_function_t, generic_function_t > generic_function_store
Definition exprtk.hpp:20703

References exprtk::igeneric_function< T >::e_rtrn_overload, exprtk::igeneric_function< T >::e_rtrn_scalar, exprtk::igeneric_function< T >::e_rtrn_string, exprtk::symbol_table< T >::control_block::st_data::generic_function_store, local_data(), exprtk::symbol_table< T >::control_block::st_data::overload_function_store, exprtk::igeneric_function< T >::parameter_sequence, exprtk::igeneric_function< T >::rtrn_type, exprtk::symbol_table< T >::control_block::st_data::string_function_store, symbol_exists(), valid(), and valid_symbol().

Here is the call graph for this function:

◆ add_function() [19/19]

template<typename T>
bool exprtk::symbol_table< T >::add_function ( const std::string & vararg_function_name,
vararg_function_t & vararg_function )
inline

Definition at line 21168 of file exprtk.hpp.

21169 {
21170 if (!valid())
21171 return false;
21173 return false;
21175 return false;
21176 else
21178 }
type_store< vararg_function_t, vararg_function_t > vararg_function_store
Definition exprtk.hpp:20702

References local_data(), symbol_exists(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vararg_function_store.

Here is the call graph for this function:

◆ add_infinity()

template<typename T>
bool exprtk::symbol_table< T >::add_infinity ( )
inline

Definition at line 21436 of file exprtk.hpp.

21437 {
21439 return add_constant("inf",local_infinity);
21440 }

References add_constant().

Referenced by add_constants().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_package()

template<typename T>
template<typename Package>
bool exprtk::symbol_table< T >::add_package ( Package & package)
inline

Definition at line 21443 of file exprtk.hpp.

21444 {
21445 return package.register_package(*this);
21446 }

Referenced by import_packages< T >::import_packages(), and run_test14().

Here is the caller graph for this function:

◆ add_pi()

template<typename T>
bool exprtk::symbol_table< T >::add_pi ( )
inline

Definition at line 21423 of file exprtk.hpp.

References add_constant(), and exprtk::details::numeric::details::const_pi_impl().

Referenced by add_constants(), and run_test10().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_reserved_function() [1/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff00_functor function )
inline

Definition at line 21307 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [2/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff01_functor function )
inline

Definition at line 21307 of file exprtk.hpp.

◆ add_reserved_function() [3/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff02_functor function )
inline

Definition at line 21308 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [4/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff03_functor function )
inline

Definition at line 21308 of file exprtk.hpp.

◆ add_reserved_function() [5/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff04_functor function )
inline

Definition at line 21309 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [6/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff05_functor function )
inline

Definition at line 21309 of file exprtk.hpp.

◆ add_reserved_function() [7/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff06_functor function )
inline

Definition at line 21310 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [8/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff07_functor function )
inline

Definition at line 21310 of file exprtk.hpp.

◆ add_reserved_function() [9/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff08_functor function )
inline

Definition at line 21311 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [10/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff09_functor function )
inline

Definition at line 21311 of file exprtk.hpp.

◆ add_reserved_function() [11/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff10_functor function )
inline

Definition at line 21312 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [12/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff11_functor function )
inline

Definition at line 21312 of file exprtk.hpp.

◆ add_reserved_function() [13/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff12_functor function )
inline

Definition at line 21313 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [14/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff13_functor function )
inline

Definition at line 21313 of file exprtk.hpp.

◆ add_reserved_function() [15/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff14_functor function )
inline

Definition at line 21314 of file exprtk.hpp.

References exprtk_define_reserved_function.

◆ add_reserved_function() [16/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
ff15_functor function )
inline

Definition at line 21314 of file exprtk.hpp.

◆ add_reserved_function() [17/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
function_t & function )
inline

Definition at line 21237 of file exprtk.hpp.

21238 {
21239 if (!valid())
21240 return false;
21241 else if (!valid_symbol(function_name,false))
21242 return false;
21243 else if (symbol_exists(function_name,false))
21244 return false;
21245 else
21247 }

References exprtk::symbol_table< T >::control_block::st_data::function_store, local_data(), symbol_exists(), valid(), and valid_symbol().

Here is the call graph for this function:

◆ add_reserved_function() [18/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & function_name,
generic_function_t & function )
inline

Definition at line 21261 of file exprtk.hpp.

21262 {
21263 if (!valid())
21264 return false;
21265 else if (!valid_symbol(function_name,false))
21266 return false;
21267 else if (symbol_exists(function_name,false))
21268 return false;
21269 else
21270 {
21271 switch (function.rtrn_type)
21272 {
21274 return (std::string::npos == function.parameter_sequence.find_first_not_of("STVZ*?|")) ?
21276
21278 return (std::string::npos == function.parameter_sequence.find_first_not_of("STVZ*?|")) ?
21280
21282 return (std::string::npos == function.parameter_sequence.find_first_not_of("STVZ*?|:")) ?
21284 }
21285 }
21286
21287 return false;
21288 }

References exprtk::igeneric_function< T >::e_rtrn_overload, exprtk::igeneric_function< T >::e_rtrn_scalar, exprtk::igeneric_function< T >::e_rtrn_string, exprtk::symbol_table< T >::control_block::st_data::generic_function_store, local_data(), exprtk::symbol_table< T >::control_block::st_data::overload_function_store, exprtk::igeneric_function< T >::parameter_sequence, exprtk::igeneric_function< T >::rtrn_type, exprtk::symbol_table< T >::control_block::st_data::string_function_store, symbol_exists(), valid(), and valid_symbol().

Here is the call graph for this function:

◆ add_reserved_function() [19/19]

template<typename T>
bool exprtk::symbol_table< T >::add_reserved_function ( const std::string & vararg_function_name,
vararg_function_t & vararg_function )
inline

Definition at line 21249 of file exprtk.hpp.

21250 {
21251 if (!valid())
21252 return false;
21253 else if (!valid_symbol(vararg_function_name,false))
21254 return false;
21255 else if (symbol_exists(vararg_function_name,false))
21256 return false;
21257 else
21259 }

References local_data(), symbol_exists(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vararg_function_store.

Here is the call graph for this function:

◆ add_stringvar()

template<typename T>
bool exprtk::symbol_table< T >::add_stringvar ( const std::string & stringvar_name,
std::string & s,
const bool is_constant = false )
inline

Definition at line 21143 of file exprtk.hpp.

21144 {
21145 if (!valid())
21146 return false;
21147 else if (!valid_symbol(stringvar_name))
21148 return false;
21149 else if (symbol_exists(stringvar_name))
21150 return false;
21151 else
21153 }
type_store< stringvar_t, std::string > stringvar_store
Definition exprtk.hpp:20708

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, symbol_exists(), valid(), and valid_symbol().

Referenced by black_scholes_merton_model(), create_stringvar(), run_test02(), run_test10(), and run_test18().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_variable()

template<typename T>
bool exprtk::symbol_table< T >::add_variable ( const std::string & variable_name,
T & t,
const bool is_constant = false )
inline

Definition at line 21115 of file exprtk.hpp.

21116 {
21117 if (!valid())
21118 return false;
21119 else if (!valid_symbol(variable_name))
21120 return false;
21121 else if (symbol_exists(variable_name))
21122 return false;
21123 else
21125 }
type_store< variable_t, T > variable_store
Definition exprtk.hpp:20700

References local_data(), symbol_exists(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Referenced by add_constant(), black_scholes_merton_model(), create_variable(), load_variables_from(), main(), main(), run_test01(), run_test02(), run_test04(), run_test05(), run_test06(), run_test07(), run_test08(), run_test09(), run_test10(), run_test11(), run_test12(), run_test14(), run_test15(), run_test16(), run_test17(), run_test18(), and test_gen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_vector() [1/4]

template<typename T>
bool exprtk::symbol_table< T >::add_vector ( const std::string & vector_name,
exprtk::vector_view< T > & v )
inline

Definition at line 21360 of file exprtk.hpp.

21361 {
21362 if (!valid())
21363 return false;
21364 else if (!valid_symbol(vector_name))
21365 return false;
21366 else if (symbol_exists(vector_name))
21367 return false;
21368 else if (0 == v.size())
21369 return false;
21370 else
21371 return local_data().vector_store.add(vector_name,v);
21372 }
type_store< vector_holder_t, vector_holder_t > vector_store
Definition exprtk.hpp:20706

References local_data(), exprtk::vector_view< T >::size(), symbol_exists(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Here is the call graph for this function:

◆ add_vector() [2/4]

template<typename T>
template<typename Allocator>
bool exprtk::symbol_table< T >::add_vector ( const std::string & vector_name,
std::vector< T, Allocator > & v )
inline

Definition at line 21346 of file exprtk.hpp.

21347 {
21348 if (!valid())
21349 return false;
21350 else if (!valid_symbol(vector_name))
21351 return false;
21352 else if (symbol_exists(vector_name))
21353 return false;
21354 else if (0 == v.size())
21355 return false;
21356 else
21357 return local_data().vector_store.add(vector_name,v);
21358 }

References local_data(), symbol_exists(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Here is the call graph for this function:

◆ add_vector() [3/4]

template<typename T>
bool exprtk::symbol_table< T >::add_vector ( const std::string & vector_name,
T * v,
const std::size_t & v_size )
inline

Definition at line 21331 of file exprtk.hpp.

21332 {
21333 if (!valid())
21334 return false;
21335 else if (!valid_symbol(vector_name))
21336 return false;
21337 else if (symbol_exists(vector_name))
21338 return false;
21339 else if (0 == v_size)
21340 return false;
21341 else
21342 return local_data().vector_store.add(vector_name, v, v_size);
21343 }

References local_data(), symbol_exists(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Here is the call graph for this function:

◆ add_vector() [4/4]

template<typename T>
template<std::size_t N>
bool exprtk::symbol_table< T >::add_vector ( const std::string & vector_name,
T(&) v[N] )
inline

Definition at line 21319 of file exprtk.hpp.

21320 {
21321 if (!valid())
21322 return false;
21323 else if (!valid_symbol(vector_name))
21324 return false;
21325 else if (symbol_exists(vector_name))
21326 return false;
21327 else
21328 return local_data().vector_store.add(vector_name,v);
21329 }

References local_data(), symbol_exists(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Referenced by load_vectors_from(), exprtk::details::collector_helper< T >::resolve_as_vector::process(), run_test01(), run_test18(), and vector_randu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

template<typename T>
void exprtk::symbol_table< T >::clear ( )
inline

Definition at line 20880 of file exprtk.hpp.

20881 {
20882 if (!valid()) return;
20883 clear_variables ();
20884 clear_functions ();
20885 clear_strings ();
20886 clear_vectors ();
20888 }
void clear_variables(const bool delete_node=true)
Definition exprtk.hpp:20853

References clear_functions(), clear_local_constants(), clear_strings(), clear_variables(), clear_vectors(), and valid().

Referenced by run_test10(), and symbol_table().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_functions()

template<typename T>
void exprtk::symbol_table< T >::clear_functions ( )
inline

Definition at line 20858 of file exprtk.hpp.

20859 {
20860 local_data().function_store.clear();
20861 }

References exprtk::symbol_table< T >::control_block::st_data::function_store, and local_data().

Referenced by clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_local_constants()

template<typename T>
void exprtk::symbol_table< T >::clear_local_constants ( )
inline

Definition at line 20875 of file exprtk.hpp.

20876 {
20878 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::local_symbol_list_.

Referenced by clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_strings()

template<typename T>
void exprtk::symbol_table< T >::clear_strings ( )
inline

Definition at line 20863 of file exprtk.hpp.

20864 {
20865 #ifndef exprtk_disable_string_capabilities
20866 local_data().stringvar_store.clear();
20867 #endif
20868 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::stringvar_store.

Referenced by clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_variables()

template<typename T>
void exprtk::symbol_table< T >::clear_variables ( const bool delete_node = true)
inline

Definition at line 20853 of file exprtk.hpp.

20854 {
20856 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Referenced by clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_vectors()

template<typename T>
void exprtk::symbol_table< T >::clear_vectors ( )
inline

Definition at line 20870 of file exprtk.hpp.

20871 {
20872 local_data().vector_store.clear();
20873 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Referenced by clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_stringvar()

template<typename T>
bool exprtk::symbol_table< T >::create_stringvar ( const std::string & stringvar_name,
const std::string & value = std::string("") )
inline

Definition at line 21099 of file exprtk.hpp.

21100 {
21101 if (!valid())
21102 return false;
21103 else if (!valid_symbol(stringvar_name))
21104 return false;
21105 else if (symbol_exists(stringvar_name))
21106 return false;
21107
21110
21112 }
bool add_stringvar(const std::string &stringvar_name, std::string &s, const bool is_constant=false)
Definition exprtk.hpp:21143
std::list< std::string > local_stringvar_list_
Definition exprtk.hpp:20749

References add_stringvar(), local_data(), exprtk::symbol_table< T >::control_block::st_data::local_stringvar_list_, symbol_exists(), valid(), and valid_symbol().

Here is the call graph for this function:

◆ create_variable()

template<typename T>
bool exprtk::symbol_table< T >::create_variable ( const std::string & variable_name,
const T & value = T(0) )
inline

Definition at line 21083 of file exprtk.hpp.

21084 {
21085 if (!valid())
21086 return false;
21087 else if (!valid_symbol(variable_name))
21088 return false;
21089 else if (symbol_exists(variable_name))
21090 return false;
21091
21092 local_data().local_symbol_list_.push_back(value);
21093 T& t = local_data().local_symbol_list_.back();
21094
21096 }

References add_variable(), local_data(), exprtk::symbol_table< T >::control_block::st_data::local_symbol_list_, symbol_exists(), valid(), and valid_symbol().

Referenced by main(), and exprtk::parser< Type >::parse_symtab_symbol().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ function_count()

template<typename T>
std::size_t exprtk::symbol_table< T >::function_count ( ) const
inline

Definition at line 20908 of file exprtk.hpp.

20909 {
20910 if (valid())
20911 return local_data().function_store.size;
20912 else
20913 return 0;
20914 }

References exprtk::symbol_table< T >::control_block::st_data::function_store, local_data(), and valid().

Here is the call graph for this function:

◆ get_conststr_stringvar_name()

template<typename T>
std::string exprtk::symbol_table< T >::get_conststr_stringvar_name ( const expression_ptr & ptr) const
inline

Definition at line 21634 of file exprtk.hpp.

21635 {
21636 return local_data().stringvar_store.entity_name(ptr);
21637 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::stringvar_store.

Here is the call graph for this function:

◆ get_function()

template<typename T>
function_ptr exprtk::symbol_table< T >::get_function ( const std::string & function_name) const
inline

Definition at line 20973 of file exprtk.hpp.

20974 {
20975 if (!valid())
20976 return reinterpret_cast<function_ptr>(0);
20977 else if (!valid_symbol(function_name))
20978 return reinterpret_cast<function_ptr>(0);
20979 else
20981 }
function_t * function_ptr
Definition exprtk.hpp:20689

References exprtk::symbol_table< T >::control_block::st_data::function_store, local_data(), valid(), and valid_symbol().

Referenced by load_from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_function_list() [1/2]

template<typename T>
std::vector< std::string > exprtk::symbol_table< T >::get_function_list ( ) const
inline

Definition at line 21529 of file exprtk.hpp.

21530 {
21533 return result;
21534 }
std::vector< std::string > get_function_list() const
Definition exprtk.hpp:21529

References get_function_list().

Referenced by get_function_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_function_list() [2/2]

template<typename T>
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t exprtk::symbol_table< T >::get_function_list ( Sequence< std::string, Allocator > & function_list) const
inline

Definition at line 21502 of file exprtk.hpp.

21503 {
21504 if (!valid())
21505 return 0;
21506
21508 std::size_t count = 0;
21509
21515
21517
21518 for (std::size_t i = 0; i < function_names.size(); ++i)
21519 {
21520 function_set.insert(function_names[i]);
21521 }
21522
21523 std::copy(function_set.begin(), function_set.end(),
21525
21526 return count;
21527 }

References exprtk::symbol_table< T >::control_block::st_data::function_store, exprtk::symbol_table< T >::control_block::st_data::generic_function_store, local_data(), exprtk::symbol_table< T >::control_block::st_data::overload_function_store, exprtk::symbol_table< T >::control_block::st_data::string_function_store, valid(), and exprtk::symbol_table< T >::control_block::st_data::vararg_function_store.

Here is the call graph for this function:

◆ get_generic_function()

template<typename T>
generic_function_ptr exprtk::symbol_table< T >::get_generic_function ( const std::string & function_name) const
inline

Definition at line 20993 of file exprtk.hpp.

20994 {
20995 if (!valid())
20996 return reinterpret_cast<generic_function_ptr>(0);
20997 else if (!valid_symbol(function_name))
20998 return reinterpret_cast<generic_function_ptr>(0);
20999 else
21001 }
generic_function_t * generic_function_ptr
Definition exprtk.hpp:20691

References exprtk::symbol_table< T >::control_block::st_data::generic_function_store, local_data(), valid(), and valid_symbol().

Referenced by load_from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_overload_function()

template<typename T>
generic_function_ptr exprtk::symbol_table< T >::get_overload_function ( const std::string & function_name) const
inline

Definition at line 21013 of file exprtk.hpp.

21014 {
21015 if (!valid())
21016 return reinterpret_cast<generic_function_ptr>(0);
21017 else if (!valid_symbol(function_name))
21018 return reinterpret_cast<generic_function_ptr>(0);
21019 else
21021 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::overload_function_store, valid(), and valid_symbol().

Referenced by load_from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_string_function()

template<typename T>
generic_function_ptr exprtk::symbol_table< T >::get_string_function ( const std::string & function_name) const
inline

Definition at line 21003 of file exprtk.hpp.

21004 {
21005 if (!valid())
21006 return reinterpret_cast<generic_function_ptr>(0);
21007 else if (!valid_symbol(function_name))
21008 return reinterpret_cast<generic_function_ptr>(0);
21009 else
21011 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::string_function_store, valid(), and valid_symbol().

Referenced by load_from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_stringvar()

template<typename T>
stringvar_ptr exprtk::symbol_table< T >::get_stringvar ( const std::string & string_name) const
inline

Definition at line 20944 of file exprtk.hpp.

20945 {
20946 if (!valid())
20947 return reinterpret_cast<stringvar_ptr>(0);
20948 else if (!valid_symbol(string_name))
20949 return reinterpret_cast<stringvar_ptr>(0);
20950 else
20952 }
stringvar_t * stringvar_ptr
Definition exprtk.hpp:20684

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, valid(), and valid_symbol().

Referenced by run_test10().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_stringvar_base()

template<typename T>
stringvar_base< T > exprtk::symbol_table< T >::get_stringvar_base ( const std::string & string_name) const
inline

Definition at line 20954 of file exprtk.hpp.

20955 {
20956 static stringvar_base<T> null_stringvar_base("",reinterpret_cast<stringvar_ptr>(0));
20957 if (!valid())
20958 return null_stringvar_base;
20959 else if (!valid_symbol(string_name))
20960 return null_stringvar_base;
20961
20963
20964 if (0 == stringvar)
20965 {
20966 return null_stringvar_base;
20967 }
20968
20970 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, valid(), and valid_symbol().

Here is the call graph for this function:

◆ get_stringvar_list() [1/2]

template<typename T>
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t exprtk::symbol_table< T >::get_stringvar_list ( Sequence< std::pair< std::string, std::string >, Allocator > & svlist) const
inline

Definition at line 21471 of file exprtk.hpp.

21472 {
21473 if (!valid())
21474 return 0;
21475 else
21476 return local_data().stringvar_store.get_list(svlist);
21477 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, and valid().

Referenced by run_test10().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_stringvar_list() [2/2]

template<typename T>
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t exprtk::symbol_table< T >::get_stringvar_list ( Sequence< std::string, Allocator > & svlist) const
inline

Definition at line 21481 of file exprtk.hpp.

21482 {
21483 if (!valid())
21484 return 0;
21485 else
21486 return local_data().stringvar_store.get_list(svlist);
21487 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, and valid().

Here is the call graph for this function:

◆ get_stringvar_name()

template<typename T>
std::string exprtk::symbol_table< T >::get_stringvar_name ( const expression_ptr & ptr) const
inline

Definition at line 21629 of file exprtk.hpp.

21630 {
21631 return local_data().stringvar_store.entity_name(ptr);
21632 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::stringvar_store.

Here is the call graph for this function:

◆ get_vararg_function()

template<typename T>
vararg_function_ptr exprtk::symbol_table< T >::get_vararg_function ( const std::string & vararg_function_name) const
inline

Definition at line 20983 of file exprtk.hpp.

20984 {
20985 if (!valid())
20986 return reinterpret_cast<vararg_function_ptr>(0);
20988 return reinterpret_cast<vararg_function_ptr>(0);
20989 else
20991 }
vararg_function_t * vararg_function_ptr
Definition exprtk.hpp:20690

References local_data(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vararg_function_store.

Referenced by load_from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_variable() [1/2]

template<typename T>
variable_ptr exprtk::symbol_table< T >::get_variable ( const std::string & variable_name) const
inline

Definition at line 20924 of file exprtk.hpp.

20925 {
20926 if (!valid())
20927 return reinterpret_cast<variable_ptr>(0);
20928 else if (!valid_symbol(variable_name))
20929 return reinterpret_cast<variable_ptr>(0);
20930 else
20932 }
variable_t * variable_ptr
Definition exprtk.hpp:20681

References local_data(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Referenced by exprtk::derivative(), exprtk::integrate(), load_variables_from(), run_test10(), exprtk::second_derivative(), and exprtk::third_derivative().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_variable() [2/2]

template<typename T>
variable_ptr exprtk::symbol_table< T >::get_variable ( const T & var_ref) const
inline

Definition at line 20934 of file exprtk.hpp.

20935 {
20936 if (!valid())
20937 return reinterpret_cast<variable_ptr>(0);
20938 else
20939 return local_data().variable_store.get_from_varptr(
20940 reinterpret_cast<const void*>(&var_ref));
20941 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Here is the call graph for this function:

◆ get_variable_list() [1/2]

template<typename T>
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t exprtk::symbol_table< T >::get_variable_list ( Sequence< std::pair< std::string, T >, Allocator > & vlist) const
inline

Definition at line 21450 of file exprtk.hpp.

21451 {
21452 if (!valid())
21453 return 0;
21454 else
21455 return local_data().variable_store.get_list(vlist);
21456 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Referenced by run_test10().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_variable_list() [2/2]

template<typename T>
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t exprtk::symbol_table< T >::get_variable_list ( Sequence< std::string, Allocator > & vlist) const
inline

Definition at line 21460 of file exprtk.hpp.

21461 {
21462 if (!valid())
21463 return 0;
21464 else
21465 return local_data().variable_store.get_list(vlist);
21466 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Here is the call graph for this function:

◆ get_variable_name()

template<typename T>
std::string exprtk::symbol_table< T >::get_variable_name ( const expression_ptr & ptr) const
inline

Definition at line 21618 of file exprtk.hpp.

21619 {
21620 return local_data().variable_store.entity_name(ptr);
21621 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Here is the call graph for this function:

◆ get_vector()

template<typename T>
vector_holder_ptr exprtk::symbol_table< T >::get_vector ( const std::string & vector_name) const
inline

Definition at line 21025 of file exprtk.hpp.

21026 {
21027 if (!valid())
21028 return reinterpret_cast<vector_holder_ptr>(0);
21029 else if (!valid_symbol(vector_name))
21030 return reinterpret_cast<vector_holder_ptr>(0);
21031 else
21032 return local_data().vector_store.get(vector_name);
21033 }
vector_holder_t * vector_holder_ptr
Definition exprtk.hpp:21023

References local_data(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Referenced by load_vectors_from().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_vector_list()

template<typename T>
template<typename Allocator, template< typename, typename > class Sequence>
std::size_t exprtk::symbol_table< T >::get_vector_list ( Sequence< std::string, Allocator > & vec_list) const
inline

Definition at line 21492 of file exprtk.hpp.

21493 {
21494 if (!valid())
21495 return 0;
21496 else
21497 return local_data().vector_store.get_list(vec_list);
21498 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Here is the call graph for this function:

◆ get_vector_name()

template<typename T>
std::string exprtk::symbol_table< T >::get_vector_name ( const vector_holder_ptr & ptr) const
inline

Definition at line 21623 of file exprtk.hpp.

21624 {
21625 return local_data().vector_store.entity_name(ptr);
21626 }

References local_data(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Here is the call graph for this function:

◆ is_constant_node()

template<typename T>
bool exprtk::symbol_table< T >::is_constant_node ( const std::string & symbol_name) const
inline

Definition at line 21059 of file exprtk.hpp.

21060 {
21061 if (!valid())
21062 return false;
21063 else if (!valid_symbol(symbol_name))
21064 return false;
21065 else
21066 return local_data().variable_store.is_constant(symbol_name);
21067 }

References local_data(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Here is the call graph for this function:

◆ is_constant_string()

template<typename T>
bool exprtk::symbol_table< T >::is_constant_string ( const std::string & symbol_name) const
inline

Definition at line 21070 of file exprtk.hpp.

21071 {
21072 if (!valid())
21073 return false;
21074 else if (!valid_symbol(symbol_name))
21075 return false;
21077 return false;
21078 else
21079 return local_data().stringvar_store.is_constant(symbol_name);
21080 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, valid(), and valid_symbol().

Here is the call graph for this function:

◆ is_conststr_stringvar()

template<typename T>
bool exprtk::symbol_table< T >::is_conststr_stringvar ( const std::string & symbol_name) const
inline

Definition at line 21578 of file exprtk.hpp.

21579 {
21580 if (!valid())
21581 return false;
21582 else if (!valid_symbol(symbol_name))
21583 return false;
21585 return false;
21586
21587 return (
21589 local_data().stringvar_store.is_constant (symbol_name)
21590 );
21591 }

References local_data(), valid(), and valid_symbol().

Here is the call graph for this function:

◆ is_function()

template<typename T>
bool exprtk::symbol_table< T >::is_function ( const std::string & function_name) const
inline

Definition at line 21594 of file exprtk.hpp.

21595 {
21596 if (!valid())
21597 return false;
21598 else
21599 return local_data().function_store.symbol_exists(function_name);
21600 }

References exprtk::symbol_table< T >::control_block::st_data::function_store, local_data(), and valid().

Here is the call graph for this function:

◆ is_stringvar()

template<typename T>
bool exprtk::symbol_table< T >::is_stringvar ( const std::string & stringvar_name) const
inline

Definition at line 21570 of file exprtk.hpp.

21571 {
21572 if (!valid())
21573 return false;
21574 else
21575 return local_data().stringvar_store.symbol_exists(stringvar_name);
21576 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, and valid().

Here is the call graph for this function:

◆ is_vararg_function()

template<typename T>
bool exprtk::symbol_table< T >::is_vararg_function ( const std::string & vararg_function_name) const
inline

Definition at line 21602 of file exprtk.hpp.

21603 {
21604 if (!valid())
21605 return false;
21606 else
21608 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::vararg_function_store.

Here is the call graph for this function:

◆ is_variable()

template<typename T>
bool exprtk::symbol_table< T >::is_variable ( const std::string & variable_name) const
inline

Definition at line 21561 of file exprtk.hpp.

21562 {
21563 if (!valid())
21564 return false;
21565 else
21566 return local_data().variable_store.symbol_exists(variable_name);
21567 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Here is the call graph for this function:

◆ is_vector()

template<typename T>
bool exprtk::symbol_table< T >::is_vector ( const std::string & vector_name) const
inline

Definition at line 21610 of file exprtk.hpp.

21611 {
21612 if (!valid())
21613 return false;
21614 else
21615 return local_data().vector_store.symbol_exists(vector_name);
21616 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Here is the call graph for this function:

◆ load_from()

template<typename T>
void exprtk::symbol_table< T >::load_from ( const symbol_table< T > & st)
inline

Definition at line 21646 of file exprtk.hpp.

21647 {
21648 {
21650
21652
21653 if (!name_list.empty())
21654 {
21655 for (std::size_t i = 0; i < name_list.size(); ++i)
21656 {
21659 }
21660 }
21661 }
21662
21663 {
21665
21667
21668 if (!name_list.empty())
21669 {
21670 for (std::size_t i = 0; i < name_list.size(); ++i)
21671 {
21674 }
21675 }
21676 }
21677
21678 {
21680
21682
21683 if (!name_list.empty())
21684 {
21685 for (std::size_t i = 0; i < name_list.size(); ++i)
21686 {
21689 }
21690 }
21691 }
21692
21693 {
21695
21697
21698 if (!name_list.empty())
21699 {
21700 for (std::size_t i = 0; i < name_list.size(); ++i)
21701 {
21704 }
21705 }
21706 }
21707
21708 {
21710
21712
21713 if (!name_list.empty())
21714 {
21715 for (std::size_t i = 0; i < name_list.size(); ++i)
21716 {
21719 }
21720 }
21721 }
21722 }
generic_function_ptr get_string_function(const std::string &function_name) const
Definition exprtk.hpp:21003
bool add_function(const std::string &function_name, function_t &function)
Definition exprtk.hpp:21156
function_ptr get_function(const std::string &function_name) const
Definition exprtk.hpp:20973
generic_function_ptr get_generic_function(const std::string &function_name) const
Definition exprtk.hpp:20993
generic_function_ptr get_overload_function(const std::string &function_name) const
Definition exprtk.hpp:21013
vararg_function_ptr get_vararg_function(const std::string &vararg_function_name) const
Definition exprtk.hpp:20983

References add_function(), exprtk::symbol_table< T >::control_block::st_data::function_store, exprtk::symbol_table< T >::control_block::st_data::generic_function_store, get_function(), get_generic_function(), get_overload_function(), get_string_function(), get_vararg_function(), local_data(), exprtk::symbol_table< T >::control_block::st_data::overload_function_store, exprtk::symbol_table< T >::control_block::st_data::string_function_store, symbol_table(), and exprtk::symbol_table< T >::control_block::st_data::vararg_function_store.

Referenced by exprtk::function_compositor< T >::compile_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_variables_from()

template<typename T>
void exprtk::symbol_table< T >::load_variables_from ( const symbol_table< T > & st)
inline

Definition at line 21724 of file exprtk.hpp.

21725 {
21727
21729
21730 if (!name_list.empty())
21731 {
21732 for (std::size_t i = 0; i < name_list.size(); ++i)
21733 {
21736 }
21737 }
21738 }
variable_ptr get_variable(const std::string &variable_name) const
Definition exprtk.hpp:20924

References add_variable(), get_variable(), local_data(), exprtk::details::variable_node< T >::ref(), symbol_table(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Referenced by exprtk::function_compositor< T >::compile_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_vectors_from()

template<typename T>
void exprtk::symbol_table< T >::load_vectors_from ( const symbol_table< T > & st)
inline

Definition at line 21740 of file exprtk.hpp.

21741 {
21743
21744 st.local_data().vector_store.get_list(name_list);
21745
21746 if (!name_list.empty())
21747 {
21748 for (std::size_t i = 0; i < name_list.size(); ++i)
21749 {
21751 add_vector(name_list[i], vecholder.data(), vecholder.size());
21752 }
21753 }
21754 }
details::vector_holder< T > vector_holder_t
Definition exprtk.hpp:20680
bool add_vector(const std::string &vector_name, T(&v)[N])
Definition exprtk.hpp:21319
vector_holder_ptr get_vector(const std::string &vector_name) const
Definition exprtk.hpp:21025

References add_vector(), exprtk::details::vector_holder< Type >::data(), get_vector(), local_data(), exprtk::details::vector_holder< Type >::size(), symbol_table(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Referenced by exprtk::function_compositor< T >::compile_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ local_data() [1/2]

template<typename T>
local_data_t & exprtk::symbol_table< T >::local_data ( )
inlineprivate

Definition at line 21812 of file exprtk.hpp.

21813 {
21814 return *(control_block_->data_);
21815 }

References control_block_.

Referenced by add_constant(), add_function(), add_function(), add_function(), add_reserved_function(), add_reserved_function(), add_reserved_function(), add_stringvar(), add_variable(), add_vector(), add_vector(), add_vector(), add_vector(), clear_functions(), clear_local_constants(), clear_strings(), clear_variables(), clear_vectors(), create_stringvar(), create_variable(), function_count(), get_conststr_stringvar_name(), get_function(), get_function_list(), get_generic_function(), get_overload_function(), get_string_function(), get_stringvar(), get_stringvar_base(), get_stringvar_list(), get_stringvar_list(), get_stringvar_name(), get_vararg_function(), get_variable(), get_variable(), get_variable_list(), get_variable_list(), get_variable_name(), get_vector(), get_vector_list(), get_vector_name(), is_constant_node(), is_constant_string(), is_conststr_stringvar(), is_function(), is_stringvar(), is_vararg_function(), is_variable(), is_vector(), load_from(), load_variables_from(), load_vectors_from(), remove_function(), remove_stringvar(), remove_vararg_function(), remove_variable(), remove_vector(), stringvar_count(), stringvar_ref(), symbol_exists(), valid_symbol(), variable_count(), variable_ref(), and vector_count().

Here is the caller graph for this function:

◆ local_data() [2/2]

template<typename T>
const local_data_t & exprtk::symbol_table< T >::local_data ( ) const
inlineprivate

Definition at line 21817 of file exprtk.hpp.

21818 {
21819 return *(control_block_->data_);
21820 }

References control_block_.

◆ mutability()

template<typename T>
symtab_mutability_type exprtk::symbol_table< T >::mutability ( ) const
inline

Definition at line 20848 of file exprtk.hpp.

20849 {
20850 return valid() ? control_block_->mutability_ : e_unknown;
20851 }

References control_block_, e_unknown, and valid().

Referenced by exprtk::symbol_table< T >::control_block::set_mutability(), and symbol_table().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

template<typename T>
symbol_table< T > & exprtk::symbol_table< T >::operator= ( const symbol_table< T > & st)
inline

Definition at line 20830 of file exprtk.hpp.

20831 {
20832 if (this != &st)
20833 {
20835
20837 control_block_->ref_count++;
20838 }
20839
20840 return (*this);
20841 }
symbol_table(const symtab_mutability_type mutability=e_mutable)
Definition exprtk.hpp:20811

References control_block_, exprtk::symbol_table< T >::control_block::destroy(), and symbol_table().

Here is the call graph for this function:

◆ operator==()

template<typename T>
bool exprtk::symbol_table< T >::operator== ( const symbol_table< T > & st) const
inline

Definition at line 20843 of file exprtk.hpp.

20844 {
20845 return (this == &st) || (control_block_ == st.control_block_);
20846 }

References control_block_, and symbol_table().

Here is the call graph for this function:

◆ remove_function()

template<typename T>
bool exprtk::symbol_table< T >::remove_function ( const std::string & function_name)
inline

Definition at line 21392 of file exprtk.hpp.

21393 {
21394 if (!valid())
21395 return false;
21396 else
21397 return local_data().function_store.remove(function_name);
21398 }

References exprtk::symbol_table< T >::control_block::st_data::function_store, local_data(), and valid().

Referenced by run_test10(), and run_test18().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_stringvar()

template<typename T>
bool exprtk::symbol_table< T >::remove_stringvar ( const std::string & string_name)
inline

Definition at line 21383 of file exprtk.hpp.

21384 {
21385 if (!valid())
21386 return false;
21387 else
21388 return local_data().stringvar_store.remove(string_name);
21389 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, and valid().

Referenced by run_test10(), and run_test18().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_vararg_function()

template<typename T>
bool exprtk::symbol_table< T >::remove_vararg_function ( const std::string & vararg_function_name)
inline

Definition at line 21400 of file exprtk.hpp.

21401 {
21402 if (!valid())
21403 return false;
21404 else
21406 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::vararg_function_store.

Referenced by run_test18().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_variable()

template<typename T>
bool exprtk::symbol_table< T >::remove_variable ( const std::string & variable_name,
const bool delete_node = true )
inline

Definition at line 21374 of file exprtk.hpp.

21375 {
21376 if (!valid())
21377 return false;
21378 else
21380 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Referenced by run_test10(), and run_test18().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_vector()

template<typename T>
bool exprtk::symbol_table< T >::remove_vector ( const std::string & vector_name)
inline

Definition at line 21408 of file exprtk.hpp.

21409 {
21410 if (!valid())
21411 return false;
21412 else
21413 return local_data().vector_store.remove(vector_name);
21414 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Referenced by run_test18().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stringvar_count()

template<typename T>
std::size_t exprtk::symbol_table< T >::stringvar_count ( ) const
inline

Definition at line 20899 of file exprtk.hpp.

20900 {
20901 if (valid())
20902 return local_data().stringvar_store.size;
20903 else
20904 return 0;
20905 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, and valid().

Referenced by run_test10().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stringvar_ref()

template<typename T>
std::string & exprtk::symbol_table< T >::stringvar_ref ( const std::string & symbol_name)
inline

Definition at line 21047 of file exprtk.hpp.

21048 {
21050 if (!valid())
21051 return null_stringvar;
21052 else if (!valid_symbol(symbol_name))
21053 return null_stringvar;
21054 else
21055 return local_data().stringvar_store.type_ref(symbol_name);
21056 }

References local_data(), exprtk::symbol_table< T >::control_block::st_data::stringvar_store, valid(), and valid_symbol().

Here is the call graph for this function:

◆ symbol_exists()

template<typename T>
bool exprtk::symbol_table< T >::symbol_exists ( const std::string & symbol_name,
const bool check_reserved_symb = true ) const
inline

Definition at line 21536 of file exprtk.hpp.

21537 {
21538 /*
21539 Function will return true if symbol_name exists as either a
21540 reserved symbol, variable, stringvar, vector or function name
21541 in any of the type stores.
21542 */
21543 if (!valid())
21544 return false;
21546 return true;
21547 #ifndef exprtk_disable_string_capabilities
21549 return true;
21550 #endif
21552 return true;
21554 return true;
21556 return true;
21557 else
21558 return false;
21559 }

References local_data(), and valid().

Referenced by add_constant(), add_function(), add_function(), add_function(), add_reserved_function(), add_reserved_function(), add_reserved_function(), add_stringvar(), add_variable(), add_vector(), add_vector(), add_vector(), add_vector(), create_stringvar(), create_variable(), and run_test10().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid()

◆ valid_function()

template<typename T>
bool exprtk::symbol_table< T >::valid_function ( const std::string & symbol) const
inlineprivate

Definition at line 21784 of file exprtk.hpp.

21785 {
21786 if (symbol.empty())
21787 return false;
21788 else if (!details::is_letter(symbol[0]))
21789 return false;
21790 else if (symbol.size() > 1)
21791 {
21792 for (std::size_t i = 1; i < symbol.size(); ++i)
21793 {
21794 if (
21796 ('_' != symbol[i])
21797 )
21798 {
21799 if ((i < (symbol.size() - 1)) && ('.' == symbol[i]))
21800 continue;
21801 else
21802 return false;
21803 }
21804 }
21805 }
21806
21807 return true;
21808 }

References exprtk::details::is_letter(), and exprtk::details::is_letter_or_digit().

Here is the call graph for this function:

◆ valid_symbol()

template<typename T>
bool exprtk::symbol_table< T >::valid_symbol ( const std::string & symbol,
const bool check_reserved_symb = true ) const
inlineprivate

Definition at line 21758 of file exprtk.hpp.

21759 {
21760 if (symbol.empty())
21761 return false;
21762 else if (!details::is_letter(symbol[0]))
21763 return false;
21764 else if (symbol.size() > 1)
21765 {
21766 for (std::size_t i = 1; i < symbol.size(); ++i)
21767 {
21768 if (
21770 ('_' != symbol[i])
21771 )
21772 {
21773 if ((i < (symbol.size() - 1)) && ('.' == symbol[i]))
21774 continue;
21775 else
21776 return false;
21777 }
21778 }
21779 }
21780
21782 }
bool is_reserved_symbol(const std::string &symbol) const
Definition exprtk.hpp:20732

References exprtk::details::is_letter(), exprtk::details::is_letter_or_digit(), exprtk::symbol_table< T >::control_block::st_data::is_reserved_symbol(), and local_data().

Referenced by add_constant(), add_function(), add_function(), add_function(), add_reserved_function(), add_reserved_function(), add_reserved_function(), add_stringvar(), add_variable(), add_vector(), add_vector(), add_vector(), add_vector(), create_stringvar(), create_variable(), get_function(), get_generic_function(), get_overload_function(), get_string_function(), get_stringvar(), get_stringvar_base(), get_vararg_function(), get_variable(), get_vector(), is_constant_node(), is_constant_string(), is_conststr_stringvar(), stringvar_ref(), and variable_ref().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ variable_count()

template<typename T>
std::size_t exprtk::symbol_table< T >::variable_count ( ) const
inline

Definition at line 20890 of file exprtk.hpp.

20891 {
20892 if (valid())
20893 return local_data().variable_store.size;
20894 else
20895 return 0;
20896 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Here is the call graph for this function:

◆ variable_ref()

template<typename T>
T & exprtk::symbol_table< T >::variable_ref ( const std::string & symbol_name)
inline

Definition at line 21035 of file exprtk.hpp.

21036 {
21037 static T null_var = T(0);
21038 if (!valid())
21039 return null_var;
21040 else if (!valid_symbol(symbol_name))
21041 return null_var;
21042 else
21043 return local_data().variable_store.type_ref(symbol_name);
21044 }

References local_data(), valid(), valid_symbol(), and exprtk::symbol_table< T >::control_block::st_data::variable_store.

Here is the call graph for this function:

◆ vector_count()

template<typename T>
std::size_t exprtk::symbol_table< T >::vector_count ( ) const
inline

Definition at line 20916 of file exprtk.hpp.

20917 {
20918 if (valid())
20919 return local_data().vector_store.size;
20920 else
20921 return 0;
20922 }

References local_data(), valid(), and exprtk::symbol_table< T >::control_block::st_data::vector_store.

Here is the call graph for this function:

◆ parser< T >

template<typename T>
friend class parser< T >
friend

Definition at line 21822 of file exprtk.hpp.

Member Data Documentation

◆ control_block_

template<typename T>
control_block* exprtk::symbol_table< T >::control_block_
private

◆ lut_size

template<typename T>
const std::size_t exprtk::symbol_table< T >::lut_size = 256
staticprotected

Definition at line 20693 of file exprtk.hpp.


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