HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
request.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_REQUEST_H
8 #define PXR_EXEC_EXEC_USD_REQUEST_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/exec/execUsd/api.h"
15 
16 #include <memory>
17 #include <utility>
18 
20 
21 class ExecUsdSystem;
22 class ExecUsd_RequestImpl;
23 
24 /// A batch of values to compute together.
25 ///
26 /// ExecUsdRequest allows clients to specify multiple values to compute at the
27 /// same time. It is more efficient to perform compilation, scheduling and
28 /// evaluation for many attributes at the same time than to perform each of
29 /// these steps value-by-value.
30 ///
32 {
33 public:
36 
38  ExecUsdRequest& operator=(ExecUsdRequest &&);
39 
42 
43  /// Return true if this request may be used to compute values.
44  ///
45  /// Note that a return value of true does not mean that values are cached
46  /// or even that the network has been compiled. It only means that
47  /// calling ExecUsdSystem::PrepareRequest or ExecUsdSystem::Compute is
48  /// allowed.
49  ///
51  bool IsValid() const;
52 
53 private:
54  friend class ExecUsdSystem;
55  explicit ExecUsdRequest(std::unique_ptr<ExecUsd_RequestImpl> &&impl);
56 
57  ExecUsd_RequestImpl& _GetImpl() const {
58  return *_impl;
59  }
60 
61 private:
62  std::unique_ptr<ExecUsd_RequestImpl> _impl;
63 };
64 
66 
67 #endif
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
EXECUSD_API ExecUsdRequest(ExecUsdRequest &&)
#define EXECUSD_API
Definition: api.h:25
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
EXECUSD_API ~ExecUsdRequest()
EXECUSD_API bool IsValid() const
EXECUSD_API ExecUsdRequest & operator=(ExecUsdRequest &&)