20#ifndef vtkInformationKey_h 
   21#define vtkInformationKey_h 
   23#include "vtkCommonCoreModule.h"  
   27VTK_ABI_NAMESPACE_BEGIN
 
  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;                                                                        \ 
  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; } 
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.