VTK  9.7.1
vtkFilteringInformationKeyManager.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkFilteringInformationKeyManager_h
14 #define vtkFilteringInformationKeyManager_h
15 
16 #include "vtkCommonExecutionModelModule.h" // For export macro
17 #include "vtkSystemIncludes.h"
18 
19 #include "vtkDebugLeaksManager.h" // DebugLeaks exists longer than info keys.
20 
21 #include <token/Singletons.h> // to increment its Schwarz counter
22 
23 #include <functional> // for finalizers
24 #include <vector> // for finalizers
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkInformationKey;
28 
29 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkFilteringInformationKeyManager
30 {
31 public:
34 
41  static void Register(vtkInformationKey* key);
42 
49  static void AddFinalizer(std::function<void()> finalizer);
50 
51 private:
52  // Unimplemented
55 
56  static void ClassInitialize();
57  static void ClassFinalize();
58 
59  static std::vector<std::function<void()>>* Finalizers;
60 };
61 
62 // This instance will show up in any translation unit that uses key
63 // types defined in vtkFiltering or that has a singleton. It will
64 // make sure vtkFilteringInformationKeyManager's vector of keys is
65 // initialized before and destroyed after it is used.
67 
68 VTK_ABI_NAMESPACE_END
69 #endif
70 // VTK-HeaderTest-Exclude: vtkFilteringInformationKeyManager.h
static vtkFilteringInformationKeyManager vtkFilteringInformationKeyManagerInstance
Superclass for vtkInformation keys.