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 42433 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 42437 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 42869 of file exprtk.hpp.

◆ parser_t

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

Definition at line 42439 of file exprtk.hpp.

◆ settings_t

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

Definition at line 42440 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 42438 of file exprtk.hpp.

◆ type

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

Definition at line 42871 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ function_compositor() [1/2]

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

Definition at line 43071 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 43079 of file exprtk.hpp.

43080 : symbol_table_(st)
43083 , fp_map_(7)
43084 , load_variables_(false)
43085 , load_vectors_(false)
43086 {}
symbol_table_t symbol_table_
Definition exprtk.hpp:43403

◆ ~function_compositor()

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

Definition at line 43088 of file exprtk.hpp.

43089 {
43090 clear();
43091 }

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 43172 of file exprtk.hpp.

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

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 43032 of file exprtk.hpp.

43036 {
43037 const typename std::map<std::string,expression_t>::iterator itr = expr_map_.find(name);
43038
43039 if (expr_map_.end() != itr)
43040 {
43041 if (!override)
43042 {
43043 exprtk_debug(("Compositor error(add): function '%s' already defined\n",
43044 name.c_str()));
43045
43046 return false;
43047 }
43048
43049 remove(name, var_list.size());
43050 }
43051
43052 if (compile_expression(name, expression, var_list))
43053 {
43054 const std::size_t n = var_list.size();
43055
43056 fp_map_[n][name]->setup(expr_map_[name]);
43057
43058 return true;
43059 }
43060 else
43061 {
43062 exprtk_debug(("Compositor error(add): Failed to compile function '%s'\n",
43063 name.c_str()));
43064
43065 return false;
43066 }
43067 }
std::map< std::string, expression_t > expr_map_
Definition exprtk.hpp:43405
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:43206
void remove(const std::string &name, const std::size_t &arg_count)
Definition exprtk.hpp:43378
#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 43103 of file exprtk.hpp.

43104 {
43105 auxiliary_symtab_list_.push_back(&symtab);
43106 }
std::vector< symbol_table_t * > auxiliary_symtab_list_
Definition exprtk.hpp:43407

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

◆ clear()

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

Definition at line 43148 of file exprtk.hpp.

43149 {
43151 expr_map_ .clear();
43152
43153 for (std::size_t i = 0; i < fp_map_.size(); ++i)
43154 {
43155 typename funcparam_t::iterator itr = fp_map_[i].begin();
43156 typename funcparam_t::iterator end = fp_map_[i].end ();
43157
43158 while (itr != end)
43159 {
43160 delete itr->second;
43161 ++itr;
43162 }
43163
43164 fp_map_[i].clear();
43165 }
43166
43170 }

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 43143 of file exprtk.hpp.

43144 {
43146 }
void clear_compilation_timeout_check()
Definition exprtk.hpp:24813

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 43133 of file exprtk.hpp.

43134 {
43136 }
void clear_loop_runtime_check()
Definition exprtk.hpp:24803

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 43138 of file exprtk.hpp.

43139 {
43141 }
void clear_vector_access_runtime_check()
Definition exprtk.hpp:24808

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 43206 of file exprtk.hpp.

