All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
volumeFieldSchema.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_VOLUME_FIELD_SCHEMA_H
19#define PXR_IMAGING_HD_VOLUME_FIELD_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_VOLUME_FIELD_SCHEMA_TOKENS \
36 (volumeField) \
37 (filePath) \
38 (fieldName) \
39 (fieldIndex) \
40 (fieldDataType) \
41 (vectorDataRoleHint) \
42
43TF_DECLARE_PUBLIC_TOKENS(HdVolumeFieldSchemaTokens, HD_API,
44 HD_VOLUME_FIELD_SCHEMA_TOKENS);
45
46//-----------------------------------------------------------------------------
47
48
49class HdVolumeFieldSchema : public HdSchema
50{
51public:
54
55 HdVolumeFieldSchema(HdContainerDataSourceHandle container)
56 : HdSchema(container) {}
57
63 HD_API
64 static HdVolumeFieldSchema GetFromParent(
65 const HdContainerDataSourceHandle &fromParentContainer);
66
68
69// --(BEGIN CUSTOM CODE: Schema Methods)--
70// --(END CUSTOM CODE: Schema Methods)--
71
74
75 HD_API
76 HdAssetPathDataSourceHandle GetFilePath() const;
77
78 HD_API
79 HdTokenDataSourceHandle GetFieldName() const;
80
81 HD_API
82 HdIntDataSourceHandle GetFieldIndex() const;
83
84 HD_API
85 HdTokenDataSourceHandle GetFieldDataType() const;
86
87 HD_API
88 HdTokenDataSourceHandle GetVectorDataRoleHint() const;
89
91
94
97 HD_API
98 static const TfToken &GetSchemaToken();
99
102 HD_API
103 static const HdDataSourceLocator &GetDefaultLocator();
104
106
109
117 HD_API
118 static HdContainerDataSourceHandle
119 BuildRetained(
120 const HdAssetPathDataSourceHandle &filePath,
121 const HdTokenDataSourceHandle &fieldName,
122 const HdIntDataSourceHandle &fieldIndex,
123 const HdTokenDataSourceHandle &fieldDataType,
124 const HdTokenDataSourceHandle &vectorDataRoleHint
125 );
126
134 {
135 public:
136 HD_API
137 Builder &SetFilePath(
138 const HdAssetPathDataSourceHandle &filePath);
139 HD_API
140 Builder &SetFieldName(
141 const HdTokenDataSourceHandle &fieldName);
142 HD_API
143 Builder &SetFieldIndex(
144 const HdIntDataSourceHandle &fieldIndex);
145 HD_API
146 Builder &SetFieldDataType(
147 const HdTokenDataSourceHandle &fieldDataType);
148 HD_API
149 Builder &SetVectorDataRoleHint(
150 const HdTokenDataSourceHandle &vectorDataRoleHint);
151
153 HD_API
154 HdContainerDataSourceHandle Build();
155
156 private:
157 HdAssetPathDataSourceHandle _filePath;
158 HdTokenDataSourceHandle _fieldName;
159 HdIntDataSourceHandle _fieldIndex;
160 HdTokenDataSourceHandle _fieldDataType;
161 HdTokenDataSourceHandle _vectorDataRoleHint;
162
163 };
164
166};
167
168PXR_NAMESPACE_CLOSE_SCOPE
169
170#endif
Represents an object that can identify the location of a data source.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
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.
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