20#ifndef vtkInformationKey_h
21#define vtkInformationKey_h
23#include "vtkCommonCoreModule.h"
27VTK_ABI_NAMESPACE_BEGIN
149#define vtkInformationKeySetStringMacro(name) \
150 virtual void Set##name(const char* _arg) \
152 if (this->name == nullptr && _arg == nullptr) \
156 if (this->name && _arg && (!strcmp(this->name, _arg))) \
160 delete[] this->name; \
163 size_t n = strlen(_arg) + 1; \
164 char* cp1 = new char[n]; \
165 const char* cp2 = (_arg); \
174 this->name = nullptr; \
202#define vtkInformationKeyMacro(CLASS, NAME, type) \
203 static vtkInformation##type##Key* CLASS##_##NAME = new vtkInformation##type##Key(#NAME, #CLASS); \
204 vtkInformation##type##Key* CLASS::NAME() \
206 return CLASS##_##NAME; \
208#define vtkInformationKeySubclassMacro(CLASS, NAME, type, super) \
209 static vtkInformation##type##Key* CLASS##_##NAME = new vtkInformation##type##Key(#NAME, #CLASS); \
210 vtkInformation##super##Key* CLASS::NAME() \
212 return CLASS##_##NAME; \
214#define vtkInformationKeyRestrictedMacro(CLASS, NAME, type, required) \
215 static vtkInformation##type##Key* CLASS##_##NAME = \
216 new vtkInformation##type##Key(#NAME, #CLASS, required); \
217 vtkInformation##type##Key* CLASS::NAME() \
219 return CLASS##_##NAME; \
Detect and break reference loops.
a simple class to control print indentation
abstract base class for most VTK objects
void operator=(const vtkObjectBase &)
friend class vtkInformationKey
Some classes need to clear the reference counts manually due to the way they work.