HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extComputationInputComputationSchema.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_INPUT_COMPUTATION_SCHEMA_H
19 #define PXR_IMAGING_HD_EXT_COMPUTATION_INPUT_COMPUTATION_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_INPUT_COMPUTATION_SCHEMA_TOKENS \
36  (sourceComputation) \
37  (sourceComputationOutputName) \
38 
39 TF_DECLARE_PUBLIC_TOKENS(HdExtComputationInputComputationSchemaTokens, HD_API,
41 
42 //-----------------------------------------------------------------------------
43 
44 
45 /// \class HdExtComputationInputComputationSchema
46 ///
48 {
49 public:
50  /// \name Schema retrieval
51  /// @{
52 
53  HdExtComputationInputComputationSchema(HdContainerDataSourceHandle container)
54  : HdSchema(container) {}
55 
56  /// @}
57 
58 // --(BEGIN CUSTOM CODE: Schema Methods)--
59 // --(END CUSTOM CODE: Schema Methods)--
60 
61  /// \name Member accessor
62  /// @{
63 
64  HD_API
66 
67  HD_API
69 
70  /// @}
71 
72  /// \name Schema construction
73  /// @{
74 
75  /// \deprecated Use Builder instead.
76  ///
77  /// Builds a container data source which includes the provided child data
78  /// sources. Parameters with nullptr values are excluded. This is a
79  /// low-level interface. For cases in which it's desired to define
80  /// the container with a sparse set of child fields, the Builder class
81  /// is often more convenient and readable.
82  HD_API
83  static HdContainerDataSourceHandle
85  const HdPathDataSourceHandle &sourceComputation,
86  const HdTokenDataSourceHandle &sourceComputationOutputName
87  );
88 
89  /// \class HdExtComputationInputComputationSchema::Builder
90  ///
91  /// Utility class for setting sparse sets of child data source fields to be
92  /// filled as arguments into BuildRetained. Because all setter methods
93  /// return a reference to the instance, this can be used in the "builder
94  /// pattern" form.
95  class Builder
96  {
97  public:
98  HD_API
100  const HdPathDataSourceHandle &sourceComputation);
101  HD_API
103  const HdTokenDataSourceHandle &sourceComputationOutputName);
104 
105  /// Returns a container data source containing the members set thus far.
106  HD_API
107  HdContainerDataSourceHandle Build();
108 
109  private:
110  HdPathDataSourceHandle _sourceComputation;
111  HdTokenDataSourceHandle _sourceComputationOutputName;
112 
113  };
114 
115  /// @}
116 };
117 
119 
120 #endif
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
#define HD_API
Definition: api.h:23
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPathDataSourceHandle &sourceComputation, const HdTokenDataSourceHandle &sourceComputationOutputName)
HD_API Builder & SetSourceComputationOutputName(const HdTokenDataSourceHandle &sourceComputationOutputName)
TF_DECLARE_PUBLIC_TOKENS(HdExtComputationInputComputationSchemaTokens, HD_API, HD_EXT_COMPUTATION_INPUT_COMPUTATION_SCHEMA_TOKENS)
HdExtComputationInputComputationSchema(HdContainerDataSourceHandle container)
HD_API HdTokenDataSourceHandle GetSourceComputationOutputName() const
HD_API HdPathDataSourceHandle GetSourceComputation() const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
#define HD_EXT_COMPUTATION_INPUT_COMPUTATION_SCHEMA_TOKENS
HdPathDataSource::Handle HdPathDataSourceHandle
HdTokenDataSource::Handle HdTokenDataSourceHandle
HD_API Builder & SetSourceComputation(const HdPathDataSourceHandle &sourceComputation)