Loading...
Searching...
No Matches
legacyTaskSchema.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//
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_LEGACY_TASK_SCHEMA_H
19#define PXR_IMAGING_HD_LEGACY_TASK_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24
25#include "pxr/imaging/hd/schema.h"
26
27// --(BEGIN CUSTOM CODE: Includes)--
28#include "pxr/imaging/hd/rprimCollection.h"
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
34
36using HdRprimCollectionDataSourceHandle = HdRprimCollectionDataSource::Handle;
37
39using HdTokenVectorDataSourceHandle = HdTokenVectorDataSource::Handle;
40
41using HdLegacyTaskFactorySharedPtr = std::shared_ptr<class HdLegacyTaskFactory>;
44using HdLegacyTaskFactoryDataSourceHandle =
45 HdLegacyTaskFactoryDataSource::Handle;
46
47
48// --(END CUSTOM CODE: Declares)--
49
50#define HD_LEGACY_TASK_SCHEMA_TOKENS \
51 (task) \
52 (factory) \
53 (parameters) \
54 (collection) \
55 (renderTags) \
56
57TF_DECLARE_PUBLIC_TOKENS(HdLegacyTaskSchemaTokens, HD_API,
58 HD_LEGACY_TASK_SCHEMA_TOKENS);
59
60//-----------------------------------------------------------------------------
61
62// The HdLegacyTaskSchema specifies a Hydra task by providing a task factory
63// and data.
64//
65
66class HdLegacyTaskSchema : public HdSchema
67{
68public:
71
72 HdLegacyTaskSchema(HdContainerDataSourceHandle container)
73 : HdSchema(container) {}
74
80 HD_API
81 static HdLegacyTaskSchema GetFromParent(
82 const HdContainerDataSourceHandle &fromParentContainer);
83
85
86// --(BEGIN CUSTOM CODE: Schema Methods)--
87// --(END CUSTOM CODE: Schema Methods)--
88
91
92 HD_API
93 HdLegacyTaskFactoryDataSourceHandle GetFactory() const;
94
97 HD_API
98 HdSampledDataSourceHandle GetParameters() const;
99
100 HD_API
101 HdRprimCollectionDataSourceHandle GetCollection() const;
102
103 HD_API
104 HdTokenVectorDataSourceHandle GetRenderTags() const;
105
107
110
113 HD_API
114 static const TfToken &GetSchemaToken();
115
118 HD_API
119 static const HdDataSourceLocator &GetDefaultLocator();
120
122
131
133 HD_API
134 static const HdDataSourceLocator &GetFactoryLocator();
135
137 HD_API
138 static const HdDataSourceLocator &GetParametersLocator();
139
141 HD_API
142 static const HdDataSourceLocator &GetCollectionLocator();
143
145 HD_API
146 static const HdDataSourceLocator &GetRenderTagsLocator();
148
151
159 HD_API
160 static HdContainerDataSourceHandle
161 BuildRetained(
162 const HdLegacyTaskFactoryDataSourceHandle &factory,
163 const HdSampledDataSourceHandle &parameters,
164 const HdRprimCollectionDataSourceHandle &collection,
165 const HdTokenVectorDataSourceHandle &renderTags
166 );
167
175 {
176 public:
177 HD_API
178 Builder &SetFactory(
179 const HdLegacyTaskFactoryDataSourceHandle &factory);
180 HD_API
181 Builder &SetParameters(
182 const HdSampledDataSourceHandle &parameters);
183 HD_API
184 Builder &SetCollection(
185 const HdRprimCollectionDataSourceHandle &collection);
186 HD_API
187 Builder &SetRenderTags(
188 const HdTokenVectorDataSourceHandle &renderTags);
189
191 HD_API
192 HdContainerDataSourceHandle Build();
193
194 private:
195 HdLegacyTaskFactoryDataSourceHandle _factory;
196 HdSampledDataSourceHandle _parameters;
197 HdRprimCollectionDataSourceHandle _collection;
198 HdTokenVectorDataSourceHandle _renderTags;
199
200 };
201
203};
204
205PXR_NAMESPACE_CLOSE_SCOPE
206
207#endif
Represents an object that can identify the location of a data source.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
A datasource representing a concretely-typed sampled value.
Definition: dataSource.h:193
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:81