32 #ifndef vtkInformationKey_h
33 #define vtkInformationKey_h
35 #include "vtkCommonCoreModule.h"
61 const char* GetName();
67 const char* GetLocation();
170 #define vtkInformationKeySetStringMacro(name) \
171 virtual void Set##name(const char* _arg) \
173 if (this->name == nullptr && _arg == nullptr) \
177 if (this->name && _arg && (!strcmp(this->name, _arg))) \
181 delete[] this->name; \
184 size_t n = strlen(_arg) + 1; \
185 char* cp1 = new char[n]; \
186 const char* cp2 = (_arg); \
195 this->name = nullptr; \
213 void ConstructClass(
const char*);
223 #define vtkInformationKeyMacro(CLASS, NAME, type) \
224 static vtkInformation##type##Key* CLASS##_##NAME = new vtkInformation##type##Key(#NAME, #CLASS); \
225 vtkInformation##type##Key* CLASS::NAME() { return CLASS##_##NAME; }
226 #define vtkInformationKeySubclassMacro(CLASS, NAME, type, super) \
227 static vtkInformation##type##Key* CLASS##_##NAME = new vtkInformation##type##Key(#NAME, #CLASS); \
228 vtkInformation##super##Key* CLASS::NAME() { return CLASS##_##NAME; }
229 #define vtkInformationKeyRestrictedMacro(CLASS, NAME, type, required) \
230 static vtkInformation##type##Key* CLASS##_##NAME = \
231 new vtkInformation##type##Key(#NAME, #CLASS, required); \
232 vtkInformation##type##Key* CLASS::NAME() { return CLASS##_##NAME; }
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.