HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
executorFactory.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_EXECUTOR_FACTORY_H
8 #define PXR_EXEC_VDF_EXECUTOR_FACTORY_H
9 
10 ///\file
11 
12 #include "pxr/pxr.h"
13 
15 
16 #include <memory>
17 
19 
22 class VdfSpeculationNode;
23 
24 ///////////////////////////////////////////////////////////////////////////////
25 ///
26 /// \class VdfExecutorFactory
27 ///
28 ///
29 ///
30 template <
31  typename ChildExecutorType,
32  typename SpeculationExecutorType
33  >
35 {
36 public:
37 
38  /// Manufactures a new ChildExecutorType, which in an executor hierarchy
39  /// can be parented underneath the executor owning this factory.
40  ///
41  virtual std::unique_ptr<VdfExecutorInterface>
43  const VdfExecutorInterface *parentExecutor) const override final {
44  return std::unique_ptr<VdfExecutorInterface>(
45  new ChildExecutorType(parentExecutor));
46  }
47 
48  /// Manufactures a new SpeculationExecutorType with the same traits as the
49  /// executor owning this factory.
50  ///
51  virtual std::unique_ptr<VdfSpeculationExecutorBase>
53  const VdfSpeculationNode *speculationNode,
54  const VdfExecutorInterface *parentExecutor) const override final {
55  return std::unique_ptr<VdfSpeculationExecutorBase>(
56  new SpeculationExecutorType(speculationNode, parentExecutor));
57  }
58 
59 };
60 
61 ///////////////////////////////////////////////////////////////////////////////
62 
64 
65 #endif
virtual std::unique_ptr< VdfExecutorInterface > ManufactureChildExecutor(const VdfExecutorInterface *parentExecutor) const overridefinal
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
A node that pulls on a vector of value that are downstream of the current execution position...
virtual std::unique_ptr< VdfSpeculationExecutorBase > ManufactureSpeculationExecutor(const VdfSpeculationNode *speculationNode, const VdfExecutorInterface *parentExecutor) const overridefinal
#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...