[vtk-developers] New VTK wrapping tools and a function pointer typedef question...

David Gobbi david.gobbi at gmail.com
Thu Nov 11 17:43:12 EST 2010


The preprocessor that I wrote for VTK already does macro expansion
_for itself_, so if you use macros in an #ifdef they will work as
expected.  The issue is that it doesn't do macro expansion for the
vtkParse.l/vtkParse.y.  The way that vtkParse.l does tokenization is
too ad-hoc, there is no-where that I can insert macro expansion into
the way that it works... at least, not until it is rewritten.

So for now, the use of macros in VTK is restricted to:
1) macros that define constants (these are expanded to their values)
2) macros that are used only in preprocessor directives
3) macros that are explicitly recognized by vtkParse.l (most VTK macros)

  David

On Thu, Nov 11, 2010 at 2:40 PM, Jean-Christophe Fillion-Robin
<jchris.fillionr at kitware.com> wrote:
> Hi David G.,
>
> Not sure how useful it could be but you can see here how qt-creator is
> expanding macros ...
> http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/libs/cplusplus/pp-engine.h
>
> Thks
> Jc



More information about the vtk-developers mailing list