HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
schemaConfigKey.h
Go to the documentation of this file.
1 //
2 // Copyright 2025 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_EXEC_ESF_SCHEMA_CONFIG_KEY_H
8 #define PXR_EXEC_ESF_SCHEMA_CONFIG_KEY_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/exec/esf/api.h"
15 
17 
18 /// An opaque type that can be used to identify the configuration of typed
19 /// and applied schemas for a prim.
20 ///
22  public:
23  /// Only null keys can be constructed publicly.
24  constexpr EsfSchemaConfigKey() = default;
25 
26  constexpr bool operator==(EsfSchemaConfigKey key) const {
27  return _key == key._key;
28  }
29 
30  constexpr bool operator!=(EsfSchemaConfigKey key) const {
31  return !(*this == key);
32  }
33 
34  template <class HashState>
35  friend void TfHashAppend(HashState &h, const EsfSchemaConfigKey key) {
36  h.Append(key._key);
37  }
38 
39  private:
40  // Derived classes can construct an EsfSchemaConfigKey by calling
41  // EsfPrimInterface::CreateEsfSchemaConfigKey.
42  //
43  friend class EsfObjectInterface;
44  constexpr explicit EsfSchemaConfigKey(const void *const key)
45  : _key(key)
46  {
47  }
48 
49  private:
50  const void *_key = nullptr;
51 };
52 
54 
55 #endif
constexpr EsfSchemaConfigKey()=default
Only null keys can be constructed publicly.
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
constexpr bool operator!=(EsfSchemaConfigKey key) const
constexpr bool operator==(EsfSchemaConfigKey key) const
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
friend void TfHashAppend(HashState &h, const EsfSchemaConfigKey key)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74