Loading...
Searching...
No Matches
primIdSchema.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_PRIM_ID_SCHEMA_H
19#define PXR_IMAGING_HD_PRIM_ID_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 <cstdint>
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
35using HdPrimIdDataSourceHandle = HdPrimIdDataSource::Handle;
36// --(END CUSTOM CODE: Declares)--
37
38#define HD_PRIM_ID_SCHEMA_TOKENS \
39 (primId) \
40
41TF_DECLARE_PUBLIC_TOKENS(HdPrimIdSchemaTokens, HD_API,
42 HD_PRIM_ID_SCHEMA_TOKENS);
43
44//-----------------------------------------------------------------------------
45
46
54{
55public:
58
59 HdPrimIdSchema(HdContainerDataSourceHandle container)
60 : HdSchema(container) {}
61
67 HD_API
69 const HdContainerDataSourceHandle &fromParentContainer);
70
72
73// --(BEGIN CUSTOM CODE: Schema Methods)--
74// --(END CUSTOM CODE: Schema Methods)--
75
78
79 HD_API
80 HdPrimIdDataSourceHandle GetPrimId() const;
81
83
86
89 HD_API
90 static const TfToken &GetSchemaToken();
91
94 HD_API
96
98
101
109 HD_API
110 static HdContainerDataSourceHandle
112 const HdPrimIdDataSourceHandle &primId
113 );
114
121 class Builder
122 {
123 public:
124 HD_API
125 Builder &SetPrimId(
126 const HdPrimIdDataSourceHandle &primId);
127
129 HD_API
130 HdContainerDataSourceHandle Build();
131
132 private:
133 HdPrimIdDataSourceHandle _primId;
134
135 };
136
138};
139
140PXR_NAMESPACE_CLOSE_SCOPE
141
142#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.
Unique id assigned to all imageable prims.
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPrimIdDataSourceHandle &primId)
static HD_API HdPrimIdSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "primId" from the parent conta...
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
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:248
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.