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 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_OUTPUT_SCHEMA_H
19 #define PXR_IMAGING_HD_EXT_COMPUTATION_OUTPUT_SCHEMA_H
20 
21 /// \file
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 
31 
32 // --(BEGIN CUSTOM CODE: Declares)--
33 // --(END CUSTOM CODE: Declares)--
34 
35 #define HD_EXT_COMPUTATION_OUTPUT_SCHEMA_TOKENS \
36  (valueType) \
37 
38 TF_DECLARE_PUBLIC_TOKENS(HdExtComputationOutputSchemaTokens, HD_API,
40 
41 //-----------------------------------------------------------------------------
42 
43 
45 {
46 public:
47  /// \name Schema retrieval
48  /// @{
49 
50  HdExtComputationOutputSchema(HdContainerDataSourceHandle container)
51  : HdSchema(container) {}
52 
53  /// @}
54 
55 // --(BEGIN CUSTOM CODE: Schema Methods)--
56 // --(END CUSTOM CODE: Schema Methods)--
57 
58  /// \name Member accessor
59  /// @{
60 
61  HD_API
63 
64  /// @}
65 
66  /// \name Schema construction
67  /// @{
68 
69  /// \deprecated Use Builder instead.
70  ///
71  /// Builds a container data source which includes the provided child data
72  /// sources. Parameters with nullptr values are excluded. This is a
73  /// low-level interface. For cases in which it's desired to define
74  /// the container with a sparse set of child fields, the Builder class
75  /// is often more convenient and readable.
76  HD_API
77  static HdContainerDataSourceHandle
79  const HdTupleTypeDataSourceHandle &valueType
80  );
81 
82  /// \class HdExtComputationOutputSchema::Builder
83  ///
84  /// Utility class for setting sparse sets of child data source fields to be
85  /// filled as arguments into BuildRetained. Because all setter methods
86  /// return a reference to the instance, this can be used in the "builder
87  /// pattern" form.
88  class Builder
89  {
90  public:
91  HD_API
93  const HdTupleTypeDataSourceHandle &valueType);
94 
95  /// Returns a container data source containing the members set thus far.
96  HD_API
97  HdContainerDataSourceHandle Build();
98 
99  private:
100  HdTupleTypeDataSourceHandle _valueType;
101 
102  };
103 
104  /// @}
105 };
106 
108 
109 #endif
HdTupleTypeDataSource::Handle HdTupleTypeDataSourceHandle
#define HD_API
Definition: api.h:23
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
HdExtComputationOutputSchema(HdContainerDataSourceHandle container)
static HD_API HdContainerDataSourceHandle BuildRetained(const HdTupleTypeDataSourceHandle &valueType)
#define HD_EXT_COMPUTATION_OUTPUT_SCHEMA_TOKENS
HD_API Builder & SetValueType(const HdTupleTypeDataSourceHandle &valueType)
HD_API HdTupleTypeDataSourceHandle GetValueType() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
TF_DECLARE_PUBLIC_TOKENS(HdExtComputationOutputSchemaTokens, HD_API, HD_EXT_COMPUTATION_OUTPUT_SCHEMA_TOKENS)