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
69{
70public:
73
74 HdLegacyTaskSchema(HdContainerDataSourceHandle container)
75 : HdSchema(container) {}
76
82 HD_API
84 const HdContainerDataSourceHandle &fromParentContainer);
85
87
88// --(BEGIN CUSTOM CODE: Schema Methods)--
89// --(END CUSTOM CODE: Schema Methods)--
90
93
94 HD_API
95 HdLegacyTaskFactoryDataSourceHandle GetFactory() const;
96
99 HD_API
100 HdSampledDataSourceHandle GetParameters() const;
101
102 HD_API
103 HdRprimCollectionDataSourceHandle GetCollection() const;
104
105 HD_API
106 HdTokenVectorDataSourceHandle GetRenderTags() const;
107
109
112
115 HD_API
116 static const TfToken &GetSchemaToken();
117
120 HD_API
122
124
133
135 HD_API
137
139 HD_API
141
143 HD_API
145
147 HD_API
150
153
161 HD_API
162 static HdContainerDataSourceHandle
164 const HdLegacyTaskFactoryDataSourceHandle &factory,
165 const HdSampledDataSourceHandle &parameters,
166 const HdRprimCollectionDataSourceHandle &collection,
167 const HdTokenVectorDataSourceHandle &renderTags
168 );
169
177 {
178 public:
179 HD_API
180 Builder &SetFactory(
181 const HdLegacyTaskFactoryDataSourceHandle &factory);
182 HD_API
183 Builder &SetParameters(
184 const HdSampledDataSourceHandle &parameters);
185 HD_API
186 Builder &SetCollection(
187 const HdRprimCollectionDataSourceHandle &collection);
188 HD_API
189 Builder &SetRenderTags(
190 const HdTokenVectorDataSourceHandle &renderTags);
191
193 HD_API
194 HdContainerDataSourceHandle Build();
195
196 private:
197 HdLegacyTaskFactoryDataSourceHandle _factory;
198 HdSampledDataSourceHandle _parameters;
199 HdRprimCollectionDataSourceHandle _collection;
200 HdTokenVectorDataSourceHandle _renderTags;
201
202 };
203
205};
206
207PXR_NAMESPACE_CLOSE_SCOPE
208
209#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.
The HdLegacyTaskSchema specifies a Hydra task by providing a task factory and data.
static HD_API const HdDataSourceLocator & GetParametersLocator()
Prim-level relative data source locator to locate parameters.
static HD_API const HdDataSourceLocator & GetCollectionLocator()
Prim-level relative data source locator to locate collection.
static HD_API const HdDataSourceLocator & GetRenderTagsLocator()
Prim-level relative data source locator to locate renderTags.
static HD_API const HdDataSourceLocator & GetFactoryLocator()
Prim-level relative data source locator to locate factory.
static HD_API HdContainerDataSourceHandle BuildRetained(const HdLegacyTaskFactoryDataSourceHandle &factory, const HdSampledDataSourceHandle &parameters, const HdRprimCollectionDataSourceHandle &collection, const HdTokenVectorDataSourceHandle &renderTags)
static HD_API HdLegacyTaskSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "task" from the parent contain...
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
HD_API HdSampledDataSourceHandle GetParameters() const
Parameters for task.
static HD_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
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:92