The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
wfl::unary_operator_expression Class Reference
Inheritance diagram for wfl::unary_operator_expression:

Public Member Functions

 unary_operator_expression (const std::string &op, expression_ptr arg)
 
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 Types

enum  OP { NOT , SUB }
 

Private Member Functions

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

Private Attributes

OP op_
 
std::string op_str_
 
expression_ptr operand_
 

Detailed Description

Definition at line 403 of file formula.cpp.

Member Enumeration Documentation

◆ OP

Enumerator
NOT 
SUB 

Definition at line 439 of file formula.cpp.

Constructor & Destructor Documentation

◆ unary_operator_expression()

wfl::unary_operator_expression::unary_operator_expression ( const std::string &  op,
expression_ptr  arg 
)
inline

Definition at line 406 of file formula.cpp.

References NOT, op_, and SUB.

Member Function Documentation

◆ execute()

variant wfl::unary_operator_expression::execute ( const formula_callable variables,
formula_debugger fdb 
) const
inlineprivatevirtual

Implements wfl::formula_expression.

Definition at line 427 of file formula.cpp.

References wfl::add_debug_info(), wfl::variant::as_bool(), NOT, op_, op_str_, operand_, and SUB.

◆ str()

virtual std::string wfl::unary_operator_expression::str ( ) const
inlinevirtual

Implements wfl::formula_expression.

Definition at line 419 of file formula.cpp.

References op_str_, operand_, and s.

Member Data Documentation

◆ op_

OP wfl::unary_operator_expression::op_
private

Definition at line 440 of file formula.cpp.

Referenced by execute(), and unary_operator_expression().

◆ op_str_

std::string wfl::unary_operator_expression::op_str_
private

Definition at line 441 of file formula.cpp.

Referenced by execute(), and str().

◆ operand_

expression_ptr wfl::unary_operator_expression::operand_
private

Definition at line 442 of file formula.cpp.

Referenced by execute(), and str().


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