Usd Notice Framework 0.8.1
Loading...
Searching...
No Matches
transaction.h
Go to the documentation of this file.
1#ifndef USD_NOTICE_FRAMEWORK_TRANSACTION_H
2#define USD_NOTICE_FRAMEWORK_TRANSACTION_H
3
5
6#include "unf/api.h"
7#include "unf/broker.h"
9
10#include <pxr/pxr.h>
11#include <pxr/usd/usd/common.h>
12
13namespace unf {
14
22 public:
34 const BrokerPtr &,
36
49
61
69
72
74 UNF_API virtual ~NoticeTransaction();
75
77 UNF_API NoticeTransaction(const NoticeTransaction &) = delete;
78
80 UNF_API NoticeTransaction &operator=(const NoticeTransaction &) = delete;
81
83 UNF_API BrokerPtr GetBroker() { return _broker; }
84
85 private:
87 BrokerPtr _broker;
88};
89
90} // namespace unf
91
92#endif // USD_NOTICE_FRAMEWORK_TRANSACTION_H
Predicate functor which indicates whether a notice can be captured during a transaction.
Definition capturePredicate.h:29
static UNF_API CapturePredicate Default()
Create a predicate which return true for each notice type.
Convenient RAII object to consolidate and filter notices derived from UnfNotice::StageNotice within a...
Definition transaction.h:21
UNF_API NoticeTransaction(const PXR_NS::UsdStageRefPtr &, CapturePredicate predicate=CapturePredicate::Default())
Create transaction from a UsdStage.
UNF_API BrokerPtr GetBroker()
Return associated Broker instance.
Definition transaction.h:83
UNF_API NoticeTransaction(const BrokerPtr &, const CapturePredicateFunc &)
Create transaction from a Broker with a capture predicate function.
UNF_API NoticeTransaction(const PXR_NS::UsdStageRefPtr &, const CapturePredicateFunc &)
Create transaction from a UsdStage with a capture predicate function.
UNF_API NoticeTransaction & operator=(const NoticeTransaction &)=delete
Remove default assignment operator.
UNF_API NoticeTransaction(const NoticeTransaction &)=delete
Remove default copy constructor.
UNF_API NoticeTransaction(const BrokerPtr &, CapturePredicate predicate=CapturePredicate::Default())
Create transaction from a Broker.
virtual UNF_API ~NoticeTransaction()
Delete object and end transaction.
std::function< bool(const UnfNotice::StageNotice &)> CapturePredicateFunc
Convenient alias for function defining whether notice can be captured.
Definition capturePredicate.h:16