API Search || Global Search

#include <hps.h>

Inheritance diagram for HPS::ConditionalExpression:
HPS::Object

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_condition)
 
 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
 
ConditionalExpressionoperator= (ConditionalExpression &&in_that)
 
ConditionalExpressionoperator= (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
 
- Public Member Functions inherited from HPS::Object
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)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Member Functions

static ConditionalExpression AND (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression EQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression GT (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression GTEQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression LT (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression LTEQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression NEQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression NOT (ConditionalExpression const &in_operand)
 
static ConditionalExpression OR (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
static ConditionalExpression XOR (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::ConditionalExpression
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Friends

HPS_API ConditionalExpression AND (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression EQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression GT (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression GTEQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression LT (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression LTEQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression NEQ (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression NOT (ConditionalExpression const &in_operand)
 
HPS_API ConditionalExpression OR (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 
HPS_API ConditionalExpression XOR (ConditionalExpression const &in_operand1, ConditionalExpression const &in_operand2)
 

Detailed Description

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.

Constructor & Destructor Documentation

HPS::ConditionalExpression::ConditionalExpression ( char const *  in_condition)

This constructor is the way to construct a ConditionalExpression object from a string.

Parameters
in_conditionThe 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.

Parameters
in_valueThe 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.

Parameters
in_specialThe intrinsic type to use as the condition.
HPS::ConditionalExpression::ConditionalExpression ( ConditionalExpression const &  in_that)

The copy constructor copies the source condition.

Parameters
in_thatthe 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.

Parameters
in_thatAn rvalue reference to a ConditionalExpression to take the impl from.

Member Function Documentation

ConditionalExpression HPS::ConditionalExpression::AND ( ConditionalExpression const &  in_operand2) const

An AND condition is satisfied if both of its operand conditions are satisfied.

Parameters
in_operand2The condition to AND with this object.
Returns
a new condition representing the logical AND of the operand condition with this object.
static ConditionalExpression HPS::ConditionalExpression::AND ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An AND condition is satisfied if both of its operand conditions are satisfied.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new condition representing the logical AND of the operand conditions.
ConditionalExpression HPS::ConditionalExpression::EQ ( ConditionalExpression const &  in_operand2) const

An EQ conditional expression is satisfied if its operand expressions are equal.

Parameters
in_operand2The expression to compare to this object.
Returns
a new conditional expression representing the equality comparison of the operand expression with this object.
static ConditionalExpression HPS::ConditionalExpression::EQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An EQ conditional expression is satisfied if its operand expressions are equal.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the equality comparison of the operand expressions.
bool HPS::ConditionalExpression::Equals ( ConditionalExpression const &  in_that) const

Check if the source object is equivalent to this object.

Parameters
in_thatThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.
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.

Parameters
in_operand2The expression to compare to this object.
Returns
a new conditional expression representing the greater than comparison of the operand expression with this object.
static ConditionalExpression HPS::ConditionalExpression::GT ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An GT conditional expression is satisfied if its second operand is greater than the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the greater than comparison of the operand expressions.
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.

Parameters
in_operand2The expression to compare to this object.
Returns
a new conditional expression representing the greater than or equal to comparison of the operand expression with this object.
static ConditionalExpression HPS::ConditionalExpression::GTEQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An GTEQ conditional expression is satisfied if its second operand is greater than or equal to the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the greater than or equal to comparison of the operands.
bool HPS::ConditionalExpression::IsSatisfiedBy ( UTF8Array const &  in_conditions) const

Determines if the source ConditionalExpression object is satisfied by the given conditions.

Parameters
in_conditionsThe conditions to test against the ConditionalExpression object.
Returns
true if the ConditionalExpression object is satisfied, false otherwise.
bool HPS::ConditionalExpression::IsSatisfiedBy ( char const *  in_condition) const

Determines if the source ConditionalExpression object is satisfied by the given condition.

Parameters
in_conditionThe condition to test against the ConditionalExpression object.
Returns
true if the ConditionalExpression object is satisfied, false otherwise.
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.

Parameters
in_operand2The expression to compare to this object.
Returns
a new conditional expression representing the less than comparison of the operand expression with this object.
static ConditionalExpression HPS::ConditionalExpression::LT ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An LT conditional expression is satisfied if its second operand is less than the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the less than comparison of the operand expressions.
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.

Parameters
in_operand2The expression to compare to this object.
Returns
a new conditional expression representing the less than or equal to comparison of the operand expression with this object.
static ConditionalExpression HPS::ConditionalExpression::LTEQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An LTEQ conditional expression is satisfied if its second operand is less than or equal to the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the less than or equal to comparison of the operand expressions.
ConditionalExpression HPS::ConditionalExpression::NEQ ( ConditionalExpression const &  in_operand2) const

An NEQ conditional expression is satisfied if its operand expressions are not equal.

Parameters
in_operand2The expression to compare to this object.
Returns
a new conditional expression representing the non-equality comparison of the operand expression with this object.
static ConditionalExpression HPS::ConditionalExpression::NEQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An NEQ conditional expression is satisfied if its operand expressions are not equal.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the non-equality comparison of the operand expressions.
static ConditionalExpression HPS::ConditionalExpression::NOT ( ConditionalExpression const &  in_operand)
static

A NOT condition is satisfied if its operand condition is not satisfied.

Parameters
in_operandThe condition operand.
Returns
a new condition representing the logical negation of the operand.
ConditionalExpression HPS::ConditionalExpression::operator! ( ) const

A NOT condition is satisfied if its operand condition is not satisfied.

Returns
a new condition representing the logical negation of this object.

Check if the source object is equivalent to this object.

Parameters
in_thatThe source object to compare to this object.
Returns
true if the objects are not equivalent, false otherwise.
ConditionalExpression HPS::ConditionalExpression::operator&& ( ConditionalExpression const &  in_operand2) const

An AND condition is satisfied if both of its operand conditions are satisfied.

Parameters
in_operand2The condition to AND with this object.
Returns
a new condition representing the logical AND of the operand condition 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.

Parameters
in_thatAn rvalue reference to a ConditionalExpression to take the impl from.
Returns
A reference to this ConditionalExpression.
ConditionalExpression& HPS::ConditionalExpression::operator= ( ConditionalExpression const &  in_that)

Copies the source ConditionalExpression object to this object.

Parameters
in_thatThe source of the copy.
Returns
A reference to this object.
bool HPS::ConditionalExpression::operator== ( ConditionalExpression const &  in_that) const

Check if the source object is equivalent to this object.

Parameters
in_thatThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.
ConditionalExpression HPS::ConditionalExpression::operator^ ( ConditionalExpression const &  in_operand2) const

An XOR condition is satisfied if either operand condition is satisfied, but not both.

Parameters
in_operand2The condition to XOR with this object.
Returns
a new condition representing the logical XOR of the operand condition 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.

Parameters
in_operand2The condition to OR with this object.
Returns
a new condition representing the logical OR of the operand condition 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.

Parameters
in_operand2The condition to OR with this object.
Returns
a new condition representing the logical OR of the operand condition with this object.
static ConditionalExpression HPS::ConditionalExpression::OR ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An OR condition is satisfied if either of its operand conditions are satisfied.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new condition representing the logical OR of the operand conditions.
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.

Parameters
out_conditionThe condition string.
Returns
true if a condition string has been set, false otherwise.
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.

Parameters
out_specialThe intrinsic type.
Returns
true if an intrinsic type has been set, false otherwise.
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.

Parameters
out_numberThe number.
Returns
true if a number has been set, false otherwise.
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.

Parameters
out_operandsAn array of condition operands.
Returns
true if operands are set on this object, false otherwise.
ConditionalExpression HPS::ConditionalExpression::XOR ( ConditionalExpression const &  in_operand2) const

An XOR condition is satisfied if either operand condition is satisfied, but not both.

Parameters
in_operand2The condition to XOR with this object.
Returns
a new condition representing the logical XOR of the operand condition with this object.
static ConditionalExpression HPS::ConditionalExpression::XOR ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
static

An XOR condition is satisfied if either operand condition is satisfied, but not both.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new condition representing the logical XOR of the operand conditions.

Friends And Related Function Documentation

HPS_API ConditionalExpression AND ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An AND condition is satisfied if both of its operand conditions are satisfied.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new condition representing the logical AND of the operand conditions.
HPS_API ConditionalExpression EQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An EQ conditional expression is satisfied if its operand expressions are equal.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the equality comparison of the operand expressions.
HPS_API ConditionalExpression GT ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An GT conditional expression is satisfied if its second operand is greater than the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the greater than comparison of the operand expressions.
HPS_API ConditionalExpression GTEQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An GTEQ conditional expression is satisfied if its second operand is greater than or equal to the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the greater than or equal to comparison of the operands.
HPS_API ConditionalExpression LT ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An LT conditional expression is satisfied if its second operand is less than the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the less than comparison of the operand expressions.
HPS_API ConditionalExpression LTEQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An LTEQ conditional expression is satisfied if its second operand is less than or equal to the first operand.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the less than or equal to comparison of the operand expressions.
HPS_API ConditionalExpression NEQ ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An NEQ conditional expression is satisfied if its operand expressions are not equal.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new conditional expression representing the non-equality comparison of the operand expressions.
HPS_API ConditionalExpression NOT ( ConditionalExpression const &  in_operand)
friend

A NOT condition is satisfied if its operand condition is not satisfied.

Parameters
in_operandThe condition operand.
Returns
a new condition representing the logical negation of the operand.
HPS_API ConditionalExpression OR ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An OR condition is satisfied if either of its operand conditions are satisfied.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new condition representing the logical OR of the operand conditions.
HPS_API ConditionalExpression XOR ( ConditionalExpression const &  in_operand1,
ConditionalExpression const &  in_operand2 
)
friend

An XOR condition is satisfied if either operand condition is satisfied, but not both.

Parameters
in_operand1The first condition operand.
in_operand2The second condition operand.
Returns
a new condition representing the logical XOR of the operand conditions.

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