43210 {
43211 expression_t compiled_expression;
43212 symbol_table_t local_symbol_table;
43213
43214 local_symbol_table.load_from(symbol_table_);
43215 local_symbol_table.add_constants();
43216
43217 if (load_variables_)
43218 {
43219 local_symbol_table.load_variables_from(symbol_table_);
43220 }
43221
43222 if (load_vectors_)
43223 {
43224 local_symbol_table.load_vectors_from(symbol_table_);
43225 }
43226
43227 error_list_.clear();
43228
43229 if (!valid(name,input_var_list.size()))
43230 {
43231 parser_error::type error =
43234 lexer::token(),
43235 "ERR274 - Function '" + name + "' is an invalid overload",
43237
43238 error_list_.push_back(error);
43239 return false;
43240 }
43241
43242 if (!forward(name,
43243 input_var_list.size(),
43244 local_symbol_table,
43245 return_present))
43246 return false;
43247
43248 compiled_expression.register_symbol_table(local_symbol_table);
43249
43250 for (std::size_t i = 0; i < auxiliary_symtab_list_.size(); ++i)
43251 {
43252 compiled_expression.register_symbol_table((*auxiliary_symtab_list_[i]));
43253 }
43254
43255 std::string mod_expression;
43256
43257 for (std::size_t i = 0; i < input_var_list.size(); ++i)
43258 {
43259 mod_expression += " var " + input_var_list[i] + "{};\n";
43260 }
43261
43262 if (
43263 ('{' == details::front(expression)) &&
43264 ('}' == details::back (expression))
43265 )
43266 mod_expression += "~" + expression + ";";
43267 else
43268 mod_expression += "~{" + expression + "};";
43269
43270 if (!parser_.compile(mod_expression,compiled_expression))
43271 {
43272 exprtk_debug(("Compositor Error: %s\n", parser_.error().c_str()));
43273 exprtk_debug(("Compositor modified expression: \n%s\n", mod_expression.c_str()));
43274
43275 remove(name,input_var_list.size());
43276
43277 for (std::size_t err_index = 0; err_index < parser_.error_count(); ++err_index)
43278 {
43279 error_list_.push_back(parser_.get_error(err_index));
43280 }
43281
43282 return false;
43283 }
43284
43285 if (!return_present && parser_.dec().return_present())
43286 {
43287 remove(name,input_var_list.size());
43288 return compile_expression(name, expression, input_var_list, true);
43289 }
43290
43291 // Make sure every return point has a scalar as its first parameter
43292 if (parser_.dec().return_present())
43293 {
43294 typedef std::vector<std::string> str_list_t;
43295
43296 str_list_t ret_param_list = parser_.dec().return_param_type_list();
43297
43298 for (std::size_t i = 0; i < ret_param_list.size(); ++i)
43299 {
43300 const std::string& params = ret_param_list[i];
43301
43302 if (params.empty() || ('T' != params[0]))
43303 {
43304 exprtk_debug(("Compositor Error: Return statement in function '%s' is invalid\n",
43305 name.c_str()));
43306
43307 remove(name,input_var_list.size());
43308
43309 return false;
43310 }
43311 }
43312 }
43313
43314 expr_map_[name] = compiled_expression;
43315
43316 exprtk::ifunction<T>& ifunc = (*(fp_map_[input_var_list.size()])[name]);
43317
43318 if (symbol_table_.add_function(name,ifunc))
43319 return true;
43320 else
43321 {
43322 exprtk_debug(("Compositor Error: Failed to add function '%s' to symbol table\n",
43323 name.c_str()));
43324 return false;
43325 }
43326 }
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:43352
exprtk::symbol_table< T > symbol_table_t
Definition exprtk.hpp:42438
std::string error() const
Definition exprtk.hpp:43177
std::deque< parser_error::type > error_list_
Definition exprtk.hpp:43408
exprtk::expression< T > expression_t
Definition exprtk.hpp:42437
bool valid(const std::string &name, const std::size_t &arg_count) const
Definition exprtk.hpp:43339
retparam_list_t return_param_type_list() const
Definition exprtk.hpp:23599
bool compile(const std::string &expression_string, expression< T > &expr)
Definition exprtk.hpp:24443
dependent_entity_collector & dec()
Definition exprtk.hpp:24737
parser_error::type get_error(const std::size_t &index) const
Definition exprtk.hpp:24712
std::string error() const
Definition exprtk.hpp:24722
std::size_t error_count() const
Definition exprtk.hpp:24732
bool add_function(const std::string &function_name, function_t &function)
Definition exprtk.hpp:20811
#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:22071

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 43177 of file exprtk.hpp.

43178 {
43179 if (!error_list_.empty())
43180 {
43181 return error_list_[0].diagnostic;
43182 }
43183 else
43184 return std::string("No Error");
43185 }

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 43187 of file exprtk.hpp.

43188 {
43189 return error_list_.size();
43190 }

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 43352 of file exprtk.hpp.

