VTK  9.3.1
vtkInformationKeyLookup.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
3 
13 #ifndef vtkInformationKeyLookup_h
14 #define vtkInformationKeyLookup_h
15 
16 #include "vtkCommonCoreModule.h" // For export macro
17 #include "vtkObject.h"
18 
19 #include <map> // For std::map
20 #include <string> // For std::string
21 #include <utility> // For std::pair
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkInformationKey;
25 
26 class VTKCOMMONCORE_EXPORT vtkInformationKeyLookup : public vtkObject
27 {
28 public:
29  static vtkInformationKeyLookup* New();
31 
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
43  static vtkInformationKey* Find(const std::string& name, const std::string& location);
44 
45 protected:
47  ~vtkInformationKeyLookup() override;
48 
49  friend class vtkInformationKey;
50 
55  static void RegisterKey(
57 
58 private:
60  void operator=(const vtkInformationKeyLookup&) = delete;
61 
62  typedef std::pair<std::string, std::string> Identifier; // Location, Name
63  typedef std::map<Identifier, vtkInformationKey*> KeyMap;
64 
65  // Using a static function / variable here to ensure static initialization
66  // works as intended, since key objects are static, too.
67  static KeyMap& Keys();
68 };
69 
70 VTK_ABI_NAMESPACE_END
71 #endif // vtkInformationKeyLookup_h
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Find vtkInformationKeys from name and location strings.
Superclass for vtkInformation keys.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...