instancedBySchema.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_HD_INSTANCED_BY_SCHEMA_H
19 #define PXR_IMAGING_HD_INSTANCED_BY_SCHEMA_H
20 
22 
23 #include "pxr/imaging/hd/api.h"
24 
25 #include "pxr/imaging/hd/schema.h"
26 
27 // --(BEGIN CUSTOM CODE: Includes)--
28 // --(END CUSTOM CODE: Includes)--
29 
30 PXR_NAMESPACE_OPEN_SCOPE
31 
32 // --(BEGIN CUSTOM CODE: Declares)--
33 // --(END CUSTOM CODE: Declares)--
34 
35 #define HD_INSTANCED_BY_SCHEMA_TOKENS \
36  (instancedBy) \
37  (paths) \
38  (prototypeRoots) \
39 
40 TF_DECLARE_PUBLIC_TOKENS(HdInstancedBySchemaTokens, HD_API,
41  HD_INSTANCED_BY_SCHEMA_TOKENS);
42 
43 //-----------------------------------------------------------------------------
44 
45 
68 {
69 public:
72 
73  HdInstancedBySchema(HdContainerDataSourceHandle container)
74  : HdSchema(container) {}
75 
81  HD_API
83  const HdContainerDataSourceHandle &fromParentContainer);
84 
86 
87 // --(BEGIN CUSTOM CODE: Schema Methods)--
88 // --(END CUSTOM CODE: Schema Methods)--
89 
92 
93  HD_API
94  HdPathArrayDataSourceHandle GetPaths() const;
95 
96  HD_API
97  HdPathArrayDataSourceHandle GetPrototypeRoots() const;
98 
100 
103 
106  HD_API
107  static const TfToken &GetSchemaToken();
108 
111  HD_API
112  static const HdDataSourceLocator &GetDefaultLocator();
113 
115 
124 
126  HD_API
127  static const HdDataSourceLocator &GetPathsLocator();
129 
132 
140  HD_API
141  static HdContainerDataSourceHandle
143  const HdPathArrayDataSourceHandle &paths,
144  const HdPathArrayDataSourceHandle &prototypeRoots
145  );
146 
153  class Builder
154  {
155  public:
156  HD_API
157  Builder &SetPaths(
158  const HdPathArrayDataSourceHandle &paths);
159  HD_API
160  Builder &SetPrototypeRoots(
161  const HdPathArrayDataSourceHandle &prototypeRoots);
162 
164  HD_API
165  HdContainerDataSourceHandle Build();
166 
167  private:
168  HdPathArrayDataSourceHandle _paths;
169  HdPathArrayDataSourceHandle _prototypeRoots;
170 
171  };
172 
174 };
175 
176 PXR_NAMESPACE_CLOSE_SCOPE
177 
178 #endif
static HD_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPathArrayDataSourceHandle &paths, const HdPathArrayDataSourceHandle &prototypeRoots)
static HD_API const HdDataSourceLocator & GetPathsLocator()
Prim-level relative data source locator to locate paths.
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
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:25
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
A schema marking a prim as instanced by another prim.
static HD_API HdInstancedBySchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "instancedBy" from the parent ...