VTK  9.1.0
vtkInformationKeyLookup.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkInformationKeyLookup.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
22#ifndef vtkInformationKeyLookup_h
23#define vtkInformationKeyLookup_h
24
25#include "vtkCommonCoreModule.h" // For export macro
26#include "vtkObject.h"
27
28#include <map> // For std::map
29#include <string> // For std::string
30#include <utility> // For std::pair
31
33
34class VTKCOMMONCORE_EXPORT vtkInformationKeyLookup : public vtkObject
35{
36public:
39
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
52
53protected:
56
57 friend class vtkInformationKey;
58
63 static void RegisterKey(
65
66private:
68 void operator=(const vtkInformationKeyLookup&) = delete;
69
70 typedef std::pair<std::string, std::string> Identifier; // Location, Name
71 typedef std::map<Identifier, vtkInformationKey*> KeyMap;
72
73 // Using a static function / variable here to ensure static initialization
74 // works as intended, since key objects are static, too.
75 static KeyMap& Keys();
76};
77
78#endif // vtkInformationKeyLookup_h
a simple class to control print indentation
Definition: vtkIndent.h:113
Find vtkInformationKeys from name and location strings.
static vtkInformationKeyLookup * New()
static vtkInformationKey * Find(const std::string &name, const std::string &location)
Find an information key 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.
Superclass for vtkInformation keys.
abstract base class for most VTK objects
Definition: vtkObject.h:73
@ key
Definition: vtkX3D.h:263
@ location
Definition: vtkX3D.h:412
@ name
Definition: vtkX3D.h:225
@ string
Definition: vtkX3D.h:496