C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
exprtk::function_compositor< T > Class Template Reference

#include <exprtk.hpp>

Classes

struct  base_func
 
struct  func_0param
 
struct  func_0param_retval
 
struct  func_1param
 
struct  func_1param_retval
 
struct  func_2param
 
struct  func_2param_retval
 
struct  func_3param
 
struct  func_3param_retval
 
struct  func_4param
 
struct  func_4param_retval
 
struct  func_5param
 
struct  func_5param_retval
 
struct  func_6param
 
struct  func_6param_retval
 
struct  function
 
struct  scoped_bft
 

Public Types

typedef exprtk::expression< T > expression_t
 
typedef exprtk::symbol_table< T > symbol_table_t
 
typedef exprtk::parser< T > parser_t
 
typedef parser_t::settings_store settings_t
 

Public Member Functions

 function_compositor ()
 
 function_compositor (const symbol_table_t &st)
 
 ~function_compositor ()
 
symbol_table_tsymbol_table ()
 
const symbol_table_tsymbol_table () const
 
void add_auxiliary_symtab (symbol_table_t &symtab)
 
void load_variables (const bool load=true)
 
void load_vectors (const bool load=true)
 
void register_loop_runtime_check (loop_runtime_check &lrtchk)
 
void register_vector_access_runtime_check (vector_access_runtime_check &vartchk)
 
void register_compilation_timeout_check (compilation_check &compchk)
 
void clear_loop_runtime_check ()
 
void clear_vector_access_runtime_check ()
 
void clear_compilation_timeout_check ()
 
void clear ()
 
bool add (const function &f, const bool override=false)
 
std::string error () const
 
std::size_t error_count () const
 
parser_error::type get_error (const std::size_t &index) const
 

Private Types

typedef std::map< std::string, base_func * > funcparam_t
 
typedef const T & type
 

Private Member Functions

template<typename Allocator , template< typename, typename > class Sequence>
bool add (const std::string &name, const std::string &expression, const Sequence< std::string, Allocator > &var_list, const bool override=false)
 
template<typename Allocator , template< typename, typename > class Sequence>
bool compile_expression (const std::string &name, const std::string &expression, const Sequence< std::string, Allocator > &input_var_list, bool return_present=false)
 
bool symbol_used (const std::string &symbol) const
 
bool valid (const std::string &name, const std::size_t &arg_count) const
 
bool forward (const std::string &name, const std::size_t &arg_count, symbol_table_t &sym_table, const bool ret_present=false)
 
void remove (const std::string &name, const std::size_t &arg_count)
 

Static Private Member Functions

static T return_value (expression_t &e)
 

Private Attributes

symbol_table_t symbol_table_
 
parser_t parser_
 
std::map< std::string, expression_texpr_map_
 
std::vector< funcparam_tfp_map_
 
std::vector< symbol_table_t * > auxiliary_symtab_list_
 
std::deque< parser_error::typeerror_list_
 
bool load_variables_
 
bool load_vectors_
 

Detailed Description

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

Definition at line 42926 of file exprtk.hpp.

Member Typedef Documentation

◆ expression_t

template<typename T >
typedef exprtk::expression<T> exprtk::function_compositor< T >::expression_t

Definition at line 42930 of file exprtk.hpp.

◆ funcparam_t

template<typename T >
typedef std::map<std::string,base_func*> exprtk::function_compositor< T >::funcparam_t
private

Definition at line 43362 of file exprtk.hpp.

◆ parser_t

template<typename T >
typedef exprtk::parser<T> exprtk::function_compositor< T >::parser_t

Definition at line 42932 of file exprtk.hpp.

◆ settings_t

template<typename T >
typedef parser_t::settings_store exprtk::function_compositor< T >::settings_t

Definition at line 42933 of file exprtk.hpp.

◆ symbol_table_t

template<typename T >
typedef exprtk::symbol_table<T> exprtk::function_compositor< T >::symbol_table_t

Definition at line 42931 of file exprtk.hpp.

◆ type

template<typename T >
typedef const T& exprtk::function_compositor< T >::type
private

Definition at line 43364 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ function_compositor() [1/2]

template<typename T >
exprtk::function_compositor< T >::function_compositor ( )
inline

Definition at line 43564 of file exprtk.hpp.

◆ function_compositor() [2/2]

template<typename T >
exprtk::function_compositor< T >::function_compositor ( const symbol_table_t st)
inlineexplicit

Definition at line 43572 of file exprtk.hpp.

