[vtkusers] Design Gripes

Will Schroeder will.schroeder at kitware.com
Fri Mar 29 06:35:49 EST 2002


FYI-

> > I think that you have some good points, but some of your observations are
> > and have been discussed in detail especially among the developers. Being a
> > newbie myself I have also wondered why templates and the standard template
> > library was not used more, but there are some heavyweight arguments
> > against it; one of them is that wrapping of templated code is difficult at
> > best.
>
>I understand. it is still manageable though. for example the latest
>version of SWIG seems to handle templates easily (single template
>argument, double+ arguments are tricky). they will still have to map to
>separate scripting language classes but that's ok.

Brad King at Kitware has developed a tool called Cable that can wrap 
arbitrarily complex C++ code. We use it on the ITK (Insight Segmentation 
and Registration Toolkit) to handle some nasty, nasty templated code. The 
process works by 1) using a patched version of gcc to parse the code and 
then dump an XML representation of the code (GCC_XML is the tool name see 
gccxml.org), and then 2) Cable reads the XML and produces the language 
wrapper (see http://public.kitware.com/Cable/HTML/Index.html). Right now 
only Tcl is supported, other languages could be added. It works in 
conjunction with CMake. There are still some issues being worked out with 
Cable, but it might eventually replace VTK wrapping....

Will




More information about the vtkusers mailing list