HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
attribute.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_ATTRIBUTE_H
8 #define PXR_EXEC_ESF_ATTRIBUTE_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/exec/esf/api.h"
17 #include "pxr/exec/esf/property.h"
18 
19 #include "pxr/usd/sdf/path.h"
21 
23 
24 class EsfJournal;
25 
26 /// Attribute abstraction for scene adapter implementations.
27 ///
28 /// The attribute abstraction closely resembles the read-only interface of
29 /// UsdAttribute.
30 ///
31 /// The public methods of this class are called by the exec network compiler.
32 /// Each method takes an argument of type EsfJournal* which captures the
33 /// conditions for recompilation.
34 ///
36 {
37 public:
38  ESF_API ~EsfAttributeInterface() override;
39 
40  /// \see UsdAttribute::GetValueTypeName
41  ESF_API SdfValueTypeName GetValueTypeName(EsfJournal *journal) const;
42 
43  /// Returns an object for caching and querying value resolution information.
44  /// \see UsdAttributeQuery
45  ///
46  ESF_API EsfAttributeQuery GetQuery() const;
47 
48  /// \see UsdAttribute::GetConnections
49  ESF_API SdfPathVector GetConnections(EsfJournal *journal) const;
50 
51 protected:
52  /// This constructor may only be called by the scene adapter implementation.
54 
55 private:
56  // These methods must be implemented by the scene adapter implementation.
57  virtual SdfValueTypeName _GetValueTypeName() const = 0;
58  virtual EsfAttributeQuery _GetQuery() const = 0;
59  virtual SdfPathVector _GetConnections() const = 0;
60 };
61 
62 /// Holds an implementation of EsfAttributeInterface in a fixed-size buffer.
63 ///
64 /// The buffer is large enough to fit an implementation that wraps a
65 /// UsdAttribute. The size is specified as an integer literal to prevent
66 /// introducing Usd as a dependency.
67 ///
69  : public EsfFixedSizePolymorphicHolder<EsfAttributeInterface, 48>
70 {
71 public:
73 };
74 
76 
77 #endif
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
#define ESF_API_TYPE
Definition: api.h:26
std::vector< class SdfPath > SdfPathVector
Definition: path.h:280
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
EsfAttributeInterface(const SdfPath &path)
This constructor may only be called by the scene adapter implementation.
Definition: attribute.h:53
#define ESF_API
Definition: api.h:25