HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
coordSysSchema.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 //
7 ////////////////////////////////////////////////////////////////////////
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_COORD_SYS_SCHEMA_H
19 #define PXR_IMAGING_HD_COORD_SYS_SCHEMA_H
20 
21 /// \file
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 
31 
32 // --(BEGIN CUSTOM CODE: Declares)--
33 // --(END CUSTOM CODE: Declares)--
34 
35 #define HD_COORD_SYS_SCHEMA_TOKENS \
36  (coordSys) \
37  (name) \
38 
39 TF_DECLARE_PUBLIC_TOKENS(HdCoordSysSchemaTokens, HD_API,
41 
42 //-----------------------------------------------------------------------------
43 
44 
45 class HdCoordSysSchema : public HdSchema
46 {
47 public:
48  /// \name Schema retrieval
49  /// @{
50 
51  HdCoordSysSchema(HdContainerDataSourceHandle container)
52  : HdSchema(container) {}
53 
54  /// Retrieves a container data source with the schema's default name token
55  /// "coordSys" from the parent container and constructs a
56  /// HdCoordSysSchema instance.
57  /// Because the requested container data source may not exist, the result
58  /// should be checked with IsDefined() or a bool comparison before use.
59  HD_API
61  const HdContainerDataSourceHandle &fromParentContainer);
62 
63  /// @}
64 
65 // --(BEGIN CUSTOM CODE: Schema Methods)--
66 // --(END CUSTOM CODE: Schema Methods)--
67 
68  /// \name Member accessor
69  /// @{
70 
71  HD_API
73 
74  /// @}
75 
76  /// \name Schema location
77  /// @{
78 
79  /// Returns a token where the container representing this schema is found in
80  /// a container by default.
81  HD_API
82  static const TfToken &GetSchemaToken();
83 
84  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
85  /// where the container representing this schema is found by default.
86  HD_API
87  static const HdDataSourceLocator &GetDefaultLocator();
88 
89  /// @}
90 
91  /// \name Schema construction
92  /// @{
93 
94  /// \deprecated Use Builder instead.
95  ///
96  /// Builds a container data source which includes the provided child data
97  /// sources. Parameters with nullptr values are excluded. This is a
98  /// low-level interface. For cases in which it's desired to define
99  /// the container with a sparse set of child fields, the Builder class
100  /// is often more convenient and readable.
101  HD_API
102  static HdContainerDataSourceHandle
105  );
106 
107  /// \class HdCoordSysSchema::Builder
108  ///
109  /// Utility class for setting sparse sets of child data source fields to be
110  /// filled as arguments into BuildRetained. Because all setter methods
111  /// return a reference to the instance, this can be used in the "builder
112  /// pattern" form.
113  class Builder
114  {
115  public:
116  HD_API
117  Builder &SetName(
119 
120  /// Returns a container data source containing the members set thus far.
121  HD_API
122  HdContainerDataSourceHandle Build();
123 
124  private:
126 
127  };
128 
129  /// @}
130 };
131 
133 
134 #endif
static HD_API const HdDataSourceLocator & GetDefaultLocator()
static HD_API HdContainerDataSourceHandle BuildRetained(const HdTokenDataSourceHandle &name)
#define HD_API
Definition: api.h:23
static HD_API const TfToken & GetSchemaToken()
Definition: token.h:70
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
GLuint const GLchar * name
Definition: glcorearb.h:786
#define HD_COORD_SYS_SCHEMA_TOKENS
HD_API HdTokenDataSourceHandle GetName() const
TF_DECLARE_PUBLIC_TOKENS(HdCoordSysSchemaTokens, HD_API, HD_COORD_SYS_SCHEMA_TOKENS)
HdCoordSysSchema(HdContainerDataSourceHandle container)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
static HD_API HdCoordSysSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HD_API Builder & SetName(const HdTokenDataSourceHandle &name)
HdTokenDataSource::Handle HdTokenDataSourceHandle