< Home

< Table of Contents

REFERENCE MANUAL

Condition Class Reference

#include <hps.h>

Inheritance diagram for Condition:
Object

Public Member Functions

Condition AND (Condition const &in_operand2) const
 
 Condition ()
 The default constructor creates an empty condition that is always satisfied.
 
 Condition (char const *in_utf8)
 
 Condition (Condition const &in_that)
 
 Condition (Condition &&in_that)
 
bool Equals (Condition const &in_that) const
 
Type ObjectType () const
 
Condition operator! () const
 
bool operator!= (Condition const &in_that) const
 
Condition operator&& (Condition const &in_operand2) const
 
Conditionoperator= (Condition &&in_that)
 
Conditionoperator= (Condition const &in_that)
 
bool operator== (Condition const &in_that) const
 
Condition operator^ (Condition const &in_operand2) const
 
Condition operator|| (Condition const &in_operand2) const
 
Condition OR (Condition const &in_operand2) const
 
bool ShowCondition (UTF8 &out_condition) const
 
bool ShowOperands (ConditionArray &out_operands) const
 
Condition XOR (Condition const &in_operand2) const
 
- Public Member Functions inherited from Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (Type in_mask) const
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
Type Type () const
 

Static Public Member Functions

static Condition AND (Condition const &in_operand1, Condition const &in_operand2)
 
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 Public Member Functions inherited from Object
template<typename T >
static intptr_t ClassID ()
 

Friends

HPS_API Condition AND (Condition const &in_operand1, Condition const &in_operand2)
 
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)
 

Detailed Description

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.

Constructor & Destructor Documentation

Condition::Condition ( char const *  in_utf8)

This constructor is the most common way to construct a Condition object from a string.

Parameters
in_utf8The string to use as the condition, assumed to be utf8 encoded.
Condition::Condition ( Condition const &  in_that)

The copy constructor copies the source condition.

Parameters
in_thatthe source to be copied.
Condition::Condition ( Condition &&  in_that)

The move constructor creates a Condition by transferring the underlying impl of the rvalue reference to this Condition thereby avoiding a copy and allocation.

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

Member Function Documentation

Condition Condition::AND ( Condition 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 Condition Condition::AND ( Condition const &  in_operand1,
Condition 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.
bool Condition::Equals ( Condition 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.
static Condition Condition::NOT ( Condition 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.
Type Condition::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from Object.

Condition Condition::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.
bool Condition::operator!= ( Condition 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 not equivalent, false otherwise.
Condition Condition::operator&& ( Condition 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.
Condition& Condition::operator= ( Condition &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this Condition thereby avoiding a copy.

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

Copies the source Condition object to this object.

Parameters
in_thatThe source of the copy.
Returns
A reference to this object.
bool Condition::operator== ( Condition 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.
Condition Condition::operator^ ( Condition 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.
Condition Condition::operator|| ( Condition 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.
Condition Condition::OR ( Condition 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 Condition Condition::OR ( Condition const &  in_operand1,
Condition 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 Condition::ShowCondition ( UTF8 out_condition) const

Shows the condition string that has been set on this object, if any. A Condition object cannot have both a condition string and operands simultaneously.

Parameters
out_conditionThe condition string.
Returns
true if a a condition string has been set, false otherwise.
bool Condition::ShowOperands ( ConditionArray &  out_operands) const

Retrieves the operands, if any, of this condition object. A Condition object cannot have both a condition string and operands simultaneously.

Parameters
out_operandsAn array of condition operands.
Returns
true if operands are set on this object, false otherwise.
Condition Condition::XOR ( Condition 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 Condition Condition::XOR ( Condition const &  in_operand1,
Condition 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 Condition AND ( Condition const &  in_operand1,
Condition 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 Condition NOT ( Condition 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 Condition OR ( Condition const &  in_operand1,
Condition 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 Condition XOR ( Condition const &  in_operand1,
Condition 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: