HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dependencySchema.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_DEPENDENCY_SCHEMA_H
19 #define PXR_IMAGING_HD_DEPENDENCY_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_DEPENDENCY_SCHEMA_TOKENS \
36  (dependedOnPrimPath) \
37  (dependedOnDataSourceLocator) \
38  (affectedDataSourceLocator) \
39 
40 TF_DECLARE_PUBLIC_TOKENS(HdDependencySchemaTokens, HD_API,
42 
43 //-----------------------------------------------------------------------------
44 
45 
47 {
48 public:
49  /// \name Schema retrieval
50  /// @{
51 
52  HdDependencySchema(HdContainerDataSourceHandle container)
53  : HdSchema(container) {}
54 
55  /// @}
56 
57 // --(BEGIN CUSTOM CODE: Schema Methods)--
58 // --(END CUSTOM CODE: Schema Methods)--
59 
60  /// \name Member accessor
61  /// @{
62 
63  HD_API
65 
66  HD_API
68 
69  HD_API
71 
72  /// @}
73 
74  /// \name Schema construction
75  /// @{
76 
77  /// \deprecated Use Builder instead.
78  ///
79  /// Builds a container data source which includes the provided child data
80  /// sources. Parameters with nullptr values are excluded. This is a
81  /// low-level interface. For cases in which it's desired to define
82  /// the container with a sparse set of child fields, the Builder class
83  /// is often more convenient and readable.
84  HD_API
85  static HdContainerDataSourceHandle
87  const HdPathDataSourceHandle &dependedOnPrimPath,
88  const HdLocatorDataSourceHandle &dependedOnDataSourceLocator,
89  const HdLocatorDataSourceHandle &affectedDataSourceLocator
90  );
91 
92  /// \class HdDependencySchema::Builder
93  ///
94  /// Utility class for setting sparse sets of child data source fields to be
95  /// filled as arguments into BuildRetained. Because all setter methods
96  /// return a reference to the instance, this can be used in the "builder
97  /// pattern" form.
98  class Builder
99  {
100  public:
101  HD_API
103  const HdPathDataSourceHandle &dependedOnPrimPath);
104  HD_API
106  const HdLocatorDataSourceHandle &dependedOnDataSourceLocator);
107  HD_API
109  const HdLocatorDataSourceHandle &affectedDataSourceLocator);
110 
111  /// Returns a container data source containing the members set thus far.
112  HD_API
113  HdContainerDataSourceHandle Build();
114 
115  private:
116  HdPathDataSourceHandle _dependedOnPrimPath;
117  HdLocatorDataSourceHandle _dependedOnDataSourceLocator;
118  HdLocatorDataSourceHandle _affectedDataSourceLocator;
119 
120  };
121 
122  /// @}
123 };
124 
126 
127 #endif
HdDependencySchema(HdContainerDataSourceHandle container)
HD_API Builder & SetAffectedDataSourceLocator(const HdLocatorDataSourceHandle &affectedDataSourceLocator)
#define HD_API
Definition: api.h:23
HD_API HdPathDataSourceHandle GetDependedOnPrimPath() const
#define HD_DEPENDENCY_SCHEMA_TOKENS
HD_API Builder & SetDependedOnPrimPath(const HdPathDataSourceHandle &dependedOnPrimPath)
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
HdLocatorDataSource::Handle HdLocatorDataSourceHandle
HD_API Builder & SetDependedOnDataSourceLocator(const HdLocatorDataSourceHandle &dependedOnDataSourceLocator)
HD_API HdLocatorDataSourceHandle GetAffectedDataSourceLocator() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HD_API HdLocatorDataSourceHandle GetDependedOnDataSourceLocator() const
TF_DECLARE_PUBLIC_TOKENS(HdDependencySchemaTokens, HD_API, HD_DEPENDENCY_SCHEMA_TOKENS)
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPathDataSourceHandle &dependedOnPrimPath, const HdLocatorDataSourceHandle &dependedOnDataSourceLocator, const HdLocatorDataSourceHandle &affectedDataSourceLocator)
HdPathDataSource::Handle HdPathDataSourceHandle