The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
wfl::formula_function_expression Class Reference

#include <function.hpp>

Inheritance diagram for wfl::formula_function_expression:

Public Member Functions

 formula_function_expression (const std::string &name, const args_list &args, const_formula_ptr formula, const_formula_ptr precondition, const std::vector< std::string > &arg_names)
 
- Public Member Functions inherited from wfl::function_expression
 function_expression (const std::string &name, const args_list &args, int min_args=-1, int max_args=-1)
 
virtual std::string str () const
 
- Public Member Functions inherited from wfl::formula_expression
 formula_expression (const std::string &name="")
 
virtual ~formula_expression ()
 
variant evaluate (const formula_callable &variables, formula_debugger *fdb=nullptr) const
 
std::string get_name () const
 

Private Member Functions

variant execute (const formula_callable &variables, formula_debugger *fdb) const
 

Private Attributes

const_formula_ptr formula_
 
const_formula_ptr precondition_
 
std::vector< std::string > arg_names_
 
int star_arg_
 

Additional Inherited Members

- Public Types inherited from wfl::function_expression
typedef std::vector< expression_ptrargs_list
 
- Protected Member Functions inherited from wfl::function_expression
const args_listargs () const
 

Detailed Description

Definition at line 152 of file function.hpp.

Constructor & Destructor Documentation

◆ formula_function_expression()

wfl::formula_function_expression::formula_function_expression ( const std::string &  name,
const args_list args,
const_formula_ptr  formula,
const_formula_ptr  precondition,
const std::vector< std::string > &  arg_names 
)
explicit

Definition at line 1481 of file function.cpp.

References arg_names_, n, utf8::size(), and star_arg_.

Member Function Documentation

◆ execute()

variant wfl::formula_function_expression::execute ( const formula_callable variables,
formula_debugger fdb 
) const
privatevirtual

Member Data Documentation

◆ arg_names_

std::vector<std::string> wfl::formula_function_expression::arg_names_
private

Definition at line 167 of file function.hpp.

Referenced by execute(), and formula_function_expression().

◆ formula_

const_formula_ptr wfl::formula_function_expression::formula_
private

Definition at line 164 of file function.hpp.

Referenced by execute().

◆ precondition_

const_formula_ptr wfl::formula_function_expression::precondition_
private

Definition at line 165 of file function.hpp.

Referenced by execute().

◆ star_arg_

int wfl::formula_function_expression::star_arg_
private

Definition at line 169 of file function.hpp.

Referenced by execute(), and formula_function_expression().


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