HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cacheView.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_CACHE_VIEW_H
8 #define PXR_EXEC_EXEC_USD_CACHE_VIEW_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/exec/execUsd/api.h"
15 
17 
18 #include <utility>
19 
21 
22 /// Provides a view of values computed by ExecUsdSystem::Compute().
23 ///
24 /// Cache views must not outlive the ExecUsdSystem or ExecUsdRequest from
25 /// which they were built.
26 ///
28 {
29 public:
30  /// Construct an invalid view.
31  ExecUsdCacheView() = default;
32 
33  /// Returns the computed value for the provided extraction \p index.
34  ///
35  /// Emits an error and returns an empty value if the \p index is not
36  /// evaluated.
37  ///
39  VtValue Get(int index) const;
40 
41 private:
42  friend class ExecUsd_RequestImpl;
43  explicit ExecUsdCacheView(
44  Exec_CacheView &&view)
45  : _view(std::move(view))
46  {}
47 
48 private:
49  Exec_CacheView _view;
50 };
51 
53 
54 #endif
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
friend class ExecUsd_RequestImpl
Definition: cacheView.h:42
#define EXECUSD_API
Definition: api.h:25
ExecUsdCacheView()=default
Construct an invalid view.
EXECUSD_API VtValue Get(int index) const
GLuint index
Definition: glcorearb.h:786
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: value.h:89