HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
defineResolverContext.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_DEFINE_RESOLVER_CONTEXT_H
8 #define PXR_USD_AR_DEFINE_RESOLVER_CONTEXT_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/usd/ar/api.h"
13 
14 /// \file ar/defineResolverContext.h
15 /// Macros for defining an object for use with ArResolverContext
16 
18 
19 /// \def AR_DECLARE_RESOLVER_CONTEXT
20 ///
21 /// Declare that the specified ContextObject type may be used as an asset
22 /// resolver context object for ArResolverContext. This typically
23 /// would be invoked in the header where the ContextObject is
24 /// declared.
25 ///
26 #ifdef doxygen
27 #define AR_DECLARE_RESOLVER_CONTEXT(ContextObject)
28 #else
29 #define AR_DECLARE_RESOLVER_CONTEXT(context) \
30 template <> \
31 struct ArIsContextObject<context> \
32 { \
33  static const bool value = true; \
34 }
35 #endif
36 
38 
39 #endif // PXR_USD_AR_DEFINE_RESOLVER_CONTEXT_H
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74