#include <hps.h>
Public Types | |
enum | Intrinsic { Extent, DrawPass } |
Public Member Functions | |
Condition () | |
The default constructor creates an empty condition that is always satisfied. | |
Condition (char const *in_utf8) | |
Condition (float in_number) | |
Condition (HPS::Condition::Intrinsic in_special) | |
Condition (Condition const &in_that) | |
Condition (Condition &&in_that) | |
Condition & | operator= (Condition &&in_that) |
HPS::Type | ObjectType () const |
bool | ShowCondition (UTF8 &out_condition) const |
bool | ShowNumber (float &out_number) const |
bool | ShowIntrinsic (Condition::Intrinsic &out_special) const |
bool | ShowOperands (ConditionArray &out_operands) const |
Condition & | operator= (Condition const &in_that) |
bool | Equals (Condition const &in_that) const |
bool | operator== (Condition const &in_that) const |
bool | operator!= (Condition const &in_that) const |
bool | IsSatisfiedBy (UTF8Array const &in_conditions) const |
bool | IsSatisfiedBy (char const *in_condition) const |
Condition | OR (Condition const &in_operand2) const |
Condition | XOR (Condition const &in_operand2) const |
Condition | AND (Condition const &in_operand2) const |
Condition | EQ (Condition const &in_operand2) const |
Condition | NEQ (Condition const &in_operand2) const |
Condition | GT (Condition const &in_operand2) const |
Condition | LT (Condition const &in_operand2) const |
Condition | GTEQ (Condition const &in_operand2) const |
Condition | LTEQ (Condition const &in_operand2) const |
Condition | operator! () const |
Condition | operator|| (Condition const &in_operand2) const |
Condition | operator^ (Condition const &in_operand2) const |
Condition | operator&& (Condition const &in_operand2) const |
![]() | |
Object & | operator= (Object const &other_object) |
Object (Object &&in_that) | |
Object & | operator= (Object &&in_that) |
HPS::Type | Type () const |
virtual bool | Empty () const |
virtual void | Reset () |
bool | HasType (HPS::Type in_mask) const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
Static Public Member Functions | |
static Condition | NOT (Condition const &in_operand) |
static Condition | OR (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | XOR (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | AND (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | EQ (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | NEQ (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | GT (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | LT (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | GTEQ (Condition const &in_operand1, Condition const &in_operand2) |
static Condition | LTEQ (Condition const &in_operand1, Condition const &in_operand2) |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
Friends | |
HPS_API Condition | NOT (Condition const &in_operand) |
HPS_API Condition | OR (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | XOR (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | AND (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | EQ (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | NEQ (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | GT (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | LT (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | GTEQ (Condition const &in_operand1, Condition const &in_operand2) |
HPS_API Condition | LTEQ (Condition const &in_operand1, Condition const &in_operand2) |
A Condition is a string or collection of strings separated by logical operators. In practice, conditions form a tree with the leaves being strings (the actual Condition) and the interior nodes being logical operators.
HPS::Condition::Condition | ( | char const * | in_utf8 | ) |
This constructor is the way to construct a Condition object from a string.
in_utf8 | The string to use as the condition, assumed to be utf8 encoded. |
HPS::Condition::Condition | ( | float | in_number | ) |
This constructor is the way to construct a Condition object from a number.
in_value | The number to use as the condition. |
HPS::Condition::Condition | ( | HPS::Condition::Intrinsic | in_special | ) |
This constructor is the way to construct a Condition object from a special intrinsic type.
in_special | The intrinsic type to use as the condition. |
HPS::Condition::Condition | ( | Condition const & | in_that | ) |
The copy constructor copies the source condition.
in_that | the source to be copied. |
HPS::Condition::Condition | ( | Condition && | in_that | ) |
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. |
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::Condition::Equals | ( | Condition const & | in_that | ) | const |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
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. |
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::Condition::IsSatisfiedBy | ( | UTF8Array const & | in_conditions | ) | const |
bool HPS::Condition::IsSatisfiedBy | ( | char const * | in_condition | ) | 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. |
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. |
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. |
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.
Condition HPS::Condition::operator! | ( | ) | const |
A NOT condition is satisfied if its operand condition is not satisfied.
bool HPS::Condition::operator!= | ( | Condition const & | in_that | ) | const |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
An AND condition is satisfied if both of its operand conditions are satisfied.
in_operand2 | The condition to AND with this object. |
Copies the source Condition object to this object.
in_that | The source of the copy. |
bool HPS::Condition::operator== | ( | Condition const & | in_that | ) | const |
Check if the source object is equivalent to this object.
in_that | The source object to compare to this object. |
An XOR condition is satisfied if either operand condition is satisfied, but not both.
in_operand2 | The condition to XOR with this object. |
An OR condition is satisfied if either of its operand conditions are satisfied.
in_operand2 | The condition to OR with this object. |
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::Condition::ShowCondition | ( | UTF8 & | out_condition | ) | const |
Shows the condition string that has been set on this object, if any. A Condition object can only have either a number, condition string, intrinsic type, or operands.
out_condition | The condition string. |
bool HPS::Condition::ShowIntrinsic | ( | Condition::Intrinsic & | out_special | ) | const |
Shows the intrinsic type that has been set on this object, if any. A Condition object can only have either a number, condition string, intrinsic type, or operands.
out_special | The intrinsic type. |
bool HPS::Condition::ShowNumber | ( | float & | out_number | ) | const |
Shows the number that has been set on this object, if any. A Condition object can only have either a number, condition string, intrinsic type, or operands.
out_number | The number. |
bool HPS::Condition::ShowOperands | ( | ConditionArray & | out_operands | ) | const |
Retrieves the operands, if any, of this condition object. A Condition object can only have either a number, condition string, intrinsic type, or operands.
out_operands | An array of condition operands. |
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. |
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. |
An EQ conditional expression is satisfied if its operand expressions are equal.
in_operand1 | The first condition operand. |
in_operand2 | The second condition operand. |
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. |
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. |
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. |
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. |
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. |
A NOT condition is satisfied if its operand condition is not satisfied.
in_operand | The condition operand. |
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. |
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. |