20 #ifndef vtkInformationKey_h
21 #define vtkInformationKey_h
23 #include "vtkCommonCoreModule.h"
27 VTK_ABI_NAMESPACE_BEGIN
40 const char* GetName() VTK_FUTURE_CONST;
46 const char* GetLocation() VTK_FUTURE_CONST;
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; \
192 void ConstructClass(
const char*);
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; \
222 VTK_ABI_NAMESPACE_END
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
Detect and break reference loops.
a simple class to control print indentation
abstract base class for most VTK objects
friend class vtkInformationKey
Some classes need to clear the reference counts manually due to the way they work.
void operator=(const vtkObjectBase &)
void Print(ostream &os)
Print an object to an ostream.