HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
evaluationState.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_EVALUATION_STATE_H
8 #define PXR_EXEC_VDF_EVALUATION_STATE_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 
14 #include "pxr/exec/vdf/api.h"
15 #include <string>
16 
18 
21 class VdfNode;
22 class VdfSchedule;
23 
24 ////////////////////////////////////////////////////////////////////////////////
25 ///
26 /// This object holds state that remains persistent during one round of
27 /// network evaluation.
28 ///
30 {
31 public:
32 
33  /// Constructor.
34  ///
36  const VdfExecutorInterface &executor,
37  const VdfSchedule &schedule,
38  VdfExecutorErrorLogger *errorLogger) :
39  _executor(executor),
40  _schedule(schedule),
41  _errorLogger(errorLogger)
42  {}
43 
44  /// The executor used for evaluation.
45  ///
47  return _executor;
48  }
49 
50  /// The schedule used for evaluation.
51  ///
52  const VdfSchedule &GetSchedule() const {
53  return _schedule;
54  }
55 
56  /// The executor error logger.
57  ///
59  return _errorLogger;
60  }
61 
62  /// Logs an execution warning to the executor error logger.
63  ///
64  VDF_API
65  void LogWarning(
66  const VdfNode &node,
67  const std::string &warning) const;
68 
69 private:
70 
71  // The executor that created this object.
72  const VdfExecutorInterface &_executor;
73 
74  // The current schedule.
75  const VdfSchedule &_schedule;
76 
77  // The error logger.
78  VdfExecutorErrorLogger *_errorLogger;
79 
80 };
81 
83 
84 #endif
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
Definition: node.h:52
#define VDF_API
Definition: api.h:25
Contains a specification of how to execute a particular VdfNetwork.
Definition: schedule.h:40
VdfExecutorErrorLogger * GetErrorLogger() const
const VdfSchedule & GetSchedule() const
const VdfExecutorInterface & GetExecutor() 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...
VDF_API void LogWarning(const VdfNode &node, const std::string &warning) const
VdfEvaluationState(const VdfExecutorInterface &executor, const VdfSchedule &schedule, VdfExecutorErrorLogger *errorLogger)