Usd Notice Framework 0.8.1
Loading...
Searching...
No Matches
unf::CapturePredicate Class Reference

Predicate functor which indicates whether a notice can be captured during a transaction. More...

#include <capturePredicate.h>

Public Member Functions

UNF_API CapturePredicate (const CapturePredicateFunc &)
 Create predicate from a function.
 
UNF_API bool operator() (const UnfNotice::StageNotice &) const
 Invoke boolean predicate on UnfNotice::StageNotice notice.
 

Static Public Member Functions

static UNF_API CapturePredicate Default ()
 Create a predicate which return true for each notice type.
 
static UNF_API CapturePredicate BlockAll ()
 Create a predicate which return false for each notice type.
 

Detailed Description

Predicate functor which indicates whether a notice can be captured during a transaction.

Common predicates are provided as static methods for convenience.

Note
We used a functor embedding a CapturePredicateFunc instead of defining common predicates via free functions to simplify the Python binding process.

Constructor & Destructor Documentation

◆ CapturePredicate()

UNF_API unf::CapturePredicate::CapturePredicate ( const CapturePredicateFunc )

Create predicate from a function.

The following example will create a predicate which will return false for a 'Foo' notice.

return (n.GetTypeId() != typeid(Foo).name());
});
Predicate functor which indicates whether a notice can be captured during a transaction.
Definition capturePredicate.h:29
Base class for standalone PXR_NS::UsdStage notices.
Definition notice.h:47
virtual UNF_API std::string GetTypeId() const
Interface method for returing unique type identifier.
Definition notice.h:84

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