![]() |
|
Represents the result of a predicate function: a pair of the boolean result and a Constancy token indicating whether the function result is constant over "descendant" objects, or that it might vary over "descendant" objects. More...
#include <predicateLibrary.h>
Public Types | |
| enum | Constancy : char { ConstantOverDescendants , MayVaryOverDescendants } |
Public Member Functions | |
| constexpr | SdfPredicateFunctionResult () |
| Default construction produces a 'false' result that 'MayVaryOverDescendants'. | |
| SdfPredicateFunctionResult (bool value) | |
Construct with value and MayVaryOverDescendants constancy. | |
| SdfPredicateFunctionResult (bool value, Constancy constancy) | |
Construct with value and constancy. | |
| bool | GetValue () const |
| Return the result value. | |
| Constancy | GetConstancy () const |
| Return the result constancy. | |
| bool | IsConstant () const |
| Return true if this result's constancy is ConstantOverDescendants. | |
| operator UnspecifiedBoolType () const | |
| doxygen | |
| SdfPredicateFunctionResult | operator! () const |
| Return a result with the opposite value but the same constancy. | |
| void | SetAndPropagateConstancy (SdfPredicateFunctionResult other) |
Set this result's value to other's value, and propagate constancy; if both this and other are ConstantOverDescendants, this object's constancy remains ConstantOverDescendants. | |
Static Public Member Functions | |
| static SdfPredicateFunctionResult | MakeConstant (bool value) |
Create with value and 'ConstantOverDescendants'. | |
| static SdfPredicateFunctionResult | MakeVarying (bool value) |
Create with value and 'MayVaryOverDescendants'. | |
| static SdfPredicateFunctionResult | And (SdfPredicateFunctionResult lhs, SdfPredicateFunctionResult rhs) |
Return the logical and of lhs and rhs with constancy propagation. | |
| static SdfPredicateFunctionResult | Or (SdfPredicateFunctionResult lhs, SdfPredicateFunctionResult rhs) |
Return the logical or of lhs and rhs with constancy propagation. | |
Friends | |
| bool | operator== (SdfPredicateFunctionResult lhs, SdfPredicateFunctionResult rhs) |
| bool | operator!= (SdfPredicateFunctionResult lhs, SdfPredicateFunctionResult rhs) |
| bool | operator== (SdfPredicateFunctionResult pfr, bool rhs) |
| bool | operator== (bool lhs, SdfPredicateFunctionResult pfr) |
| bool | operator!= (SdfPredicateFunctionResult pfr, bool rhs) |
| bool | operator!= (bool lhs, SdfPredicateFunctionResult pfr) |
Represents the result of a predicate function: a pair of the boolean result and a Constancy token indicating whether the function result is constant over "descendant" objects, or that it might vary over "descendant" objects.
Definition at line 98 of file predicateLibrary.h.
| enum Constancy : char |
Definition at line 101 of file predicateLibrary.h.
|
inlineconstexpr |
Default construction produces a 'false' result that 'MayVaryOverDescendants'.
Definition at line 105 of file predicateLibrary.h.
|
inlineexplicit |
Construct with value and MayVaryOverDescendants constancy.
Definition at line 109 of file predicateLibrary.h.
|
inline |
Construct with value and constancy.
Definition at line 113 of file predicateLibrary.h.
|
inlinestatic |
Return the logical and of lhs and rhs with constancy propagation.
If either value is false and ConstantOverDescendants, the result is false and ConstantOverDescendants. If both values are true and ConstantOverDescendants the result is true and ConstantOverDescendants. Otherwise the result is the logical and of the truth values and MayVaryOverDescendants.
Definition at line 133 of file predicateLibrary.h.
|
inline |
Return the result constancy.
Definition at line 162 of file predicateLibrary.h.
|
inline |
Return the result value.
Definition at line 157 of file predicateLibrary.h.
|
inline |
Return true if this result's constancy is ConstantOverDescendants.
Definition at line 167 of file predicateLibrary.h.
|
inlinestatic |
Create with value and 'ConstantOverDescendants'.
Definition at line 117 of file predicateLibrary.h.
|
inlinestatic |
Create with value and 'MayVaryOverDescendants'.
Definition at line 122 of file predicateLibrary.h.
|
inline |
|
inline |
Return a result with the opposite value but the same constancy.
Definition at line 181 of file predicateLibrary.h.
|
inlinestatic |
Return the logical or of lhs and rhs with constancy propagation.
If either value is true and ConstantOverDescendants, the result is true and ConstantOverDescendants. If both values are false and ConstantOverDescendants the result is false and ConstantOverDescendants. Otherwise the result is the logical or of the truth values and MayVaryOverDescendants.
Definition at line 148 of file predicateLibrary.h.
|
inline |
Set this result's value to other's value, and propagate constancy; if both this and other are ConstantOverDescendants, this object's constancy remains ConstantOverDescendants.
Otherwise set this object's constancy to MayVaryOverDescendants.
Definition at line 189 of file predicateLibrary.h.
|
friend |
Definition at line 217 of file predicateLibrary.h.
|
friend |
Definition at line 203 of file predicateLibrary.h.
|
friend |
Definition at line 214 of file predicateLibrary.h.
|
friend |
Definition at line 211 of file predicateLibrary.h.
|
friend |
Definition at line 198 of file predicateLibrary.h.
|
friend |
Definition at line 208 of file predicateLibrary.h.