Loading...
Searching...
No Matches
purposeSchema.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_PURPOSE_SCHEMA_H
19#define PXR_IMAGING_HD_PURPOSE_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// --(END CUSTOM CODE: Includes)--
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32// --(BEGIN CUSTOM CODE: Declares)--
33// --(END CUSTOM CODE: Declares)--
34
35#define HD_PURPOSE_SCHEMA_TOKENS \
36 (purpose) \
37 (inheritable) \
38 (fallback) \
39
40TF_DECLARE_PUBLIC_TOKENS(HdPurposeSchemaTokens, HD_API,
41 HD_PURPOSE_SCHEMA_TOKENS);
42
43//-----------------------------------------------------------------------------
44
45
48class HdPurposeSchema : public HdSchema
49{
50public:
53
54 HdPurposeSchema(HdContainerDataSourceHandle container)
55 : HdSchema(container) {}
56
62 HD_API
63 static HdPurposeSchema GetFromParent(
64 const HdContainerDataSourceHandle &fromParentContainer);
65
67
68// --(BEGIN CUSTOM CODE: Schema Methods)--
69
73 HD_API
74 TfToken ResolvePurposeValue();
75
76// --(END CUSTOM CODE: Schema Methods)--
77
80
81 HD_API
82 HdTokenDataSourceHandle GetPurpose() const;
83
86 HD_API
87 HdBoolDataSourceHandle GetInheritable() const;
88
94 HD_API
95 HdTokenDataSourceHandle GetFallback() const;
96
98
101
104 HD_API
105 static const TfToken &GetSchemaToken();
106
109 HD_API
110 static const HdDataSourceLocator &GetDefaultLocator();
111
113
116
124 HD_API
125 static HdContainerDataSourceHandle
126 BuildRetained(
127 const HdTokenDataSourceHandle &purpose,
128 const HdBoolDataSourceHandle &inheritable,
129 const HdTokenDataSourceHandle &fallback
130 );
131
139 {
140 public:
141 HD_API
142 Builder &SetPurpose(
143 const HdTokenDataSourceHandle &purpose);
144 HD_API
145 Builder &SetInheritable(
146 const HdBoolDataSourceHandle &inheritable);
147 HD_API
148 Builder &SetFallback(
149 const HdTokenDataSourceHandle &fallback);
150
152 HD_API
153 HdContainerDataSourceHandle Build();
154
155 private:
156 HdTokenDataSourceHandle _purpose;
157 HdBoolDataSourceHandle _inheritable;
158 HdTokenDataSourceHandle _fallback;
159
160 };
161
163};
164
165PXR_NAMESPACE_CLOSE_SCOPE
166
167#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
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