43573 : symbol_table_(st)
43576 , fp_map_(7)
43577 , load_variables_(false)
43578 , load_vectors_(false)
43579 {}
symbol_table_t symbol_table_
Definition exprtk.hpp:43896

◆ ~function_compositor()

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

Definition at line 43581 of file exprtk.hpp.

43582 {
43583 clear();
43584 }

References exprtk::function_compositor< T >::clear().

Here is the call graph for this function:

Member Function Documentation

◆ add() [1/2]

template<typename T >
bool exprtk::function_compositor< T >::add ( const function f,
const bool  override = false 
)
inline

Definition at line 43665 of file exprtk.hpp.

43666 {
43667 return add(f.name_, f.expression_, f.v_,override);
43668 }
bool add(const std::string &name, const std::string &expression, const Sequence< std::string, Allocator > &var_list, const bool override=false)
Definition exprtk.hpp:43525

References exprtk::function_compositor< T >::add(), exprtk::function_compositor< T >::function::expression_, exprtk::function_compositor< T >::function::name_, and exprtk::function_compositor< T >::function::v_.

Here is the call graph for this function:

◆ add() [2/2]

template<typename T >
template<typename Allocator , template< typename, typename > class Sequence>
bool exprtk::function_compositor< T >::add ( const std::string &  name,
const std::string &  expression,
const Sequence< std::string, Allocator > &  var_list,
const bool  override = false 
)
inlineprivate

Definition at line 43525 of file exprtk.hpp.

43529 {
43530 const typename std::map<std::string,expression_t>::iterator itr = expr_map_.find(name);
43531
43532 if (expr_map_.end() != itr)
43533 {
43534 if (!override)
43535 {
43536 exprtk_debug(("Compositor error(add): function '%s' already defined\n",
43537 name.c_str()));
43538
43539 return false;
43540 }
43541
43542 remove(name, var_list.size());
43543 }
43544
43545 if (compile_expression(name, expression, var_list))
43546 {
43547 const std::size_t n = var_list.size();
43548
43549 fp_map_[n][name]->setup(expr_map_[name]);
43550
43551 return true;
43552 }
43553 else
43554 {
43555 exprtk_debug(("Compositor error(add): Failed to compile function '%s'\n",
43556 name.c_str()));
43557
43558 return false;
43559 }
43560 }
std::map< std::string, expression_t > expr_map_
Definition exprtk.hpp:43898
bool compile_expression(const std::string &name, const std::string &expression, const Sequence< std::string, Allocator > &input_var_list, bool return_present=false)
Definition exprtk.hpp:43699
void remove(const std::string &name, const std::size_t &arg_count)
Definition exprtk.hpp:43871
#define exprtk_debug(params)
Definition exprtk.hpp:64

References exprtk::function_compositor< T >::compile_expression(), exprtk::function_compositor< T >::expr_map_, exprtk_debug, exprtk::function_compositor< T >::fp_map_, and exprtk::function_compositor< T >::remove().

Referenced by exprtk::function_compositor< T >::add(), primes_via_naive_method(), and expression_processor< T >::process_function_definition().

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

◆ add_auxiliary_symtab()

template<typename T >
void exprtk::function_compositor< T >::add_auxiliary_symtab ( symbol_table_t symtab)
inline

Definition at line 43596 of file exprtk.hpp.

43597 {
43598 auxiliary_symtab_list_.push_back(&symtab);
43599 }
std::vector< symbol_table_t * > auxiliary_symtab_list_
Definition exprtk.hpp:43900

References exprtk::function_compositor< T >::auxiliary_symtab_list_.

◆ clear()

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

Definition at line 43641 of file exprtk.hpp.

43642 {
43644 expr_map_ .clear();
43645
43646 for (std::size_t i = 0; i < fp_map_.size(); ++i)
43647 {
43648 typename funcparam_t::iterator itr = fp_map_[i].begin();
43649 typename funcparam_t::iterator end = fp_map_[i].end ();
43650
43651 while (itr != end)
43652 {
43653 delete itr->second;
43654 ++itr;
43655 }
43656
43657 fp_map_[i].clear();
43658 }
43659
43663 }

References exprtk::symbol_table< T >::clear(), exprtk::function_compositor< T >::clear_compilation_timeout_check(), exprtk::function_compositor< T >::clear_loop_runtime_check(), exprtk::function_compositor< T >::clear_vector_access_runtime_check(), exprtk::function_compositor< T >::expr_map_, exprtk::function_compositor< T >::fp_map_, and exprtk::function_compositor< T >::symbol_table_.

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

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

