Loading...
Searching...
No Matches
notice.h
1
//
2
// Copyright 2021 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
#ifndef PXR_USD_AR_NOTICE_H
8
#define PXR_USD_AR_NOTICE_H
9
10
#include "
pxr/pxr.h
"
11
12
#include "pxr/usd/ar/api.h"
13
#include "
pxr/usd/ar/resolverContext.h
"
14
15
#include "
pxr/base/tf/notice.h
"
16
17
#include <functional>
18
19
PXR_NAMESPACE_OPEN_SCOPE
20
23
class
ArNotice
24
{
25
public
:
28
class
ResolverNotice
29
:
public
TfNotice
30
{
31
public
:
32
AR_API
virtual
~ResolverNotice
();
33
protected
:
34
AR_API
ResolverNotice
();
35
};
36
40
class
ResolverChanged
41
:
public
ResolverNotice
42
{
43
public
:
47
AR_API
48
ResolverChanged
();
49
55
AR_API
56
ResolverChanged
(
57
const
std::function<
bool
(
const
ArResolverContext
&)>& affectsFn);
58
61
ResolverChanged
(
const
ArResolverContext
& ctx)
62
: _affects(
63
[ctx](const
ArResolverContext
& otherCtx) {
64
return
otherCtx.Contains(ctx);
65
})
66
{
67
}
68
72
template
<
73
class
ContextObj,
74
std::enable_if_t<ArIsContextObject<ContextObj>::value>* =
nullptr
75
>
76
ResolverChanged
(
77
const
ContextObj& contextObj)
78
: _affects(
79
[contextObj](const
ArResolverContext
& ctx) {
80
return
ctx.Contains(contextObj);
81
})
82
{
83
}
84
85
AR_API
86
virtual
~ResolverChanged();
87
90
AR_API
91
bool
AffectsContext
(
const
ArResolverContext
& ctx)
const
;
92
93
private
:
94
std::function<bool(
const
ArResolverContext
&)> _affects;
95
};
96
97
};
98
99
PXR_NAMESPACE_CLOSE_SCOPE
100
101
#endif
notice.h
ArNotice::ResolverChanged
Notice sent when asset paths may resolve to a different path than before due to a change in the resol...
Definition
notice.h:42
ArNotice::ResolverChanged::AffectsContext
AR_API bool AffectsContext(const ArResolverContext &ctx) const
Returns true if the results of asset resolution when ctx is bound may be affected by this resolver ch...
ArNotice::ResolverChanged::ResolverChanged
ResolverChanged(const ArResolverContext &ctx)
Create a notice indicating that the results of asset resolution when any ArResolverContext containing...
Definition
notice.h:61
ArNotice::ResolverChanged::ResolverChanged
ResolverChanged(const ContextObj &contextObj)
Create a notice indicating that the results of asset resolution when any ArResolverContext containing...
Definition
notice.h:76
ArNotice::ResolverChanged::ResolverChanged
AR_API ResolverChanged(const std::function< bool(const ArResolverContext &)> &affectsFn)
Create a notice using affectsFn to determine the ArResolverContext objects that are affected by this ...
ArNotice::ResolverChanged::ResolverChanged
AR_API ResolverChanged()
Create a notice indicating that the results of asset resolution might have changed,...
ArNotice::ResolverNotice
Base class for all ArResolver-related notices.
Definition
notice.h:30
ArResolverContext
An asset resolver context allows clients to provide additional data to the resolver for use during re...
Definition
resolverContext.h:108
TfNotice
The base class for objects used to notify interested parties (listeners) when events have occurred.
Definition
notice.h:80
pxr.h
resolverContext.h
pxr
usd
ar
notice.h
© Copyright 2026, Pixar Animation Studios. |
Terms of Use
| Generated on Tue Sep 8 2026 12:32:17 by
1.12.0