Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
c
d
e
f
h
i
k
l
m
o
p
r
s
t
v
w
Enumerator
a
b
c
d
e
i
l
m
n
o
p
r
t
u
Related Functions
b
g
h
o
s
t
Files
File List
File Members
All
_
a
c
g
h
j
n
o
p
s
t
u
v
w
Functions
a
c
g
h
j
n
o
p
s
t
u
v
w
Variables
Typedefs
a
g
n
p
s
t
u
Enumerations
Enumerator
Macros
_
a
g
n
p
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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
21
template
<
class
ContextObj>
22
bool
Ar_ContextIsHolding(
23
const
ContextObj& contextObj,
const
ArResolverContext
& ctx)
24
{
25
const
ContextObj* testObj = ctx.
Get
<ContextObj>();
26
return
testObj && *testObj == contextObj;
27
}
28
31
class
ArNotice
32
{
33
public
:
36
class
ResolverNotice
37
:
public
TfNotice
38
{
39
public
:
40
AR_API
virtual
~ResolverNotice
();
41
protected
:
42
AR_API
ResolverNotice
();
43
};
44
48
class
ResolverChanged
49
:
public
ResolverNotice
50
{
51
public
:
55
AR_API
56
ResolverChanged
();
57
63
AR_API
64
ResolverChanged
(
65
const
std::function<
bool
(
const
ArResolverContext
&)>& affectsFn);
66
70
template
<
71
class
ContextObj,
72
typename
std::enable_if<ArIsContextObject<ContextObj>::value>::type*
73
=
nullptr
>
74
ResolverChanged
(
75
const
ContextObj& contextObj)
76
// XXX: Ideally this would just use a lambda and forward it to
77
// the other c'tor. Both of those cause issues in MSVC 2015; the
78
// first causes an unspecified type error and the second causes
79
// odd linker errors.
80
: _affects(
std
::bind(&Ar_ContextIsHolding<ContextObj>, contextObj,
81
std
::placeholders::_1))
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:50
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 ContextObj &contextObj)
Create a notice indicating that the results of asset resolution when any ArResolverContext containing...
Definition:
notice.h:74
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:38
ArResolverContext
An asset resolver context allows clients to provide additional data to the resolver for use during re...
Definition:
resolverContext.h:108
ArResolverContext::Get
const ContextObj * Get() const
Returns pointer to the context object of the given type held in this resolver context.
Definition:
resolverContext.h:161
TfNotice
The base class for objects used to notify interested parties (listeners) when events have occurred.
Definition:
notice.h:76
std
STL namespace.
pxr.h
resolverContext.h
pxr
usd
ar
notice.h
© Copyright 2024, Pixar Animation Studios. |
Terms of Use
| Generated on Thu Oct 24 2024 22:27:06 by
1.9.6