◆ clear_compilation_timeout_check()

template<typename T >
void exprtk::function_compositor< T >::clear_compilation_timeout_check ( )
inline

Definition at line 43636 of file exprtk.hpp.

43637 {
43639 }
void clear_compilation_timeout_check()
Definition exprtk.hpp:25125

References exprtk::parser< T >::clear_compilation_timeout_check(), and exprtk::function_compositor< T >::parser_.

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

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

◆ clear_loop_runtime_check()

template<typename T >
void exprtk::function_compositor< T >::clear_loop_runtime_check ( )
inline

Definition at line 43626 of file exprtk.hpp.

43627 {
43629 }
void clear_loop_runtime_check()
Definition exprtk.hpp:25115

References exprtk::parser< T >::clear_loop_runtime_check(), and exprtk::function_compositor< T >::parser_.

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

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

◆ clear_vector_access_runtime_check()

template<typename T >
void exprtk::function_compositor< T >::clear_vector_access_runtime_check ( )
inline

Definition at line 43631 of file exprtk.hpp.

43632 {
43634 }
void clear_vector_access_runtime_check()
Definition exprtk.hpp:25120

References exprtk::parser< T >::clear_vector_access_runtime_check(), and exprtk::function_compositor< T >::parser_.

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

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

◆ compile_expression()

template<typename T >
template<typename Allocator , template< typename, typename > class Sequence>
bool exprtk::function_compositor< T >::compile_expression ( const std::string &  name,
const std::string &  expression,
const Sequence< std::string, Allocator > &  input_var_list,
bool  return_present = false 
)
inlineprivate

Definition at line 43699 of file exprtk.hpp.

43703 {
43704 expression_t compiled_expression;
43705 symbol_table_t local_symbol_table;
43706
43707 local_symbol_table.load_from(symbol_table_);
43708 local_symbol_table.add_constants();
43709
43710 if (load_variables_)
43711 {
43712 local_symbol_table.load_variables_from(symbol_table_);
43713 }
43714
43715 if (load_vectors_)
43716 {
43717 local_symbol_table.load_vectors_from(symbol_table_);
43718 }
43719
43720 error_list_.clear();
43721
43722 if (!valid(name,input_var_list.size()))
43723 {
43724 parser_error::type error =
43727 lexer::token(),
43728 "ERR283 - Function '" + name + "' is an invalid overload",
43730
43731 error_list_.push_back(error);
43732 return false;
43733 }
43734
43735 if (!forward(name,
43736 input_var_list.size(),
43737 local_symbol_table,
43738 return_present))
43739 return false;
43740
43741 compiled_expression.register_symbol_table(local_symbol_table);
43742
43743 for (std::size_t i = 0; i < auxiliary_symtab_list_.size(); ++i)
43744 {
43745 compiled_expression.register_symbol_table((*auxiliary_symtab_list_[i]));
43746 }
43747
43748 std::string mod_expression;
43749
43750 for (std::size_t i = 0; i < input_var_list.size(); ++i)
43751 {
43752 mod_expression += " var " + input_var_list[i] + "{};\n";
43753 }
43754
43755 if (
43756 ('{' == details::front(expression)) &&
43757 ('}' == details::back (expression))
43758 )
43759 mod_expression += "~" + expression + ";";
43760 else
43761 mod_expression += "~{" + expression + "};";
43762
43763 if (!parser_.compile(mod_expression,compiled_expression))
43764 {
43765 exprtk_debug(("Compositor Error: %s\n", parser_.error().c_str()));
43766 exprtk_debug(("Compositor modified expression: \n%s\n", mod_expression.c_str()));
43767
43768 remove(name,input_var_list.size());
43769
43770 for (std::size_t err_index = 0; err_index < parser_.error_count(); ++err_index)
43771 {
43772 error_list_.push_back(parser_.get_error(err_index));
43773 }
43774
43775 return false;
43776 }
43777
43778 if (!return_present && parser_.dec().return_present())
43779 {
43780 remove(name,input_var_list.size());
43781 return compile_expression(name, expression, input_var_list, true);
43782 }
43783
43784 // Make sure every return point has a scalar as its first parameter
43785 if (parser_.dec().return_present())
43786 {
43787 typedef std::vector<std::string> str_list_t;
43788
43789 str_list_t ret_param_list = parser_.dec().return_param_type_list();
43790
43791 for (std::size_t i = 0; i < ret_param_list.size(); ++i)
43792 {
43793 const std::string& params = ret_param_list[i];
43794
43795 if (params.empty() || ('T' != params[0]))
43796 {
43797 exprtk_debug(("Compositor Error: Return statement in function '%s' is invalid\n",
43798 name.c_str()));
43799
43800 remove(name,input_var_list.size());
43801
43802 return false;
43803 }
43804 }
43805 }
43806
43807 expr_map_[name] = compiled_expression;
43808
43809 exprtk::ifunction<T>& ifunc = (*(fp_map_[input_var_list.size()])[name]);
43810
43811 if (symbol_table_.add_function(name,ifunc))
43812 return true;
43813 else
43814 {
43815 exprtk_debug(("Compositor Error: Failed to add function '%s' to symbol table\n",
43816 name.c_str()));
43817 return false;
43818 }
43819 }
bool forward(const std::string &name, const std::size_t &arg_count, symbol_table_t &sym_table, const bool ret_present=false)
Definition exprtk.hpp:43845
exprtk::symbol_table< T > symbol_table_t
Definition exprtk.hpp:42931
std::string error() const
Definition exprtk.hpp:43670
std::deque< parser_error::type > error_list_
Definition exprtk.hpp:43901
exprtk::expression< T > expression_t
Definition exprtk.hpp:42930
bool valid(const std::string &name, const std::size_t &arg_count) const
Definition exprtk.hpp:43832
retparam_list_t return_param_type_list() const
Definition exprtk.hpp:23886
bool compile(const std::string &expression_string, expression< T > &expr)
Definition exprtk.hpp:24742
dependent_entity_collector & dec()
Definition exprtk.hpp:25044
parser_error::type get_error(const std::size_t &index) const
Definition exprtk.hpp:25019
std::string error() const
Definition exprtk.hpp:25029
std::size_t error_count() const
Definition exprtk.hpp:25039
bool add_function(const std::string &function_name, function_t &function)
Definition exprtk.hpp:21076
#define exprtk_error_location
Definition exprtk.hpp:67
const char_t & back(const std::string &s)
Definition exprtk.hpp:272
const char_t & front(const std::string &s)
Definition exprtk.hpp:267
type make_error(const error_mode mode, const std::string &diagnostic="", const std::string &src_location="")
Definition exprtk.hpp:22336

