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