![]() |
JaffarPlus
High-performance best-first search optimizer for tool-assisted speedruns
|
Abstract base for a single boolean comparison. More...
#include <condition.hpp>
Public Types | |
| enum | operator_t { op_equal , op_not_equal , op_greater , op_greater_or_equal , op_less , op_less_or_equal , op_bit_true , op_bit_false , op_modulo_zero , op_modulo_non_zero } |
| The comparison operator applied between the condition's two operands. More... | |
Public Member Functions | |
| Condition (const operator_t opType) | |
| Constructs a condition with the given operator. | |
| virtual bool | evaluate () const =0 |
| Evaluates the condition against the current values of its operands. | |
Static Public Member Functions | |
| static operator_t | getOperatorType (const std::string &operation) |
| Maps a configuration operator string to its operator_t value. | |
Protected Attributes | |
| const operator_t | _opType |
| The comparison operator selected for this condition. | |
Abstract base for a single boolean comparison.
A condition compares two operands (each either a game Property or an immediate value) with a relational/bitwise/modulo operator. Rules and input sets hold lists of conditions that must all evaluate to true (logical AND). The concrete, type-specialized implementation is _vCondition.
Definition at line 22 of file condition.hpp.
The comparison operator applied between the condition's two operands.
Definition at line 26 of file condition.hpp.
|
inline |
Constructs a condition with the given operator.
| opType | The comparison operator to apply when the condition is evaluated. |
Definition at line 44 of file condition.hpp.
|
pure virtual |
Evaluates the condition against the current values of its operands.
Implemented in jaffarPlus::_vCondition< T >.
|
inlinestatic |
Maps a configuration operator string to its operator_t value.
| operation | The operator token from the config (e.g. "==", ">=", "BitTrue", "%0"). |
| A | logic error if the token is not a recognized operator. |
Definition at line 59 of file condition.hpp.
|
protected |
The comparison operator selected for this condition.
Definition at line 79 of file condition.hpp.