The Battle for Wesnoth  1.15.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:
Inheritance graph

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_
 

Friends

class formula_debugger
 

Detailed Description

Definition at line 58 of file function.hpp.

Constructor & Destructor Documentation

◆ formula_expression()

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

Definition at line 61 of file function.hpp.

◆ ~formula_expression()

virtual wfl::formula_expression::~formula_expression ( )
inlinevirtual

Definition at line 66 of file function.hpp.

Member Function Documentation

◆ evaluate()

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

Definition at line 70 of file function.hpp.

References wfl::evaluate_arg_callback().

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
inline

Definition at line 81 of file function.hpp.

◆ str()

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

Friends And Related Function Documentation

◆ formula_debugger

friend class formula_debugger
friend

Definition at line 92 of file function.hpp.

Member Data Documentation

◆ name_

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

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