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