HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extComputationPrimvarSchema.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 //
7 ////////////////////////////////////////////////////////////////////////
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_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
19 #define PXR_IMAGING_HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
20 
21 /// \file
22 
23 #include "pxr/imaging/hd/api.h"
25 
26 #include "pxr/imaging/hd/schema.h"
27 
28 // --(BEGIN CUSTOM CODE: Includes)--
29 // --(END CUSTOM CODE: Includes)--
30 
32 
33 // --(BEGIN CUSTOM CODE: Declares)--
34 // --(END CUSTOM CODE: Declares)--
35 
36 #define HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS \
37  (interpolation) \
38  (role) \
39  (sourceComputation) \
40  (sourceComputationOutputName) \
41  (valueType) \
42 
43 TF_DECLARE_PUBLIC_TOKENS(HdExtComputationPrimvarSchemaTokens, HD_API,
45 
46 //-----------------------------------------------------------------------------
47 
48 
49 /// \class HdExtComputationPrimvarSchema
50 ///
52 {
53 public:
54  /// \name Schema retrieval
55  /// @{
56 
57  HdExtComputationPrimvarSchema(HdContainerDataSourceHandle container)
58  : HdSchema(container) {}
59 
60  /// @}
61 
62 // --(BEGIN CUSTOM CODE: Schema Methods)--
63 
64  // these return statically allocated instances for the common cases.
66  TfToken interpolation) {
68  }
69 
72  }
73 
74 // --(END CUSTOM CODE: Schema Methods)--
75 
76  /// \name Member accessor
77  /// @{
78 
79  HD_API
81 
82  HD_API
84 
85  HD_API
87 
88  HD_API
90 
91  HD_API
93 
94  /// @}
95 
96  /// \name Schema construction
97  /// @{
98 
99  /// \deprecated Use Builder instead.
100  ///
101  /// Builds a container data source which includes the provided child data
102  /// sources. Parameters with nullptr values are excluded. This is a
103  /// low-level interface. For cases in which it's desired to define
104  /// the container with a sparse set of child fields, the Builder class
105  /// is often more convenient and readable.
106  HD_API
107  static HdContainerDataSourceHandle
109  const HdTokenDataSourceHandle &interpolation,
110  const HdTokenDataSourceHandle &role,
111  const HdPathDataSourceHandle &sourceComputation,
112  const HdTokenDataSourceHandle &sourceComputationOutputName,
113  const HdTupleTypeDataSourceHandle &valueType
114  );
115 
116  /// \class HdExtComputationPrimvarSchema::Builder
117  ///
118  /// Utility class for setting sparse sets of child data source fields to be
119  /// filled as arguments into BuildRetained. Because all setter methods
120  /// return a reference to the instance, this can be used in the "builder
121  /// pattern" form.
122  class Builder
123  {
124  public:
125  HD_API
127  const HdTokenDataSourceHandle &interpolation);
128  HD_API
129  Builder &SetRole(
130  const HdTokenDataSourceHandle &role);
131  HD_API
133  const HdPathDataSourceHandle &sourceComputation);
134  HD_API
136  const HdTokenDataSourceHandle &sourceComputationOutputName);
137  HD_API
139  const HdTupleTypeDataSourceHandle &valueType);
140 
141  /// Returns a container data source containing the members set thus far.
142  HD_API
143  HdContainerDataSourceHandle Build();
144 
145  private:
146  HdTokenDataSourceHandle _interpolation;
148  HdPathDataSourceHandle _sourceComputation;
149  HdTokenDataSourceHandle _sourceComputationOutputName;
150  HdTupleTypeDataSourceHandle _valueType;
151 
152  };
153 
154  /// @}
155 };
156 
158 
159 #endif
HdTupleTypeDataSource::Handle HdTupleTypeDataSourceHandle
HD_API Builder & SetInterpolation(const HdTokenDataSourceHandle &interpolation)
static HD_API HdTokenDataSourceHandle BuildInterpolationDataSource(const TfToken &interpolation)
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
HD_API Builder & SetSourceComputation(const HdPathDataSourceHandle &sourceComputation)
#define HD_API
Definition: api.h:23
HD_API Builder & SetValueType(const HdTupleTypeDataSourceHandle &valueType)
HD_API HdTokenDataSourceHandle GetInterpolation() const
HD_API HdTupleTypeDataSourceHandle GetValueType() const
#define HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS
HD_API HdPathDataSourceHandle GetSourceComputation() const
Definition: token.h:70
HD_API HdTokenDataSourceHandle GetSourceComputationOutputName() const
HD_API HdTokenDataSourceHandle GetRole() const
HdExtComputationPrimvarSchema(HdContainerDataSourceHandle container)
static HD_API HdTokenDataSourceHandle BuildRoleDataSource(const TfToken &role)
HD_API Builder & SetRole(const HdTokenDataSourceHandle &role)
static HdTokenDataSourceHandle BuildRoleDataSource(TfToken role)
static HdTokenDataSourceHandle BuildInterpolationDataSource(TfToken interpolation)
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static HD_API HdContainerDataSourceHandle BuildRetained(const HdTokenDataSourceHandle &interpolation, const HdTokenDataSourceHandle &role, const HdPathDataSourceHandle &sourceComputation, const HdTokenDataSourceHandle &sourceComputationOutputName, const HdTupleTypeDataSourceHandle &valueType)
HD_API Builder & SetSourceComputationOutputName(const HdTokenDataSourceHandle &sourceComputationOutputName)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HdPathDataSource::Handle HdPathDataSourceHandle
TF_DECLARE_PUBLIC_TOKENS(HdExtComputationPrimvarSchemaTokens, HD_API, HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS)
HdTokenDataSource::Handle HdTokenDataSourceHandle