Loading...
Searching...
No Matches
SdfPredicateProgram< DomainType > Class Template Reference

Represents a callable "program", the result of linking an SdfPredicateExpression with an SdfPredicateLibrary via SdfLinkPredicateExpression(). More...

#include <predicateProgram.h>

Public Types

using PredicateFunction = typename SdfPredicateLibrary< DomainType >::PredicateFunction
 

Public Member Functions

 operator bool () const
 Return true if this program has any ops, false otherwise.
 
SdfPredicateFunctionResult operator() (DomainType const &obj) const
 Run the predicate program on obj, and return the result.
 

Friends

SdfPredicateProgram SdfLinkPredicateExpression (SdfPredicateExpression const &expr, SdfPredicateLibrary< DomainType > const &lib)
 Link expr with lib and return a callable program that evaluates expr on given objects of the DomainType.
 

Detailed Description

template<class DomainType>
class SdfPredicateProgram< DomainType >

Represents a callable "program", the result of linking an SdfPredicateExpression with an SdfPredicateLibrary via SdfLinkPredicateExpression().

The main public interface this class exposes is the function-call operator(), accepting a single argument of type DomainType, as it is specified to the template. Consider using const Type & as the DomainType for both SdfPredicateProgram and SdfPredicateLibrary if it's important that domain type instances aren't passed by-value.

Definition at line 68 of file predicateProgram.h.

Member Typedef Documentation

◆ PredicateFunction

using PredicateFunction = typename SdfPredicateLibrary<DomainType>::PredicateFunction

Definition at line 71 of file predicateProgram.h.

Member Function Documentation

◆ operator bool()

operator bool ( ) const
inlineexplicit

Return true if this program has any ops, false otherwise.

Definition at line 80 of file predicateProgram.h.

◆ operator()()

SdfPredicateFunctionResult operator() ( DomainType const &  obj) const
inline

Run the predicate program on obj, and return the result.

Definition at line 86 of file predicateProgram.h.

Friends And Related Function Documentation

◆ SdfLinkPredicateExpression

SdfPredicateProgram SdfLinkPredicateExpression ( SdfPredicateExpression const &  expr,
SdfPredicateLibrary< DomainType > const &  lib 
)
friend

Link expr with lib and return a callable program that evaluates expr on given objects of the DomainType.

If linking expr and lib fails, issue a TF_RUNTIME_ERROR with a message, and return an empty program.

Definition at line 165 of file predicateProgram.h.


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