[vtk-developers] Proposed change in vtkSetGet.h

David Doria daviddoria+vtk at gmail.com
Thu Dec 10 18:28:32 EST 2009


It seems that the macros do not name the variable. This causes very
obscure documentation such as
(double, double, double) or simply () in some cases. Can we change
things like the following:

#define vtkSetMacro(name,type) \
virtual void Set##name (type _arg) \
  { \
  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting
" #name " to " << _arg); \
  if (this->name != _arg) \
    { \
    this->name = _arg; \
    this->Modified(); \
    } \
  }

to something like

#define vtkSetMacro(name,type) \
virtual void Set##name (type name) \
  { \
  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting
" #name " to " << name); \
  if (this->name != name) \
    { \
    this->name = name; \
    this->Modified(); \
    } \
  }

Exactly this code may not be the solution because 'name' and
'this->name' may be ambiguous, but can something be done here?

I'm also curious why the _arg does not show up in the doxygen
documentation - is this removed by the doxygen parser or one of the
scripts that is run to convert the header to doxygen?

Thanks,

David



More information about the vtk-developers mailing list