HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dataManagerFacade.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_VDF_DATA_MANAGER_FACADE
8 #define PXR_EXEC_VDF_DATA_MANAGER_FACADE
9 
10 #include "pxr/pxr.h"
11 
13 
15 
16 class VdfMask;
17 class VdfOutput;
18 class VdfVector;
19 
20 /// Facade that gives clients access to values cached on an executor, without
21 /// exposing the entire VdfExecutorInterface API.
22 ///
24 {
25 public:
26  explicit VdfDataManagerFacade(const VdfExecutorInterface &executor)
27  : _executor(&executor)
28  {}
29 
30  /// Returns the value cached at \p output for the given \p mask.
31  ///
32  /// Returns `nullptr` on cache misses.
33  ///
35  const VdfOutput &output,
36  const VdfMask &mask) const {
37  return _executor->GetOutputValue(output, mask);
38  }
39 
40 private:
41  const VdfExecutorInterface *_executor;
42 };
43 
45 
46 #endif
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
const VdfVector * GetOutputValue(const VdfOutput &output, const VdfMask &mask) const
A VdfMask is placed on connections to specify the data flowing through them.
Definition: mask.h:36
GLint GLuint mask
Definition: glcorearb.h:124
VdfDataManagerFacade(const VdfExecutorInterface &executor)
const VdfVector * GetOutputValue(const VdfOutput &output, const VdfMask &mask) const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Abstract base class for classes that execute a VdfNetwork to compute a requested set of values...