References exprtk::symbol_table< T >::add_constants(), exprtk::symbol_table< T >::add_function(), exprtk::function_compositor< T >::auxiliary_symtab_list_, exprtk::details::back(), exprtk::parser< T >::compile(), exprtk::function_compositor< T >::compile_expression(), exprtk::parser< T >::dec(), exprtk::parser_error::e_parser, exprtk::parser< T >::error(), exprtk::function_compositor< T >::error(), exprtk::parser< T >::error_count(), exprtk::function_compositor< T >::error_list_, exprtk::function_compositor< T >::expr_map_, exprtk_debug, exprtk_error_location, exprtk::function_compositor< T >::forward(), exprtk::function_compositor< T >::fp_map_, exprtk::details::front(), exprtk::parser< T >::get_error(), exprtk::symbol_table< T >::load_from(), exprtk::function_compositor< T >::load_variables_, exprtk::symbol_table< T >::load_variables_from(), exprtk::function_compositor< T >::load_vectors_, exprtk::symbol_table< T >::load_vectors_from(), exprtk::parser_error::make_error(), exprtk::function_compositor< T >::parser_, exprtk::expression< T >::register_symbol_table(), exprtk::function_compositor< T >::remove(), exprtk::parser< T >::dependent_entity_collector::return_param_type_list(), exprtk::parser< T >::dependent_entity_collector::return_present(), exprtk::function_compositor< T >::symbol_table_, and exprtk::function_compositor< T >::valid().

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

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

◆ error()

template<typename T >
std::string exprtk::function_compositor< T >::error ( ) const
inline

Definition at line 43670 of file exprtk.hpp.

43671 {
43672 if (!error_list_.empty())
43673 {
43674 return error_list_[0].diagnostic;
43675 }
43676 else
43677 return std::string("No Error");
43678 }

References exprtk::function_compositor< T >::error_list_.

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

Here is the caller graph for this function:

◆ error_count()

template<typename T >
std::size_t exprtk::function_compositor< T >::error_count ( ) const
inline

Definition at line 43680 of file exprtk.hpp.

