HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
valueKey.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_EXEC_USD_VALUE_KEY_H
8 #define PXR_EXEC_EXEC_USD_VALUE_KEY_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/exec/execUsd/api.h"
15 
16 #include "pxr/base/tf/token.h"
17 #include "pxr/usd/usd/prim.h"
18 #include "pxr/usd/usd/attribute.h"
19 
20 #include <variant>
21 
23 
24 class ExecValueKey;
25 
26 /// Represents expired value keys.
27 ///
28 /// Records the path and computation for debugging purposes.
29 ///
31 {
34 };
35 
36 /// Represents attribute computation value keys.
38 {
41 };
42 
43 /// Represents prim computation value keys.
45 {
48 };
49 
50 /// Specifies a computed value.
51 ///
52 /// Clients identify computations to evaluate using a UsdObject that provides
53 /// computations and the name of the computation.
54 ///
56 {
57 public:
58  /// Constructs a value key that computes the builtin computeValue attribute
59  /// computation.
60  ///
62  explicit ExecUsdValueKey(const UsdAttribute &provider);
63 
64  /// Constructs a value key representing an attribute computation.
66  ExecUsdValueKey(const UsdAttribute &provider, const TfToken &computation);
67 
68  /// Constructs a value key representing a prim computation.
70  ExecUsdValueKey(const UsdPrim &provider, const TfToken &computation);
71 
74 
75 private:
76  template <typename Visitor>
77  friend auto ExecUsd_VisitValueKey(Visitor &&, const ExecUsdValueKey &);
78 
79  // Expires a value key by replacing it with an ExecUsd_ExpiredValueKey.
80  friend void
81  ExecUsd_ExpireValueKey(ExecUsdValueKey *);
82 
83  std::variant<
87  > _key;
88 };
89 
91 
92 #endif
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
EXECUSD_API ExecUsdValueKey(const UsdAttribute &provider)
Definition: token.h:70
Represents prim computation value keys.
Definition: valueKey.h:44
Definition: prim.h:116
EXECUSD_API ~ExecUsdValueKey()
Definition: path.h:280
friend auto ExecUsd_VisitValueKey(Visitor &&, const ExecUsdValueKey &)
#define EXECUSD_API
Definition: api.h:25
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Represents attribute computation value keys.
Definition: valueKey.h:37
friend void ExecUsd_ExpireValueKey(ExecUsdValueKey *)