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

David Gobbi david.gobbi at gmail.com
Thu Nov 11 14:19:08 EST 2010


Hi David,

The VTK build ignores the BTX/ETX markers everywhere except the
GUISupport directories, so to block those lines, you would have to use
this instead:

#ifndef __WRAP__

#endif

The reason for the failure is that the wrappers do not expand macros,
so they have to be programmed to specifically recognize VTK_CB_CC.
This would go in vtkParse.l:

"("[\t\n\r ]*"VTK_CB_CC"[\t\n\r ]*"*" { yylval.str = ""; return(LP); }

It should be put in the same place as where the APIENTRY macros are
recognized.  This will keep the parser from choking.  Do you want to
use this typedef'd type in methods that will be wrapped in Tcl,
Python, etc?

  David


On Thu, Nov 11, 2010 at 11:48 AM, David Cole <david.cole at kitware.com> wrote:
> Hey David Gobbi!
>
> Help!
>
> This commit that I just pushed to VTK 'master' is getting build errors
> on the continuous dashboard.
>
> http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=a86ee191000177c52c01b41cda36121c7f478920
>
>
> Is there something I should change in the wrapper generators to handle
> this new line of code inside of C++ classes??
>  // Description:
>  // Signature definition for programmable method callbacks. Methods passed to
>  // SetExecuteMethod or SetExecuteMethodArgDelete must conform to this
>  // signature.
>  typedef void (VTK_CB_CC *ProgrammableMethodCallbackType)(void *arg);
>
> Or should I resort to BTX/ETX here?
>
> It's ironic that this breaks the existing VTK wrappers.... The purpose
> of my commit was to make wrapping these programmable method types
> automatic as C# delegates in our ActiViz .NET code base..... :-)
>
> I'm building now with python wrapping turned on locally, so I should
> be able to verify the fix before I push it.
>
>
> Thanks for any suggestions,
> David Cole
> Kitware, Inc.
>



More information about the vtk-developers mailing list