20 #ifndef vtkInformationKey_h
21 #define vtkInformationKey_h
23 #include "vtkCommonCoreModule.h"
27 VTK_ABI_NAMESPACE_BEGIN
50 const char* GetName();
56 const char* GetLocation();
159 #define vtkInformationKeySetStringMacro(name) \
160 virtual void Set##name(const char* _arg) \
162 if (this->name == nullptr && _arg == nullptr) \
166 if (this->name && _arg && (!strcmp(this->name, _arg))) \
170 delete[] this->name; \
173 size_t n = strlen(_arg) + 1; \
174 char* cp1 = new char[n]; \
175 const char* cp2 = (_arg); \
184 this->name = nullptr; \
202 void ConstructClass(
const char*);
212 #define vtkInformationKeyMacro(CLASS, NAME, type) \
213 static vtkInformation##type##Key* CLASS##_##NAME = new vtkInformation##type##Key(#NAME, #CLASS); \
214 vtkInformation##type##Key* CLASS::NAME() { return CLASS##_##NAME; }
215 #define vtkInformationKeySubclassMacro(CLASS, NAME, type, super) \
216 static vtkInformation##type##Key* CLASS##_##NAME = new vtkInformation##type##Key(#NAME, #CLASS); \
217 vtkInformation##super##Key* CLASS::NAME() { return CLASS##_##NAME; }
218 #define vtkInformationKeyRestrictedMacro(CLASS, NAME, type, required) \
219 static vtkInformation##type##Key* CLASS##_##NAME = \
220 new vtkInformation##type##Key(#NAME, #CLASS, required); \
221 vtkInformation##type##Key* CLASS::NAME() { return CLASS##_##NAME; }
223 VTK_ABI_NAMESPACE_END
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
Detect and break reference loops.
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
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.