VTK  9.3.0
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:
31 
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
44 
45 protected:
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
a simple class to control print indentation
Definition: vtkIndent.h:38
Find vtkInformationKeys from name and location strings.
~vtkInformationKeyLookup() override
static void RegisterKey(vtkInformationKey *key, const std::string &name, const std::string &location)
Add a key to the KeyMap.
void PrintSelf(ostream &os, vtkIndent indent) override
Lists all known keys.
static vtkInformationKeyLookup * New()
static vtkInformationKey * Find(const std::string &name, const std::string &location)
Find an information key from name and location strings.
Superclass for vtkInformation keys.
abstract base class for most VTK objects
Definition: vtkObject.h:61
@ key
Definition: vtkX3D.h:257
@ location
Definition: vtkX3D.h:406
@ name
Definition: vtkX3D.h:219
@ string
Definition: vtkX3D.h:490