cubeSchema.h
1 //
2 // Copyright 2022 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
25 // This file is generated by a script. Do not edit directly. Edit the
26 // schema.template.h file to make changes.
27 
28 #ifndef PXR_IMAGING_HD_CUBE_SCHEMA_H
29 #define PXR_IMAGING_HD_CUBE_SCHEMA_H
30 
31 #include "pxr/imaging/hd/api.h"
32 
33 #include "pxr/imaging/hd/schema.h"
34 
35 PXR_NAMESPACE_OPEN_SCOPE
36 
37 //-----------------------------------------------------------------------------
38 
39 #define HDCUBE_SCHEMA_TOKENS \
40  (cube) \
41  (size) \
42 
43 TF_DECLARE_PUBLIC_TOKENS(HdCubeSchemaTokens, HD_API,
44  HDCUBE_SCHEMA_TOKENS);
45 
46 //-----------------------------------------------------------------------------
47 
48 class HdCubeSchema : public HdSchema
49 {
50 public:
51  HdCubeSchema(HdContainerDataSourceHandle container)
52  : HdSchema(container) {}
53 
54  //ACCESSORS
55 
56  HD_API
57  HdDoubleDataSourceHandle GetSize();
58 
59  // RETRIEVING AND CONSTRUCTING
60 
66  HD_API
67  static HdContainerDataSourceHandle
68  BuildRetained(
69  const HdDoubleDataSourceHandle &size
70  );
71 
78  class Builder
79  {
80  public:
81  HD_API
82  Builder &SetSize(
83  const HdDoubleDataSourceHandle &size);
84 
86  HD_API
87  HdContainerDataSourceHandle Build();
88 
89  private:
90  HdDoubleDataSourceHandle _size;
91  };
92 
98  HD_API
99  static HdCubeSchema GetFromParent(
100  const HdContainerDataSourceHandle &fromParentContainer);
101 
104  HD_API
105  static const HdDataSourceLocator &GetDefaultLocator();
106 
107 };
108 
109 PXR_NAMESPACE_CLOSE_SCOPE
110 
111 #endif
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Definition: cubeSchema.h:78
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43