renderSettingsSchema.h
1 //
2 // Copyright 2022 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
25 
26 /* ************************************************************************** */
27 /* ** This file is generated by a script. Do not edit directly. Edit ** */
28 /* ** defs.py or the (*)Schema.template.h files to make changes. ** */
29 /* ************************************************************************** */
30 
31 #ifndef PXR_IMAGING_HD_RENDER_SETTINGS_SCHEMA_H
32 #define PXR_IMAGING_HD_RENDER_SETTINGS_SCHEMA_H
33 
34 #include "pxr/imaging/hd/api.h"
35 
36 #include "pxr/imaging/hd/schema.h"
37 
38 PXR_NAMESPACE_OPEN_SCOPE
39 
40 //-----------------------------------------------------------------------------
41 
42 #define HDRENDERSETTINGS_SCHEMA_TOKENS \
43  (renderSettings) \
44  (namespacedSettings) \
45  (active) \
46  (renderProducts) \
47  (includedPurposes) \
48  (materialBindingPurposes) \
49  (renderingColorSpace) \
50 
51 TF_DECLARE_PUBLIC_TOKENS(HdRenderSettingsSchemaTokens, HD_API,
52  HDRENDERSETTINGS_SCHEMA_TOKENS);
53 
54 //-----------------------------------------------------------------------------
55 
56 class HdRenderSettingsSchema : public HdSchema
57 {
58 public:
59  HdRenderSettingsSchema(HdContainerDataSourceHandle container)
60  : HdSchema(container) {}
61 
62  //ACCESSORS
63 
64  HD_API
65  HdContainerDataSourceHandle GetNamespacedSettings();
66  HD_API
67  HdBoolDataSourceHandle GetActive();
68  HD_API
69  HdRenderProductVectorSchema GetRenderProducts();
70  HD_API
71  HdTokenArrayDataSourceHandle GetIncludedPurposes();
72  HD_API
73  HdTokenArrayDataSourceHandle GetMaterialBindingPurposes();
74  HD_API
75  HdTokenDataSourceHandle GetRenderingColorSpace();
76 
77  // RETRIEVING AND CONSTRUCTING
78 
84  HD_API
85  static HdContainerDataSourceHandle
86  BuildRetained(
87  const HdContainerDataSourceHandle &namespacedSettings,
88  const HdBoolDataSourceHandle &active,
89  const HdVectorDataSourceHandle &renderProducts,
90  const HdTokenArrayDataSourceHandle &includedPurposes,
91  const HdTokenArrayDataSourceHandle &materialBindingPurposes,
92  const HdTokenDataSourceHandle &renderingColorSpace
93  );
94 
101  class Builder
102  {
103  public:
104  HD_API
105  Builder &SetNamespacedSettings(
106  const HdContainerDataSourceHandle &namespacedSettings);
107  HD_API
108  Builder &SetActive(
109  const HdBoolDataSourceHandle &active);
110  HD_API
111  Builder &SetRenderProducts(
112  const HdVectorDataSourceHandle &renderProducts);
113  HD_API
114  Builder &SetIncludedPurposes(
115  const HdTokenArrayDataSourceHandle &includedPurposes);
116  HD_API
117  Builder &SetMaterialBindingPurposes(
118  const HdTokenArrayDataSourceHandle &materialBindingPurposes);
119  HD_API
120  Builder &SetRenderingColorSpace(
121  const HdTokenDataSourceHandle &renderingColorSpace);
122 
124  HD_API
125  HdContainerDataSourceHandle Build();
126 
127  private:
128  HdContainerDataSourceHandle _namespacedSettings;
129  HdBoolDataSourceHandle _active;
130  HdVectorDataSourceHandle _renderProducts;
131  HdTokenArrayDataSourceHandle _includedPurposes;
132  HdTokenArrayDataSourceHandle _materialBindingPurposes;
133  HdTokenDataSourceHandle _renderingColorSpace;
134  };
135 
141  HD_API
142  static HdRenderSettingsSchema GetFromParent(
143  const HdContainerDataSourceHandle &fromParentContainer);
144 
147  HD_API
148  static const HdDataSourceLocator &GetDefaultLocator();
149 
150 
155  HD_API
156  static const HdDataSourceLocator &GetNamespacedSettingsLocator();
157 
162  HD_API
163  static const HdDataSourceLocator &GetActiveLocator();
164 
169  HD_API
170  static const HdDataSourceLocator &GetRenderProductsLocator();
171 
176  HD_API
177  static const HdDataSourceLocator &GetIncludedPurposesLocator();
178 
183  HD_API
184  static const HdDataSourceLocator &GetMaterialBindingPurposesLocator();
185 
190  HD_API
191  static const HdDataSourceLocator &GetRenderingColorSpaceLocator();
192 
193 };
194 
195 PXR_NAMESPACE_CLOSE_SCOPE
196 
197 #endif
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43
Base class for vector schema classes that represent a view of a vector data source containing data so...
Definition: vectorSchema.h:73