systemSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
8 
9 /* ************************************************************************** */
10 /* ** ** */
11 /* ** This file is generated by a script. ** */
12 /* ** ** */
13 /* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14 /* ** Edit hdSchemaDefs.py instead to make changes. ** */
15 /* ** ** */
16 /* ************************************************************************** */
17 
18 #ifndef PXR_IMAGING_HDAR_SYSTEM_SCHEMA_H
19 #define PXR_IMAGING_HDAR_SYSTEM_SCHEMA_H
20 
22 
23 #include "pxr/imaging/hdar/api.h"
24 
25 #include "pxr/imaging/hd/schema.h"
26 
27 // --(BEGIN CUSTOM CODE: Includes)--
29 // --(END CUSTOM CODE: Includes)--
30 
31 PXR_NAMESPACE_OPEN_SCOPE
32 
33 // --(BEGIN CUSTOM CODE: Declares)--
35 // --(END CUSTOM CODE: Declares)--
36 
37 #define HDAR_SYSTEM_SCHEMA_TOKENS \
38  (assetResolution) \
39  (resolverContext) \
40 
41 TF_DECLARE_PUBLIC_TOKENS(HdarSystemSchemaTokens, HDAR_API,
42  HDAR_SYSTEM_SCHEMA_TOKENS);
43 
44 //-----------------------------------------------------------------------------
45 
46 
52 class HdarSystemSchema : public HdSchema
53 {
54 public:
57 
58  HdarSystemSchema(HdContainerDataSourceHandle container)
59  : HdSchema(container) {}
60 
66  HDAR_API
68  const HdContainerDataSourceHandle &fromParentContainer);
69 
71 
72 // --(BEGIN CUSTOM CODE: Schema Methods)--
73 
81  HDAR_API
82  static HdContainerDataSourceHandle GetFromPath(
83  HdSceneIndexBaseRefPtr const &inputScene,
84  SdfPath const &fromPath,
85  SdfPath *foundAtPath);
86 
87 // --(END CUSTOM CODE: Schema Methods)--
88 
91 
92  HDAR_API
93  HdResolverContextDataSourceHandle GetResolverContext() const;
94 
96 
99 
102  HDAR_API
103  static const TfToken &GetSchemaToken();
104 
107  HDAR_API
108  static const HdDataSourceLocator &GetDefaultLocator();
109 
111 
114 
122  HDAR_API
123  static HdContainerDataSourceHandle
125  const HdResolverContextDataSourceHandle &resolverContext
126  );
127 
134  class Builder
135  {
136  public:
137  HDAR_API
138  Builder &SetResolverContext(
139  const HdResolverContextDataSourceHandle &resolverContext);
140 
142  HDAR_API
143  HdContainerDataSourceHandle Build();
144 
145  private:
146  HdResolverContextDataSourceHandle _resolverContext;
147 
148  };
149 
151 };
152 
153 PXR_NAMESPACE_CLOSE_SCOPE
154 
155 #endif
static HDAR_API HdarSystemSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "assetResolution" from the par...
static HDAR_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
Standard pointer typedefs.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: systemSchema.h:134
The HdarSystemSchema specifies a container that will hold "system" data that is relevant to asset res...
Definition: systemSchema.h:52
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:80
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92
Abstract interface to scene data.
Definition: sceneIndex.h:54
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
static HDAR_API HdContainerDataSourceHandle GetFromPath(HdSceneIndexBaseRefPtr const &inputScene, SdfPath const &fromPath, SdfPath *foundAtPath)
Evaluates the asset resolution "system" data source for fromPath.
static HDAR_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:25
HDAR_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static HDAR_API HdContainerDataSourceHandle BuildRetained(const HdResolverContextDataSourceHandle &resolverContext)