HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
categoriesSchema.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_CATEGORIES_SCHEMA_H
19 #define PXR_IMAGING_HD_CATEGORIES_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_CATEGORIES_SCHEMA_TOKENS \
36  (categories) \
37 
38 TF_DECLARE_PUBLIC_TOKENS(HdCategoriesSchemaTokens, HD_API,
40 
41 //-----------------------------------------------------------------------------
42 
43 
44 /// \class HdCategoriesSchema
45 ///
47 {
48 public:
49  /// \name Schema retrieval
50  /// @{
51 
52  HdCategoriesSchema(HdContainerDataSourceHandle container)
53  : HdSchema(container) {}
54 
55  /// Retrieves a container data source with the schema's default name token
56  /// "categories" from the parent container and constructs a
57  /// HdCategoriesSchema instance.
58  /// Because the requested container data source may not exist, the result
59  /// should be checked with IsDefined() or a bool comparison before use.
60  HD_API
62  const HdContainerDataSourceHandle &fromParentContainer);
63 
64  /// @}
65 
66 // --(BEGIN CUSTOM CODE: Schema Methods)--
67  HD_API
69 
70  HD_API
71  bool IsIncludedInCategory(const TfToken &categoryName);
72 
73  HD_API
74  static HdContainerDataSourceHandle BuildRetained(
75  size_t includedNameCount,
76  const TfToken *includedNames,
77  size_t excludedNameCount,
78  const TfToken *excludedNames);
79 
80 // --(END CUSTOM CODE: Schema Methods)--
81 
82  /// \name Member accessor
83  /// @{
84 
85  /// @}
86 
87  /// \name Schema location
88  /// @{
89 
90  /// Returns a token where the container representing this schema is found in
91  /// a container by default.
92  HD_API
93  static const TfToken &GetSchemaToken();
94 
95  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
96  /// where the container representing this schema is found by default.
97  HD_API
98  static const HdDataSourceLocator &GetDefaultLocator();
99 
100  /// @}
101 
102  /// \name Schema construction
103  /// @{
104 
105  /// @}
106 };
107 
109 
110 #endif
TF_DECLARE_PUBLIC_TOKENS(HdCategoriesSchemaTokens, HD_API, HD_CATEGORIES_SCHEMA_TOKENS)
HdCategoriesSchema(HdContainerDataSourceHandle container)
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
#define HD_API
Definition: api.h:23
Definition: token.h:70
HD_API bool IsIncludedInCategory(const TfToken &categoryName)
static HD_API const HdDataSourceLocator & GetDefaultLocator()
HD_API VtArray< TfToken > GetIncludedCategoryNames()
static HD_API const TfToken & GetSchemaToken()
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
static HD_API HdContainerDataSourceHandle BuildRetained(size_t includedNameCount, const TfToken *includedNames, size_t excludedNameCount, const TfToken *excludedNames)
static HD_API HdCategoriesSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
#define HD_CATEGORIES_SCHEMA_TOKENS