Loading...
Searching...
No Matches
SdfPredicateFunctionResult Class Reference

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 { 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'.
 

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)
 

Detailed Description

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 115 of file predicateLibrary.h.

Member Enumeration Documentation

◆ Constancy

enum Constancy

Definition at line 118 of file predicateLibrary.h.

Constructor & Destructor Documentation

◆ SdfPredicateFunctionResult() [1/3]

constexpr SdfPredicateFunctionResult ( )
inlineconstexpr

Default construction produces a 'false' result that 'MayVaryOverDescendants'.

Definition at line 122 of file predicateLibrary.h.

◆ SdfPredicateFunctionResult() [2/3]

SdfPredicateFunctionResult ( bool  value)
inlineexplicit

Construct with value and MayVaryOverDescendants constancy.

Definition at line 126 of file predicateLibrary.h.

◆ SdfPredicateFunctionResult() [3/3]

SdfPredicateFunctionResult ( bool  value,
Constancy  constancy 
)
inline

Construct with value and constancy.

Definition at line 130 of file predicateLibrary.h.

Member Function Documentation

◆ GetConstancy()

Constancy GetConstancy ( ) const
inline

Return the result constancy.

Definition at line 149 of file predicateLibrary.h.

◆ GetValue()

bool GetValue ( ) const
inline

Return the result value.

Definition at line 144 of file predicateLibrary.h.

◆ IsConstant()

bool IsConstant ( ) const
inline

Return true if this result's constancy is ConstantOverDescendants.

Definition at line 154 of file predicateLibrary.h.

◆ MakeConstant()

static SdfPredicateFunctionResult MakeConstant ( bool  value)
inlinestatic

Create with value and 'ConstantOverDescendants'.

Definition at line 134 of file predicateLibrary.h.

◆ MakeVarying()

static SdfPredicateFunctionResult MakeVarying ( bool  value)
inlinestatic

Create with value and 'MayVaryOverDescendants'.

Definition at line 139 of file predicateLibrary.h.

◆ operator UnspecifiedBoolType()

operator UnspecifiedBoolType ( ) const
inline

doxygen

Return GetValue().

Definition at line 163 of file predicateLibrary.h.

◆ operator!()

SdfPredicateFunctionResult operator! ( ) const
inline

Return a result with the opposite value but the same constancy.

Definition at line 168 of file predicateLibrary.h.

◆ SetAndPropagateConstancy()

void SetAndPropagateConstancy ( SdfPredicateFunctionResult  other)
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 176 of file predicateLibrary.h.

Friends And Related Function Documentation

◆ operator!= [1/3]

bool operator!= ( bool  lhs,
SdfPredicateFunctionResult  pfr 
)
friend

Definition at line 204 of file predicateLibrary.h.

◆ operator!= [2/3]

Definition at line 190 of file predicateLibrary.h.

◆ operator!= [3/3]

bool operator!= ( SdfPredicateFunctionResult  pfr,
bool  rhs 
)
friend

Definition at line 201 of file predicateLibrary.h.

◆ operator== [1/3]

bool operator== ( bool  lhs,
SdfPredicateFunctionResult  pfr 
)
friend

Definition at line 198 of file predicateLibrary.h.

◆ operator== [2/3]

bool operator== ( SdfPredicateFunctionResult  lhs,
SdfPredicateFunctionResult  rhs 
)
friend

Definition at line 185 of file predicateLibrary.h.

◆ operator== [3/3]

bool operator== ( SdfPredicateFunctionResult  pfr,
bool  rhs 
)
friend

Definition at line 195 of file predicateLibrary.h.


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