systemSchema.h
1 //
2 // Copyright 2022 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
25 // This file is generated by a script. Do not edit directly. Edit the
26 // schema.template.h file to make changes.
27 
28 #ifndef PXR_IMAGING_HDAR_SYSTEM_SCHEMA_H
29 #define PXR_IMAGING_HDAR_SYSTEM_SCHEMA_H
30 
31 #include "pxr/imaging/hdar/api.h"
32 
33 #include "pxr/imaging/hd/schema.h"
34 
36 
37 PXR_NAMESPACE_OPEN_SCOPE
38 
39 //-----------------------------------------------------------------------------
40 
41 #define HDARSYSTEM_SCHEMA_TOKENS \
42  (assetResolution) \
43  (resolverContext) \
44 
45 TF_DECLARE_PUBLIC_TOKENS(HdarSystemSchemaTokens, HDAR_API,
46  HDARSYSTEM_SCHEMA_TOKENS);
47 
48 //-----------------------------------------------------------------------------
49 
51 
54 class HdarSystemSchema : public HdSchema
55 {
56 public:
57  HdarSystemSchema(HdContainerDataSourceHandle container)
58  : HdSchema(container) {}
59 
60  //ACCESSORS
61 
62  HDAR_API
63  HdResolverContextDataSourceHandle GetResolverContext();
64 
65  // RETRIEVING AND CONSTRUCTING
66 
72  HDAR_API
73  static HdContainerDataSourceHandle
75  const HdResolverContextDataSourceHandle &resolverContext
76  );
77 
84  class Builder
85  {
86  public:
87  HDAR_API
88  Builder &SetResolverContext(
89  const HdResolverContextDataSourceHandle &resolverContext);
90 
92  HDAR_API
93  HdContainerDataSourceHandle Build();
94 
95  private:
96  HdResolverContextDataSourceHandle _resolverContext;
97  };
98 
106  HD_API
107  static HdContainerDataSourceHandle GetFromPath(
108  HdSceneIndexBaseRefPtr const &inputScene,
109  SdfPath const &fromPath,
110  SdfPath *foundAtPath);
111 
117  HDAR_API
119  const HdContainerDataSourceHandle &fromParentContainer);
120 
123  HDAR_API
124  static const HdDataSourceLocator &GetDefaultLocator();
125 
126 };
127 
128 PXR_NAMESPACE_CLOSE_SCOPE
129 
130 #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...
Standard pointer typedefs.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: systemSchema.h:84
The HdarSystemSchema specifies a container that will hold "system" data that is relevant to asset res...
Definition: systemSchema.h:54
Represents an object that can identify the location of a data source.
static HD_API HdContainerDataSourceHandle GetFromPath(HdSceneIndexBaseRefPtr const &inputScene, SdfPath const &fromPath, SdfPath *foundAtPath)
Evaluates the asset resolution "system" data source for fromPath.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
Abstract interface to scene data.
Definition: sceneIndex.h:62
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
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:75
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:42
HDAR_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static HDAR_API HdContainerDataSourceHandle BuildRetained(const HdResolverContextDataSourceHandle &resolverContext)
Builds a container data source which includes the provided child data sources.