HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extComputationOutputSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2021 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 // 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_HD_EXT_COMPUTATION_OUTPUT_SCHEMA_H
29 #define PXR_IMAGING_HD_EXT_COMPUTATION_OUTPUT_SCHEMA_H
30 
31 #include "pxr/imaging/hd/api.h"
32 
33 #include "pxr/imaging/hd/schema.h"
34 
36 
37 //-----------------------------------------------------------------------------
38 
39 #define HDEXTCOMPUTATIONOUTPUT_SCHEMA_TOKENS \
40  (name) \
41  (valueType) \
42 
43 TF_DECLARE_PUBLIC_TOKENS(HdExtComputationOutputSchemaTokens, HD_API,
45 
46 //-----------------------------------------------------------------------------
47 
49 {
50 public:
51  HdExtComputationOutputSchema(HdContainerDataSourceHandle container)
52  : HdSchema(container) {}
53 
54  //ACCESSORS
55 
56  HD_API
58  HD_API
60 
61  // RETRIEVING AND CONSTRUCTING
62 
63  /// Builds a container data source which includes the provided child data
64  /// sources. Parameters with nullptr values are excluded. This is a
65  /// low-level interface. For cases in which it's desired to define
66  /// the container with a sparse set of child fields, the Builder class
67  /// is often more convenient and readable.
68  HD_API
69  static HdContainerDataSourceHandle
72  const HdTupleTypeDataSourceHandle &valueType
73  );
74 
75  /// \class HdExtComputationOutputSchema::Builder
76  ///
77  /// Utility class for setting sparse sets of child data source fields to be
78  /// filled as arguments into BuildRetained. Because all setter methods
79  /// return a reference to the instance, this can be used in the "builder
80  /// pattern" form.
81  class Builder
82  {
83  public:
84  HD_API
87  HD_API
89  const HdTupleTypeDataSourceHandle &valueType);
90 
91  /// Returns a container data source containing the members set thus far.
92  HD_API
93  HdContainerDataSourceHandle Build();
94 
95  private:
97  HdTupleTypeDataSourceHandle _valueType;
98  };
99 
100 };
101 
103 
104 #endif
HdTupleTypeDataSource::Handle HdTupleTypeDataSourceHandle
static HD_API HdContainerDataSourceHandle BuildRetained(const HdTokenDataSourceHandle &name, const HdTupleTypeDataSourceHandle &valueType)
#define HD_API
Definition: api.h:40
HD_API Builder & SetName(const HdTokenDataSourceHandle &name)
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
HdExtComputationOutputSchema(HdContainerDataSourceHandle container)
#define HDEXTCOMPUTATIONOUTPUT_SCHEMA_TOKENS
HD_API HdTokenDataSourceHandle GetName()
GLuint const GLchar * name
Definition: glcorearb.h:786
HD_API Builder & SetValueType(const HdTupleTypeDataSourceHandle &valueType)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
HD_API HdTupleTypeDataSourceHandle GetValueType()
HdTokenDataSource::Handle HdTokenDataSourceHandle
TF_DECLARE_PUBLIC_TOKENS(HdExtComputationOutputSchemaTokens, HD_API, HDEXTCOMPUTATIONOUTPUT_SCHEMA_TOKENS)