HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
executorObserver.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_OBSERVER_H
8 #define PXR_EXEC_VDF_EXECUTOR_OBSERVER_H
9 
10 /// \file
11 
12 #include "pxr/pxr.h"
13 #include "pxr/exec/vdf/api.h"
14 
16 
18 
19 ////////////////////////////////////////////////////////////////////////////////
20 ///
21 /// \class VdfExecutorObserver
22 ///
23 /// \brief This is an interface for any class that wants to
24 /// listen to specific executor events, such as executor
25 /// deletion, or clearing data on the executor.
26 ///
27 /// NOTE: This class MUST NOT be used for fine grained
28 /// observations, as this specific pattern could dramatically
29 /// reduce performance.
30 ///
32 {
33  friend class VdfExecutorInterface;
34 
35 public:
36  VDF_API
37  virtual ~VdfExecutorObserver();
38 
39 protected:
40  /// This will be called once the observed executor gets deleted.
41  ///
42  /// The observed \p executor is passed as a parameter.
43  ///
44  virtual void _OnExecutorDelete(
45  VdfExecutorInterface *executor) const = 0;
46 
47  /// This will get called once the data is being cleared on the
48  /// observed executor.
49  ///
50  /// The observed \p executor is passed as a parameter.
51  ///
52  virtual void _OnExecutorClearData(
53  VdfExecutorInterface *executor) const = 0;
54 
55 };
56 
57 ////////////////////////////////////////////////////////////////////////////////
58 
60 
61 #endif //PXR_EXEC_VDF_EXECUTOR_OBSERVER_H
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
This is an interface for any class that wants to listen to specific executor events, such as executor deletion, or clearing data on the executor.
#define VDF_API
Definition: api.h:25
#define VDF_API_TYPE
Definition: api.h:26
#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...