VTK  9.4.20241104
vtkInformationObjectBaseKey.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
14#ifndef vtkInformationObjectBaseKey_h
15#define vtkInformationObjectBaseKey_h
16
17#include "vtkCommonCoreModule.h" // For export macro
18#include "vtkInformationKey.h"
19
20#include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
21
22VTK_ABI_NAMESPACE_BEGIN
23class vtkObjectBase;
24
25class VTKCOMMONCORE_EXPORT vtkInformationObjectBaseKey : public vtkInformationKey
26{
27public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
32 const char* name, const char* location, const char* requiredClass = nullptr);
34
42 const char* name, const char* location, const char* requiredClass = nullptr)
43 {
44 return new vtkInformationObjectBaseKey(name, location, requiredClass);
45 }
46
48
55
61 void ShallowCopy(vtkInformation* from, vtkInformation* to) override;
62
66 void Report(vtkInformation* info, vtkGarbageCollector* collector) override;
67
68protected:
69 // The type required of all objects stored with this key.
70 const char* RequiredClass;
71
73
74private:
76 void operator=(const vtkInformationObjectBaseKey&) = delete;
77};
78
79VTK_ABI_NAMESPACE_END
80#endif
Detect and break reference loops.
a simple class to control print indentation
Definition vtkIndent.h:108
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
#define VTK_NEWINSTANCE