HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
relationship.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_RELATIONSHIP_H
8 #define PXR_EXEC_ESF_RELATIONSHIP_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/exec/esf/api.h"
16 #include "pxr/exec/esf/property.h"
17 
18 #include "pxr/usd/sdf/path.h"
19 
21 
22 class EsfJournal;
23 
24 /// Relationship abstraction for scene adapter implementations.
25 ///
26 /// The relationship abstraction closely resembles the read-only interface of
27 /// UsdRelationship.
28 ///
29 /// The public methods of this class are called by the exec network compiler.
30 /// Each method takes an argument of type EsfJournal* which captures the
31 /// conditions for recompilation.
32 ///
34 {
35 public:
37 
38  /// \see UsdRelationship::GetTargets
39  ESF_API SdfPathVector GetTargets(EsfJournal *journal) const;
40 
41  /// \see UsdRelationship::GetForwardedTargets
42  ESF_API SdfPathVector GetForwardedTargets(EsfJournal *journal) const;
43 
44 protected:
45  /// This constructor may only be called by the scene adapter implementation.
47 
48 private:
49  // These methods must be implemented by the scene adapter implementation.
50  virtual SdfPathVector _GetTargets() const = 0;
51 };
52 
53 /// Holds an implementation of EsfRelationshipInterface in a fixed-size buffer.
54 ///
55 /// The buffer is large enough to fit an implementation that wraps a
56 /// UsdRelationship. The size is specified as an integer literal to prevent
57 /// introducing Usd as a dependency.
58 ///
60  : public EsfFixedSizePolymorphicHolder<EsfRelationshipInterface, 48>
61 {
62 public:
64 };
65 
67 
68 #endif
EsfRelationshipInterface(const SdfPath &path)
This constructor may only be called by the scene adapter implementation.
Definition: relationship.h:46
#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
#define ESF_API
Definition: api.h:25