primOriginSchema.h
1 //
2 // Copyright 2021 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_PRIM_ORIGIN_SCHEMA_H
29 #define PXR_IMAGING_HD_PRIM_ORIGIN_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 HDPRIMORIGIN_SCHEMA_TOKENS \
40  (primOrigin) \
41  (scenePath) \
42 
43 TF_DECLARE_PUBLIC_TOKENS(HdPrimOriginSchemaTokens, HD_API,
44  HDPRIMORIGIN_SCHEMA_TOKENS);
45 
46 //-----------------------------------------------------------------------------
47 
48 class HdPrimOriginSchema : public HdSchema
49 {
50 public:
51  HdPrimOriginSchema(HdContainerDataSourceHandle container)
52  : HdSchema(container) {}
53 
54 
57  class OriginPath {
58  public:
59  OriginPath(const SdfPath &path)
60  : _path(path)
61  {
62  }
63 
64  const SdfPath &GetPath() const { return _path; }
65 
66  bool operator==(const OriginPath &other) const {
67  return _path == other._path;
68  }
69 
70  private:
71  HD_API
72  friend std::ostream &operator <<(std::ostream &stream,
73  OriginPath const &p);
74 
75  SdfPath _path;
76  };
77 
79 
82  HD_API SdfPath GetOriginPath(const TfToken &name) const;
83 
84 
85 
91  HD_API
92  static HdPrimOriginSchema GetFromParent(
93  const HdContainerDataSourceHandle &fromParentContainer);
94 
97  HD_API
98  static const HdDataSourceLocator &GetDefaultLocator();
99 
100 
105  HD_API
106  static const HdDataSourceLocator &GetScenePathLocator();
107 
108 };
109 
110 PXR_NAMESPACE_CLOSE_SCOPE
111 
112 #endif
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
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
A datasource representing a concretely-typed sampled value.
Definition: dataSource.h:204
Wraps an SdfPath so that it is not affected by the prefixing scene index.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43