32 #ifndef vtkInformationKey_h 33 #define vtkInformationKey_h 35 #include "vtkCommonCoreModule.h" 61 const char* GetName();
67 const char* GetLocation();
95 { this->ShallowCopy(from, to); }
166 #define vtkInformationKeySetStringMacro(name) \ 167 virtual void Set##name (const char* _arg) \ 169 if ( this->name == nullptr && _arg == nullptr) { return;} \ 170 if ( this->name && _arg && (!strcmp(this->name,_arg))) { return;} \ 171 delete [] this->name; \ 174 size_t n = strlen(_arg) + 1; \ 175 char *cp1 = new char[n]; \ 176 const char *cp2 = (_arg); \ 178 do { *cp1++ = *cp2++; } while ( --n ); \ 182 this->name = nullptr; \ 201 void ConstructClass(
const char*);
211 #define vtkInformationKeyMacro(CLASS, NAME, type) \ 212 static vtkInformation##type##Key* CLASS##_##NAME = \ 213 new vtkInformation##type##Key(#NAME, #CLASS); \ 214 vtkInformation##type##Key* CLASS::NAME() \ 216 return CLASS##_##NAME; \ 218 #define vtkInformationKeySubclassMacro(CLASS, NAME, type, super) \ 219 static vtkInformation##type##Key* CLASS##_##NAME = \ 220 new vtkInformation##type##Key(#NAME, #CLASS); \ 221 vtkInformation##super##Key* CLASS::NAME() \ 223 return CLASS##_##NAME; \ 225 #define vtkInformationKeyRestrictedMacro(CLASS, NAME, type, required) \ 226 static vtkInformation##type##Key* CLASS##_##NAME = \ 227 new vtkInformation##type##Key(#NAME, #CLASS, required); \ 228 vtkInformation##type##Key* CLASS::NAME() \ 230 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
void operator=(const vtkObjectBase &)
void Print(ostream &os)
Print an object to an ostream.