16 #ifndef FORMULA_FUNCTION_HPP_INCLUDED
17 #define FORMULA_FUNCTION_HPP_INCLUDED
53 const args_list&
args,
54 int min_args=-1,
int max_args=-1)
58 if(min_args >= 0 &&
args_.size() <
static_cast<size_t>(min_args)) {
62 if(max_args >= 0 &&
args_.size() >
static_cast<size_t>(max_args)) {
117 , precondition_(precondition)
142 bool empty() {
return custom_formulas_.empty();}
146 const std::vector<expression_ptr>& args,
147 const function_symbol_table* symbols);
179 return arg_->evaluate(variables,fdb);
variant get_value(const std::string &key) const
void add_function(const std::string &name, formula_function_ptr fcn)
variant evaluate_arg_callback(formula_debugger &fdb, const formula_expression &expression, const formula_callable &variables)
functions_map custom_formulas_
expression_ptr create_function(const std::string &fn, const std::vector< expression_ptr > &args, const function_symbol_table *symbols)
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
function_expression(const std::string &name, const args_list &args, int min_args=-1, int max_args=-1)
std::vector< std::string > get_function_names() const
std::vector< std::string > builtin_function_names()
GLsizei const GLfloat * value
boost::shared_ptr< function_expression > function_expression_ptr
std::map< std::string, formula_function_ptr > functions_map
boost::shared_ptr< formula_expression > expression_ptr
void serialize_to_string(std::string &str) const
const args_list & args() const
GLuint const GLchar * name
virtual std::string str() const
expression_ptr create_function(const std::string &fn, const std::vector< expression_ptr > &args) const
key_value_pair(const variant &key, const variant &value)
boost::shared_ptr< formula_function > formula_function_ptr
GLsizei const GLcharARB ** string
std::vector< expression_ptr > args_list