43356 {
43357 switch (arg_count)
43358 {
43359 #define case_stmt(N) \
43360 case N : (fp_map_[arg_count])[name] = \
43361 (!ret_present) ? static_cast<base_func*> \
43362 (new func_##N##param) : \
43363 static_cast<base_func*> \
43364 (new func_##N##param_retval) ; \
43365 break; \
43366
43369 case_stmt(6)
43370 #undef case_stmt
43371 }
43372
43373 exprtk::ifunction<T>& ifunc = (*(fp_map_[arg_count])[name]);
43374
43375 return sym_table.add_function(name,ifunc);
43376 }
#define case_stmt(N)
Definition exprtk.hpp:32731

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 43192 of file exprtk.hpp.

43193 {
43194 if (index < error_list_.size())
43195 {
43196 return error_list_[index];
43197 }
43198
43199 throw std::invalid_argument("compositor::get_error() - Invalid error index specified");
43200 }

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 43108 of file exprtk.hpp.

43109 {
43110 load_variables_ = load;
43111 }

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 43113 of file exprtk.hpp.

43114 {
43115 load_vectors_ = load;
43116 }

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 43128 of file exprtk.hpp.

43129 {
43131 }
void register_compilation_timeout_check(compilation_check &compchk)
Definition exprtk.hpp:24793

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 43118 of file exprtk.hpp.

43119 {
43121 }
void register_loop_runtime_check(loop_runtime_check &lrtchk)
Definition exprtk.hpp:24783

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 43123 of file exprtk.hpp.

43124 {
43126 }
void register_vector_access_runtime_check(vector_access_runtime_check &vartchk)
Definition exprtk.hpp:24788

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 43378 of file exprtk.hpp.

43379 {
43380 if (arg_count > 6)
43381 return;
43382
43383 const typename std::map<std::string,expression_t>::iterator em_itr = expr_map_.find(name);
43384
43385 if (expr_map_.end() != em_itr)
43386 {
43387 expr_map_.erase(em_itr);
43388 }
43389
43390 const typename funcparam_t::iterator fp_itr = fp_map_[arg_count].find(name);
43391
43392 if (fp_map_[arg_count].end() != fp_itr)
43393 {
43394 delete fp_itr->second;
43395 fp_map_[arg_count].erase(fp_itr);
43396 }
43397
43399 }
bool remove_function(const std::string &function_name)
Definition exprtk.hpp:21047

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 42992 of file exprtk.hpp.

42993 {
42994 typedef exprtk::results_context<T> results_context_t;
42995 typedef typename results_context_t::type_store_t type_t;
42996 typedef typename type_t::scalar_view scalar_t;
42997
42998 const T result = e.value();
42999
43000 if (e.return_invoked())
43001 {
43002 // Due to the post compilation checks, it can be safely
43003 // assumed that there will be at least one parameter
43004 // and that the first parameter will always be scalar.
43005 return scalar_t(e.results()[0])();
43006 }
43007
43008 return result;
43009 }

◆ symbol_table() [1/2]

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

Definition at line 43093 of file exprtk.hpp.

43094 {
43095 return symbol_table_;
43096 }

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 43098 of file exprtk.hpp.

43099 {
43100 return symbol_table_;
43101 }

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 43328 of file exprtk.hpp.

43329 {
43330 return (
43331 symbol_table_.is_variable (symbol) ||
43332 symbol_table_.is_stringvar (symbol) ||
43333 symbol_table_.is_function (symbol) ||
43334 symbol_table_.is_vector (symbol) ||
43336 );
43337 }
bool is_vararg_function(const std::string &vararg_function_name) const
Definition exprtk.hpp:21257
bool is_function(const std::string &function_name) const
Definition exprtk.hpp:21249
bool is_stringvar(const std::string &stringvar_name) const
Definition exprtk.hpp:21225
bool is_vector(const std::string &vector_name) const
Definition exprtk.hpp:21265
bool is_variable(const std::string &variable_name) const
Definition exprtk.hpp:21216

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 43339 of file exprtk.hpp.

43341 {
43342 if (arg_count > 6)
43343 return false;
43344 else if (symbol_used(name))
43345 return false;
43346 else if (fp_map_[arg_count].end() != fp_map_[arg_count].find(name))
43347 return false;
43348 else
43349 return true;
43350 }
bool symbol_used(const std::string &symbol) const
Definition exprtk.hpp:43328

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: