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 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 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 /* ************************************************************************** */
27 /* ** ** */
28 /* ** This file is generated by a script. ** */
29 /* ** ** */
30 /* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
31 /* ** Edit hdGen/schema.py instead to make changes. ** */
32 /* ** ** */
33 /* ************************************************************************** */
34 
35 #ifndef PXR_IMAGING_HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
36 #define PXR_IMAGING_HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
37 
38 #include "pxr/imaging/hd/api.h"
39 
41 
42 
44 
45 //-----------------------------------------------------------------------------
46 
47 #define HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS \
48  (interpolation) \
49  (role) \
50  (sourceComputation) \
51  (sourceComputationOutputName) \
52  (valueType) \
53 
54 TF_DECLARE_PUBLIC_TOKENS(HdExtComputationPrimvarSchemaTokens, HD_API,
56 
57 //-----------------------------------------------------------------------------
58 
60 {
61 public:
62  HdExtComputationPrimvarSchema(HdContainerDataSourceHandle container)
63  : HdSchema(container) {}
64 
65 // --(BEGIN CUSTOM CODE: Schema Methods)--
66 
67  // these return statically allocated instances for the common cases.
69  TfToken interpolation) {
71  }
72 
75  }
76 
77 // --(END CUSTOM CODE: Schema Methods)--
78 
79  //ACCESSORS
80 
81  HD_API
83  HD_API
85  HD_API
87  HD_API
89  HD_API
91 
92  // RETRIEVING AND CONSTRUCTING
93 
94  /// Builds a container data source which includes the provided child data
95  /// sources. Parameters with nullptr values are excluded. This is a
96  /// low-level interface. For cases in which it's desired to define
97  /// the container with a sparse set of child fields, the Builder class
98  /// is often more convenient and readable.
99  HD_API
100  static HdContainerDataSourceHandle
102  const HdTokenDataSourceHandle &interpolation,
103  const HdTokenDataSourceHandle &role,
104  const HdPathDataSourceHandle &sourceComputation,
105  const HdTokenDataSourceHandle &sourceComputationOutputName,
106  const HdTupleTypeDataSourceHandle &valueType
107  );
108 
109  /// \class HdExtComputationPrimvarSchema::Builder
110  ///
111  /// Utility class for setting sparse sets of child data source fields to be
112  /// filled as arguments into BuildRetained. Because all setter methods
113  /// return a reference to the instance, this can be used in the "builder
114  /// pattern" form.
115  class Builder
116  {
117  public:
118  HD_API
120  const HdTokenDataSourceHandle &interpolation);
121  HD_API
122  Builder &SetRole(
123  const HdTokenDataSourceHandle &role);
124  HD_API
126  const HdPathDataSourceHandle &sourceComputation);
127  HD_API
129  const HdTokenDataSourceHandle &sourceComputationOutputName);
130  HD_API
132  const HdTupleTypeDataSourceHandle &valueType);
133 
134  /// Returns a container data source containing the members set thus far.
135  HD_API
136  HdContainerDataSourceHandle Build();
137 
138  private:
139  HdTokenDataSourceHandle _interpolation;
141  HdPathDataSourceHandle _sourceComputation;
142  HdTokenDataSourceHandle _sourceComputationOutputName;
143  HdTupleTypeDataSourceHandle _valueType;
144  };
145 
146 };
147 
149 
150 #endif
HdTupleTypeDataSource::Handle HdTupleTypeDataSourceHandle
HD_API Builder & SetInterpolation(const HdTokenDataSourceHandle &interpolation)
static HD_API HdTokenDataSourceHandle BuildInterpolationDataSource(const TfToken &interpolation)
HD_API Builder & SetSourceComputation(const HdPathDataSourceHandle &sourceComputation)
#define HD_API
Definition: api.h:40
HD_API Builder & SetValueType(const HdTupleTypeDataSourceHandle &valueType)
HD_API HdTupleTypeDataSourceHandle GetValueType()
HD_API HdPathDataSourceHandle GetSourceComputation()
#define HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS
Definition: token.h:87
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 HdTokenDataSourceHandle GetRole()
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)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
HD_API HdTokenDataSourceHandle GetSourceComputationOutputName()
HD_API HdTokenDataSourceHandle GetInterpolation()
HdPathDataSource::Handle HdPathDataSourceHandle
TF_DECLARE_PUBLIC_TOKENS(HdExtComputationPrimvarSchemaTokens, HD_API, HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS)
HdTokenDataSource::Handle HdTokenDataSourceHandle