#include <hps.h>
Public Member Functions | |
ConditionalExpression | AND (ConditionalExpression const &in_operand2) const |
ConditionalExpression () | |
The default constructor creates an empty condition that is always satisfied. | |
ConditionalExpression (char const *in_utf8) | |
ConditionalExpression (float in_number) | |
ConditionalExpression (HPS::Condition::Intrinsic in_special) | |
ConditionalExpression (ConditionalExpression const &in_that) | |
ConditionalExpression (ConditionalExpression &&in_that) | |
ConditionalExpression | EQ (ConditionalExpression const &in_operand2) const |
bool | Equals (ConditionalExpression const &in_that) const |
ConditionalExpression | GT (ConditionalExpression const &in_operand2) const |
ConditionalExpression | GTEQ (ConditionalExpression const &in_operand2) const |
bool | IsSatisfiedBy (UTF8Array const &in_conditions) const |
bool | IsSatisfiedBy (char const *in_condition) const |
ConditionalExpression | LT (ConditionalExpression const &in_operand2) const |
ConditionalExpression | LTEQ (ConditionalExpression const &in_operand2) const |
ConditionalExpression | NEQ (ConditionalExpression const &in_operand2) const |
HPS::Type | ObjectType () const |
ConditionalExpression | operator! () const |
bool | operator!= (ConditionalExpression const &in_that) const |
ConditionalExpression | operator&& (ConditionalExpression const &in_operand2) const |
ConditionalExpression & | operator= (ConditionalExpression &&in_that) |
ConditionalExpression & | operator= (ConditionalExpression const &in_that) |
bool | operator== (ConditionalExpression const &in_that) const |
ConditionalExpression | operator^ (ConditionalExpression const &in_operand2) const |
ConditionalExpression | operator|| (ConditionalExpression const &in_operand2) const |
ConditionalExpression | OR (ConditionalExpression const &in_operand2) const |
bool | ShowCondition (UTF8 &out_condition) const |
bool | ShowIntrinsic (Condition::Intrinsic &out_special) const |
bool | ShowNumber (float &out_number) const |
bool | ShowOperands (ConditionalExpressionArray &out_operands) const |
ConditionalExpression | XOR (ConditionalExpression const &in_operand2) const |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
HPS::Type | Type () const |
A ConditionalExpression is a string or collection of strings separated by logical operators. In practice, conditional expressions form a tree with the leaves being strings (the actual Conditions that must be satisfied) and the interior nodes being logical operators.
HPS::ConditionalExpression::ConditionalExpression | ( | char const * | in_utf8 | ) |
This constructor is the way to construct a ConditionalExpression object from a string.
in_utf8 | The string to use as the condition, assumed to be utf8 encoded. |
HPS::ConditionalExpression::ConditionalExpression | ( | float | in_number | ) |
This constructor is the way to construct a ConditionalExpression object from a number.
in_value | The number to use as the condition. |
HPS::ConditionalExpression::ConditionalExpression | ( | HPS::Condition::Intrinsic | in_special | ) |
This constructor is the way to construct a ConditionalExpression object from a special intrinsic type.
in_special | The intrinsic type to use as the condition. |
HPS::ConditionalExpression::ConditionalExpression | ( | ConditionalExpression const & | in_that | ) |
The copy constructor copies the source condition.
in_that | the source to be copied. |
HPS::ConditionalExpression::ConditionalExpression | ( | ConditionalExpression && | in_that | ) |
The move constructor creates a ConditionalExpression by transferring the underlying impl of the rvalue reference to this ConditionalExpression thereby avoiding a copy and allocation.
in_that | An rvalue reference to a ConditionalExpression to take the impl from. |
ConditionalExpression HPS::ConditionalExpression::AND | ( | ConditionalExpression const & | in_operand2 | ) | const |
An AND condition is satisfied if both of its operand conditions are satisfied.
in_operand2 | The condition to AND with this object. |
|
static |
An AND condition is satisfied if both of its operand conditions are satisfied.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
ConditionalExpression HPS::ConditionalExpression::EQ | ( | ConditionalExpression const & | in_operand2 | ) | const |
An EQ conditional expression is satisfied if its operand expressions are equal.
in_operand2 | The expression to compare to this object. |
|
static |
An EQ conditional expression is satisfied if its operand expressions are equal.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
bool HPS::ConditionalExpression::Equals | ( | ConditionalExpression const & | in_that | ) | const |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
ConditionalExpression HPS::ConditionalExpression::GT | ( | ConditionalExpression const & | in_operand2 | ) | const |
An GT conditional expression is satisfied if its second operand is greater than the first operand.
in_operand2 | The expression to compare to this object. |
|
static |
An GT conditional expression is satisfied if its second operand is greater than the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
ConditionalExpression HPS::ConditionalExpression::GTEQ | ( | ConditionalExpression const & | in_operand2 | ) | const |
An GTEQ conditional expression is satisfied if its second operand is greater than or equal to the first operand.
in_operand2 | The expression to compare to this object. |
|
static |
An GTEQ conditional expression is satisfied if its second operand is greater than or equal to the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
bool HPS::ConditionalExpression::IsSatisfiedBy | ( | UTF8Array const & | in_conditions | ) | const |
Determines if the source ConditionalExpression object is satisfied by the given conditions.
in_conditions | The conditions to test against the ConditionalExpression object. |
bool HPS::ConditionalExpression::IsSatisfiedBy | ( | char const * | in_condition | ) | const |
Determines if the source ConditionalExpression object is satisfied by the given condition.
in_condition | The condition to test against the ConditionalExpression object. |
ConditionalExpression HPS::ConditionalExpression::LT | ( | ConditionalExpression const & | in_operand2 | ) | const |
An LT conditional expression is satisfied if its second operand is less than the first operand.
in_operand2 | The expression to compare to this object. |
|
static |
An LT conditional expression is satisfied if its second operand is less than the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
ConditionalExpression HPS::ConditionalExpression::LTEQ | ( | ConditionalExpression const & | in_operand2 | ) | const |
An LTEQ conditional expression is satisfied if its second operand is less than or equal to the first operand.
in_operand2 | The expression to compare to this object. |
|
static |
An LTEQ conditional expression is satisfied if its second operand is less than or equal to the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
ConditionalExpression HPS::ConditionalExpression::NEQ | ( | ConditionalExpression const & | in_operand2 | ) | const |
An NEQ conditional expression is satisfied if its operand expressions are not equal.
in_operand2 | The expression to compare to this object. |
|
static |
An NEQ conditional expression is satisfied if its operand expressions are not equal.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
static |
A NOT condition is satisfied if its operand condition is not satisfied.
in_operand | The condition operand. |
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::Object.
ConditionalExpression HPS::ConditionalExpression::operator! | ( | ) | const |
A NOT condition is satisfied if its operand condition is not satisfied.
bool HPS::ConditionalExpression::operator!= | ( | ConditionalExpression const & | in_that | ) | const |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
ConditionalExpression HPS::ConditionalExpression::operator&& | ( | ConditionalExpression const & | in_operand2 | ) | const |
An AND condition is satisfied if both of its operand conditions are satisfied.
in_operand2 | The condition to AND with this object. |
ConditionalExpression& HPS::ConditionalExpression::operator= | ( | ConditionalExpression && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this ConditionalExpression thereby avoiding a copy.
in_that | An rvalue reference to a ConditionalExpression to take the impl from. |
ConditionalExpression& HPS::ConditionalExpression::operator= | ( | ConditionalExpression const & | in_that | ) |
Copies the source ConditionalExpression object to this object.
in_that | The source of the copy. |
bool HPS::ConditionalExpression::operator== | ( | ConditionalExpression const & | in_that | ) | const |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
ConditionalExpression HPS::ConditionalExpression::operator^ | ( | ConditionalExpression const & | in_operand2 | ) | const |
An XOR condition is satisfied if either operand condition is satisfied, but not both.
in_operand2 | The condition to XOR with this object. |
ConditionalExpression HPS::ConditionalExpression::operator|| | ( | ConditionalExpression const & | in_operand2 | ) | const |
An OR condition is satisfied if either of its operand conditions are satisfied.
in_operand2 | The condition to OR with this object. |
ConditionalExpression HPS::ConditionalExpression::OR | ( | ConditionalExpression const & | in_operand2 | ) | const |
An OR condition is satisfied if either of its operand conditions are satisfied.
in_operand2 | The condition to OR with this object. |
|
static |
An OR condition is satisfied if either of its operand conditions are satisfied.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
bool HPS::ConditionalExpression::ShowCondition | ( | UTF8 & | out_condition | ) | const |
Shows the condition string that has been set on this object, if any. A ConditionalExpression object can only have either a number, condition string, intrinsic type, or operands.
out_condition | The condition string. |
bool HPS::ConditionalExpression::ShowIntrinsic | ( | Condition::Intrinsic & | out_special | ) | const |
Shows the intrinsic type that has been set on this object, if any. A ConditionalExpression object can only have either a number, condition string, intrinsic type, or operands.
out_special | The intrinsic type. |
bool HPS::ConditionalExpression::ShowNumber | ( | float & | out_number | ) | const |
Shows the number that has been set on this object, if any. A ConditionalExpression object can only have either a number, condition string, intrinsic type, or operands.
out_number | The number. |
bool HPS::ConditionalExpression::ShowOperands | ( | ConditionalExpressionArray & | out_operands | ) | const |
Retrieves the operands, if any, of this condition object. A ConditionalExpression object can only have either a number, condition string, intrinsic type, or operands.
out_operands | An array of condition operands. |
ConditionalExpression HPS::ConditionalExpression::XOR | ( | ConditionalExpression const & | in_operand2 | ) | const |
An XOR condition is satisfied if either operand condition is satisfied, but not both.
in_operand2 | The condition to XOR with this object. |
|
static |
An XOR condition is satisfied if either operand condition is satisfied, but not both.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An AND condition is satisfied if both of its operand conditions are satisfied.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An EQ conditional expression is satisfied if its operand expressions are equal.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An GT conditional expression is satisfied if its second operand is greater than the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An GTEQ conditional expression is satisfied if its second operand is greater than or equal to the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An LT conditional expression is satisfied if its second operand is less than the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An LTEQ conditional expression is satisfied if its second operand is less than or equal to the first operand.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An NEQ conditional expression is satisfied if its operand expressions are not equal.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
A NOT condition is satisfied if its operand condition is not satisfied.
in_operand | The condition operand. |
|
friend |
An OR condition is satisfied if either of its operand conditions are satisfied.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
|
friend |
An XOR condition is satisfied if either operand condition is satisfied, but not both.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |