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 
46 /// \class HdMaterialNodeParameterSchema
47 ///
48 /// The MaterialNodeParameter schema defines the value data source for the
49 /// parameter.
50 ///
52 {
53 public:
54  /// \name Schema retrieval
55  /// @{
56 
57  HdMaterialNodeParameterSchema(HdContainerDataSourceHandle container)
58  : HdSchema(container) {}
59 
60  /// @}
61 
62 // --(BEGIN CUSTOM CODE: Schema Methods)--
63 // --(END CUSTOM CODE: Schema Methods)--
64 
65  /// \name Member accessor
66  /// @{
67 
68  HD_API
69  HdSampledDataSourceHandle GetValue() const;
70 
71  HD_API
73 
74  HD_API
76 
77  /// @}
78 
79  /// \name Schema construction
80  /// @{
81 
82  /// \deprecated Use Builder instead.
83  ///
84  /// Builds a container data source which includes the provided child data
85  /// sources. Parameters with nullptr values are excluded. This is a
86  /// low-level interface. For cases in which it's desired to define
87  /// the container with a sparse set of child fields, the Builder class
88  /// is often more convenient and readable.
89  HD_API
90  static HdContainerDataSourceHandle
92  const HdSampledDataSourceHandle &value,
93  const HdTokenDataSourceHandle &colorSpace,
94  const HdTokenDataSourceHandle &typeName
95  );
96 
97  /// \class HdMaterialNodeParameterSchema::Builder
98  ///
99  /// Utility class for setting sparse sets of child data source fields to be
100  /// filled as arguments into BuildRetained. Because all setter methods
101  /// return a reference to the instance, this can be used in the "builder
102  /// pattern" form.
103  class Builder
104  {
105  public:
106  HD_API
107  Builder &SetValue(
108  const HdSampledDataSourceHandle &value);
109  HD_API
111  const HdTokenDataSourceHandle &colorSpace);
112  HD_API
114  const HdTokenDataSourceHandle &typeName);
115 
116  /// Returns a container data source containing the members set thus far.
117  HD_API
118  HdContainerDataSourceHandle Build();
119 
120  private:
121  HdSampledDataSourceHandle _value;
122  HdTokenDataSourceHandle _colorSpace;
123  HdTokenDataSourceHandle _typeName;
124 
125  };
126 
127  /// @}
128 };
129 
131 
132 #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)
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
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)
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