HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
resolverContextBinder.h
Go to the documentation of this file.
1
//
2
// Copyright 2016 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_RESOLVER_CONTEXT_BINDER_H
8
#define PXR_USD_AR_RESOLVER_CONTEXT_BINDER_H
9
10
/// \file ar/resolverContextBinder.h
11
12
#include "
pxr/pxr.h
"
13
#include "
pxr/usd/ar/api.h
"
14
#include "
pxr/usd/ar/resolverContext.h
"
15
#include "
pxr/base/vt/value.h
"
16
17
PXR_NAMESPACE_OPEN_SCOPE
18
19
class
ArResolver
;
20
21
/// \class ArResolverContextBinder
22
///
23
/// Helper object for managing the binding and unbinding of
24
/// ArResolverContext objects with the asset resolver.
25
///
26
/// Context binding and unbinding are thread-specific. If you bind a context in
27
/// a thread, that binding will only be visible to that thread.
28
/// See \ref ar_resolver_contexts "Resolver Contexts" for more details.
29
///
30
/// \see \ref ArResolver_context "Asset Resolver Context Operations"
31
class
ArResolverContextBinder
32
{
33
public
:
34
/// Bind the given \p context with the asset resolver.
35
///
36
/// Calls ArResolver::BindContext on the configured asset resolver
37
/// and saves the bindingData populated by that function.
38
AR_API
39
ArResolverContextBinder
(
40
const
ArResolverContext
& context);
41
42
/// Bind the given \p context to the given \p assetResolver.
43
///
44
/// Calls ArResolver::BindContext on the given \p assetResolver
45
/// and saves the bindingData populated by that function.
46
AR_API
47
ArResolverContextBinder
(
48
ArResolver
* assetResolver,
49
const
ArResolverContext
& context);
50
51
/// Unbinds the context specified in the constructor of this
52
/// object from the asset resolver.
53
///
54
/// Calls ArResolver::UnbindContext on the asset resolver that was
55
/// bound to originally, passing the saved bindingData to that function.
56
AR_API
57
~ArResolverContextBinder
();
58
59
private
:
60
ArResolver
* _resolver;
61
ArResolverContext
_context;
62
VtValue
_bindingData;
63
};
64
65
PXR_NAMESPACE_CLOSE_SCOPE
66
67
#endif // PXR_USD_AR_RESOLVER_CONTEXT_BINDER_H
value.h
AR_API
#define AR_API
Definition:
api.h:23
resolverContext.h
api.h
ArResolverContextBinder::~ArResolverContextBinder
AR_API ~ArResolverContextBinder()
pxr.h
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
ArResolverContext
Definition:
resolverContext.h:107
ArResolverContextBinder::ArResolverContextBinder
AR_API ArResolverContextBinder(const ArResolverContext &context)
ArResolverContextBinder
Definition:
resolverContextBinder.h:31
VtValue
Definition:
value.h:146
ArResolver
Definition:
resolver.h:42
pxr
usd
ar
resolverContextBinder.h
Generated on Wed Aug 27 2025 03:07:56 for HDK by
1.8.6