Usd Notice Framework  0.7.0
unf::NoticeTransaction Class Reference

Convenient RAII object to consolidate and filter notices derived from UnfNotice::StageNotice within a specific scope. More...

#include <transaction.h>

Public Member Functions

UNF_API NoticeTransaction (const BrokerPtr &, CapturePredicate predicate=CapturePredicate::Default())
 Create transaction from a Broker. More...
 
UNF_API NoticeTransaction (const BrokerPtr &, const CapturePredicateFunc &)
 Create transaction from a Broker with a capture predicate function. More...
 
UNF_API NoticeTransaction (const PXR_NS::UsdStageRefPtr &, CapturePredicate predicate=CapturePredicate::Default())
 Create transaction from a UsdStage. More...
 
UNF_API NoticeTransaction (const PXR_NS::UsdStageRefPtr &, const CapturePredicateFunc &)
 Create transaction from a UsdStage with a capture predicate function. More...
 
virtual UNF_API ~NoticeTransaction ()
 Delete object and end transaction.
 
UNF_API NoticeTransaction (const NoticeTransaction &)=delete
 Remove default copy constructor.
 
UNF_API NoticeTransactionoperator= (const NoticeTransaction &)=delete
 Remove default assignment operator.
 
UNF_API BrokerPtr GetBroker ()
 Return associated Broker instance.
 

Detailed Description

Convenient RAII object to consolidate and filter notices derived from UnfNotice::StageNotice within a specific scope.

Constructor & Destructor Documentation

◆ NoticeTransaction() [1/4]

UNF_API unf::NoticeTransaction::NoticeTransaction ( const BrokerPtr ,
CapturePredicate  predicate = CapturePredicate::Default() 
)

Create transaction from a Broker.

Notices derived from UnfNotice::StageNotice will be held during the transaction and emitted at the end.

By default, all UnfNotice::StageNotice notices will be captured during the entire scope of the transaction. A CapturePredicate can be passed to influence which notices are captured. Notices that are not captured will not be emitted.

◆ NoticeTransaction() [2/4]

UNF_API unf::NoticeTransaction::NoticeTransaction ( const BrokerPtr ,
const CapturePredicateFunc  
)

Create transaction from a Broker with a capture predicate function.

The following example will filter out all 'Foo' notices emitted during the transaction.

return (n.GetTypeId() != typeid(Foo).name());
});
UNF_API NoticeTransaction(const BrokerPtr &, CapturePredicate predicate=CapturePredicate::Default())
Create transaction from a Broker.
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

◆ NoticeTransaction() [3/4]

UNF_API unf::NoticeTransaction::NoticeTransaction ( const PXR_NS::UsdStageRefPtr ,
CapturePredicate  predicate = CapturePredicate::Default() 
)

Create transaction from a UsdStage.

Convenient constructor to encapsulate the creation of the broker.

See also
NoticeTransaction(const BrokerPtr &, CapturePredicate predicate = CapturePredicate::Default())

◆ NoticeTransaction() [4/4]

UNF_API unf::NoticeTransaction::NoticeTransaction ( const PXR_NS::UsdStageRefPtr ,
const CapturePredicateFunc  
)

Create transaction from a UsdStage with a capture predicate function.

Convenient constructor to encapsulate the creation of the broker.

See also
NoticeTransaction(const BrokerPtr &, const CapturePredicateFunc&)

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