HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
materialNodeParameterSchema.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_MATERIAL_NODE_PARAMETER_SCHEMA_H
19 #define PXR_IMAGING_HD_MATERIAL_NODE_PARAMETER_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_MATERIAL_NODE_PARAMETER_SCHEMA_TOKENS \
36  (value) \
37  (colorSpace) \
38  (typeName) \
39 
40 TF_DECLARE_PUBLIC_TOKENS(HdMaterialNodeParameterSchemaTokens, HD_API,
42 
43 //-----------------------------------------------------------------------------
44 
45 // The MaterialNodeParameter schema defines the value data source for the
46 // parameter.
47 //
48 
50 {
51 public:
52  /// \name Schema retrieval
53  /// @{
54 
55  HdMaterialNodeParameterSchema(HdContainerDataSourceHandle container)
56  : HdSchema(container) {}
57 
58  /// @}
59 
60 // --(BEGIN CUSTOM CODE: Schema Methods)--
61 // --(END CUSTOM CODE: Schema Methods)--
62 
63  /// \name Member accessor
64  /// @{
65 
66  HD_API
67  HdSampledDataSourceHandle GetValue() const;
68 
69  HD_API
71 
72  HD_API
74 
75  /// @}
76 
77  /// \name Schema construction
78  /// @{
79 
80  /// \deprecated Use Builder instead.
81  ///
82  /// Builds a container data source which includes the provided child data
83  /// sources. Parameters with nullptr values are excluded. This is a
84  /// low-level interface. For cases in which it's desired to define
85  /// the container with a sparse set of child fields, the Builder class
86  /// is often more convenient and readable.
87  HD_API
88  static HdContainerDataSourceHandle
90  const HdSampledDataSourceHandle &value,
91  const HdTokenDataSourceHandle &colorSpace,
92  const HdTokenDataSourceHandle &typeName
93  );
94 
95  /// \class HdMaterialNodeParameterSchema::Builder
96  ///
97  /// Utility class for setting sparse sets of child data source fields to be
98  /// filled as arguments into BuildRetained. Because all setter methods
99  /// return a reference to the instance, this can be used in the "builder
100  /// pattern" form.
101  class Builder
102  {
103  public:
104  HD_API
105  Builder &SetValue(
106  const HdSampledDataSourceHandle &value);
107  HD_API
109  const HdTokenDataSourceHandle &colorSpace);
110  HD_API
112  const HdTokenDataSourceHandle &typeName);
113 
114  /// Returns a container data source containing the members set thus far.
115  HD_API
116  HdContainerDataSourceHandle Build();
117 
118  private:
119  HdSampledDataSourceHandle _value;
120  HdTokenDataSourceHandle _colorSpace;
121  HdTokenDataSourceHandle _typeName;
122 
123  };
124 
125  /// @}
126 };
127 
129 
130 #endif
HD_API HdSampledDataSourceHandle GetValue() const
HD_API Builder & SetTypeName(const HdTokenDataSourceHandle &typeName)
HD_API HdTokenDataSourceHandle GetColorSpace() const
#define HD_MATERIAL_NODE_PARAMETER_SCHEMA_TOKENS
static HD_API HdContainerDataSourceHandle BuildRetained(const HdSampledDataSourceHandle &value, const HdTokenDataSourceHandle &colorSpace, const HdTokenDataSourceHandle &typeName)
GLsizei const GLfloat * value
Definition: glcorearb.h:824
HD_API Builder & SetColorSpace(const HdTokenDataSourceHandle &colorSpace)
#define HD_API
Definition: api.h:23
HdMaterialNodeParameterSchema(HdContainerDataSourceHandle container)
HD_API Builder & SetValue(const HdSampledDataSourceHandle &value)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
TF_DECLARE_PUBLIC_TOKENS(HdMaterialNodeParameterSchemaTokens, HD_API, HD_MATERIAL_NODE_PARAMETER_SCHEMA_TOKENS)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
HdTokenDataSource::Handle HdTokenDataSourceHandle
HD_API HdTokenDataSourceHandle GetTypeName() const