43681 {
43682 return error_list_.size();
43683 }

References exprtk::function_compositor< T >::error_list_.

◆ forward()

template<typename T >
bool exprtk::function_compositor< T >::forward ( const std::string &  name,
const std::size_t &  arg_count,
symbol_table_t sym_table,
const bool  ret_present = false 
)
inlineprivate

Definition at line 43845 of file exprtk.hpp.

43849 {
43850 switch (arg_count)
43851 {
43852 #define case_stmt(N) \
43853 case N : (fp_map_[arg_count])[name] = \
43854 (!ret_present) ? static_cast<base_func*> \
43855 (new func_##N##param) : \
43856 static_cast<base_func*> \
43857 (new func_##N##param_retval) ; \
43858 break; \
43859
43862 case_stmt(6)
43863 #undef case_stmt
43864 }
43865
43866 exprtk::ifunction<T>& ifunc = (*(fp_map_[arg_count])[name]);
43867
43868 return sym_table.add_function(name,ifunc);
43869 }
#define case_stmt(N)
Definition exprtk.hpp:33204

References exprtk::symbol_table< T >::add_function(), case_stmt, and exprtk::function_compositor< T >::fp_map_.

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

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

◆ get_error()

template<typename T >
parser_error::type exprtk::function_compositor< T >::get_error ( const std::size_t &  index) const
inline

Definition at line 43685 of file exprtk.hpp.

43686 {
43687 if (index < error_list_.size())
43688 {
43689 return error_list_[index];
43690 }
43691
43692 throw std::invalid_argument("compositor::get_error() - Invalid error index specified");
43693 }

References exprtk::function_compositor< T >::error_list_.

◆ load_variables()

template<typename T >
void exprtk::function_compositor< T >::load_variables ( const bool  load = true)
inline

Definition at line 43601 of file exprtk.hpp.

43602 {
43603 load_variables_ = load;
43604 }

References exprtk::function_compositor< T >::load_variables_.

◆ load_vectors()

template<typename T >
void exprtk::function_compositor< T >::load_vectors ( const bool  load = true)
inline

Definition at line 43606 of file exprtk.hpp.

43607 {
43608 load_vectors_ = load;
43609 }

References exprtk::function_compositor< T >::load_vectors_.

◆ register_compilation_timeout_check()

template<typename T >
void exprtk::function_compositor< T >::register_compilation_timeout_check ( compilation_check compchk)
inline

Definition at line 43621 of file exprtk.hpp.

43622 {
43624 }
void register_compilation_timeout_check(compilation_check &compchk)
Definition exprtk.hpp:25105

References exprtk::function_compositor< T >::parser_, and exprtk::parser< T >::register_compilation_timeout_check().

Here is the call graph for this function:

◆ register_loop_runtime_check()

template<typename T >
void exprtk::function_compositor< T >::register_loop_runtime_check ( loop_runtime_check lrtchk)
inline

Definition at line 43611 of file exprtk.hpp.

43612 {
43614 }
void register_loop_runtime_check(loop_runtime_check &lrtchk)
Definition exprtk.hpp:25095

References exprtk::function_compositor< T >::parser_, and exprtk::parser< T >::register_loop_runtime_check().

Here is the call graph for this function:

◆ register_vector_access_runtime_check()

template<typename T >
void exprtk::function_compositor< T >::register_vector_access_runtime_check ( vector_access_runtime_check vartchk)
inline

Definition at line 43616 of file exprtk.hpp.

43617 {
43619 }
void register_vector_access_runtime_check(vector_access_runtime_check &vartchk)
Definition exprtk.hpp:25100

References exprtk::function_compositor< T >::parser_, and exprtk::parser< T >::register_vector_access_runtime_check().

Here is the call graph for this function:

◆ remove()

template<typename T >
void exprtk::function_compositor< T >::remove ( const std::string &  name,
const std::size_t &  arg_count 
)
inlineprivate

Definition at line 43871 of file exprtk.hpp.

43872 {
43873 if (arg_count > 6)
43874 return;
43875
43876 const typename std::map<std::string,expression_t>::iterator em_itr = expr_map_.find(name);
43877
43878 if (expr_map_.end() != em_itr)
43879 {
43880 expr_map_.erase(em_itr);
43881 }
43882
43883 const typename funcparam_t::iterator fp_itr = fp_map_[arg_count].find(name);
43884
43885 if (fp_map_[arg_count].end() != fp_itr)
43886 {
43887 delete fp_itr->second;
43888 fp_map_[arg_count].erase(fp_itr);
43889 }
43890
43892 }
bool remove_function(const std::string &function_name)
Definition exprtk.hpp:21312

References exprtk::function_compositor< T >::expr_map_, exprtk::function_compositor< T >::fp_map_, exprtk::symbol_table< T >::remove_function(), and exprtk::function_compositor< T >::symbol_table_.

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

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

◆ return_value()

template<typename T >
static T exprtk::function_compositor< T >::return_value ( expression_t e)
inlinestaticprivate

Definition at line 43485 of file exprtk.hpp.

43486 {
43487 typedef exprtk::results_context<T> results_context_t;
43488 typedef typename results_context_t::type_store_t type_t;
43489 typedef typename type_t::scalar_view scalar_t;
43490
43491 const T result = e.value();
43492
43493 if (e.return_invoked())
43494 {
43495 // Due to the post compilation checks, it can be safely
43496 // assumed that there will be at least one parameter
43497 // and that the first parameter will always be scalar.
43498 return scalar_t(e.results()[0])();
43499 }
43500
43501 return result;
43502 }

◆ symbol_table() [1/2]

template<typename T >
symbol_table_t & exprtk::function_compositor< T >::symbol_table ( )
inline

Definition at line 43586 of file exprtk.hpp.

43587 {
43588 return symbol_table_;
43589 }

References exprtk::function_compositor< T >::symbol_table_.

◆ symbol_table() [2/2]

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

Definition at line 43591 of file exprtk.hpp.

43592 {
43593 return symbol_table_;
43594 }

References exprtk::function_compositor< T >::symbol_table_.

◆ symbol_used()

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

Definition at line 43821 of file exprtk.hpp.

43822 {
43823 return (
43824 symbol_table_.is_variable (symbol) ||
43825 symbol_table_.is_stringvar (symbol) ||
43826 symbol_table_.is_function (symbol) ||
43827 symbol_table_.is_vector (symbol) ||
43829 );
43830 }
bool is_vararg_function(const std::string &vararg_function_name) const
Definition exprtk.hpp:21522
bool is_function(const std::string &function_name) const
Definition exprtk.hpp:21514
bool is_stringvar(const std::string &stringvar_name) const
Definition exprtk.hpp:21490
bool is_vector(const std::string &vector_name) const
Definition exprtk.hpp:21530
bool is_variable(const std::string &variable_name) const
Definition exprtk.hpp:21481

References exprtk::symbol_table< T >::is_function(), exprtk::symbol_table< T >::is_stringvar(), exprtk::symbol_table< T >::is_vararg_function(), exprtk::symbol_table< T >::is_variable(), exprtk::symbol_table< T >::is_vector(), and exprtk::function_compositor< T >::symbol_table_.

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

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

◆ valid()

template<typename T >
bool exprtk::function_compositor< T >::valid ( const std::string &  name,
const std::size_t &  arg_count 
) const
inlineprivate

Definition at line 43832 of file exprtk.hpp.

43834 {
43835 if (arg_count > 6)
43836 return false;
43837 else if (symbol_used(name))
43838 return false;
43839 else if (fp_map_[arg_count].end() != fp_map_[arg_count].find(name))
43840 return false;
43841 else
43842 return true;
43843 }
bool symbol_used(const std::string &symbol) const
Definition exprtk.hpp:43821

References exprtk::function_compositor< T >::fp_map_, and exprtk::function_compositor< T >::symbol_used().

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

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

Member Data Documentation

◆ auxiliary_symtab_list_

template<typename T >
std::vector<symbol_table_t*> exprtk::function_compositor< T >::auxiliary_symtab_list_
private

◆ error_list_

template<typename T >
std::deque<parser_error::type> exprtk::function_compositor< T >::error_list_
private

◆ expr_map_

template<typename T >
std::map<std::string,expression_t> exprtk::function_compositor< T >::expr_map_
private

◆ fp_map_

template<typename T >
std::vector<funcparam_t> exprtk::function_compositor< T >::fp_map_
private

◆ load_variables_

template<typename T >
bool exprtk::function_compositor< T >::load_variables_
private

◆ load_vectors_

template<typename T >
bool exprtk::function_compositor< T >::load_vectors_
private

◆ parser_

template<typename T >
parser_t exprtk::function_compositor< T >::parser_
private

◆ symbol_table_

template<typename T >
symbol_table_t exprtk::function_compositor< T >::symbol_table_
private

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