The Battle for Wesnoth  1.19.2+dev
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
wfl::formula_expression Class Referenceabstract

#include <function.hpp>

Inheritance diagram for wfl::formula_expression:

Public Member Functions

 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
virtual std::string str () const =0

Private Member Functions

virtual variant execute (const formula_callable &variables, formula_debugger *fdb=nullptr) const =0

Private Attributes

const std::string name_


class formula_debugger

Detailed Description

Definition at line 63 of file function.hpp.

Constructor & Destructor Documentation

◆ formula_expression()

wfl::formula_expression::formula_expression ( const std::string &  name = "")

Definition at line 66 of file function.hpp.

◆ ~formula_expression()

virtual wfl::formula_expression::~formula_expression ( )

Definition at line 71 of file function.hpp.

Member Function Documentation

◆ evaluate()

variant wfl::formula_expression::evaluate ( const formula_callable variables,
formula_debugger fdb = nullptr 
) const

Definition at line 75 of file function.hpp.

References wfl::evaluate_arg_callback(), execute(), and name_.

Referenced by wfl::builtins::DEFINE_WFL_FUNCTION().

◆ execute()

virtual variant wfl::formula_expression::execute ( const formula_callable variables,
formula_debugger fdb = nullptr 
) const
privatepure virtual

◆ get_name()

std::string wfl::formula_expression::get_name ( ) const

Definition at line 86 of file function.hpp.

References name_.

◆ str()

virtual std::string wfl::formula_expression::str ( ) const
pure virtual

Friends And Related Function Documentation

◆ formula_debugger

friend class formula_debugger

Definition at line 97 of file function.hpp.

Member Data Documentation

◆ name_

const std::string wfl::formula_expression::name_

Definition at line 96 of file function.hpp.

Referenced by evaluate(), and get_name().

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