VTK  9.2.20220705
vtkInformationObjectBaseKey.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInformationObjectBaseKey.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 =========================================================================*/
26 #ifndef vtkInformationObjectBaseKey_h
27 #define vtkInformationObjectBaseKey_h
28 
29 #include "vtkCommonCoreModule.h" // For export macro
30 #include "vtkInformationKey.h"
31 
32 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
33 
34 class vtkObjectBase;
35 
36 class VTKCOMMONCORE_EXPORT vtkInformationObjectBaseKey : public vtkInformationKey
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43  const char* name, const char* location, const char* requiredClass = nullptr);
45 
53  const char* name, const char* location, const char* requiredClass = nullptr)
54  {
55  return new vtkInformationObjectBaseKey(name, location, requiredClass);
56  }
57 
59 
66 
72  void ShallowCopy(vtkInformation* from, vtkInformation* to) override;
73 
77  void Report(vtkInformation* info, vtkGarbageCollector* collector) override;
78 
79 protected:
80  // The type required of all objects stored with this key.
81  const char* RequiredClass;
82 
84 
85 private:
87  void operator=(const vtkInformationObjectBaseKey&) = delete;
88 };
89 
90 #endif
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:119
Superclass for vtkInformation keys.
Key for vtkObjectBase values.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Report(vtkInformation *info, vtkGarbageCollector *collector) override
Report a reference this key has in the given information object.
vtkInformationObjectBaseKey(const char *name, const char *location, const char *requiredClass=nullptr)
~vtkInformationObjectBaseKey() override
void Set(vtkInformation *info, vtkObjectBase *)
Get/Set the value associated with this key in the given information object.
vtkObjectBase * Get(vtkInformation *info)
Get/Set the value associated with this key in the given information object.
static vtkInformationObjectBaseKey * MakeKey(const char *name, const char *location, const char *requiredClass=nullptr)
This method simply returns a new vtkInformationObjectBaseKey, given a name, location and optionally a...
vtkInformationKeySetStringMacro(RequiredClass)
void ShallowCopy(vtkInformation *from, vtkInformation *to) override
Copy the entry associated with this key from one information object to another.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObjectBase.h:74
@ location
Definition: vtkX3D.h:412
@ info
Definition: vtkX3D.h:382
@ name
Definition: vtkX3D.h:225
#define VTK_NEWINSTANCE