#include <function.hpp>
Public Member Functions | |
function_symbol_table (std::shared_ptr< function_symbol_table > parent=nullptr) | |
void | add_function (const std::string &name, formula_function_ptr &&fcn) |
expression_ptr | create_function (const std::string &fn, const std::vector< expression_ptr > &args) const |
std::set< std::string > | get_function_names () const |
bool | empty () const |
Static Public Member Functions | |
static std::shared_ptr< function_symbol_table > | get_builtins () |
Private Types | |
enum | builtins_tag_t { builtins_tag } |
Private Member Functions | |
function_symbol_table (builtins_tag_t) | |
Private Attributes | |
std::shared_ptr< function_symbol_table > | parent |
functions_map | custom_formulas_ |
Definition at line 232 of file function.hpp.
|
private |
Enumerator | |
---|---|
builtins_tag |
Definition at line 254 of file function.hpp.
|
explicit |
Definition at line 1545 of file function.cpp.
|
inlineprivate |
Definition at line 255 of file function.hpp.
void wfl::function_symbol_table::add_function | ( | const std::string & | name, |
formula_function_ptr && | fcn | ||
) |
Definition at line 1550 of file function.cpp.
References custom_formulas_.
Referenced by ai::formula_ai::add_formula_function(), and wfl::parse_expression().
expression_ptr wfl::function_symbol_table::create_function | ( | const std::string & | fn, |
const std::vector< expression_ptr > & | args | ||
) | const |
Definition at line 1555 of file function.cpp.
References custom_formulas_, i, and parent.
Referenced by wfl::parse_expression().
|
inline |
Definition at line 243 of file function.hpp.
References custom_formulas_, and parent.
Referenced by get_builtins().
|
static |
Definition at line 1587 of file function.cpp.
References builtins_tag, debug, DECLARE_WFL_FUNCTION, distance_between(), empty(), parent, sgn, and utf8::size().
Referenced by wfl::parse_expression().
std::set< std::string > wfl::function_symbol_table::get_function_names | ( | ) | const |
Definition at line 1573 of file function.cpp.
References custom_formulas_, and parent.
Referenced by wfl::function_list_expression::execute().
|
private |
Definition at line 252 of file function.hpp.
Referenced by add_function(), create_function(), empty(), and get_function_names().
|
private |
Definition at line 251 of file function.hpp.
Referenced by create_function(), empty(), get_builtins(), and get_function_names().