[vtkusers] C++ introspection (was raw buffer access in Tcl)

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Mon Jun 16 00:33:47 EDT 2003


>>>>> "DP" == David Pont <David.Pont at ForestResearch.co.nz> writes:

    DP> Hi,
    DP>    long ago Paul Rajlich put together a 'pipeline browser' in
    DP>    Tcl
    DP>       http://brighton.ncsa.uiuc.edu/prajlich/vtkPipeline/

Just FYI a similar but possibly more mature one is available for
Python here:

     http://mayavi.sf.net/vtkPipeline

This also supports persistence of some form.

[snip]
    DP> class methods.  It is beyond my patchy programming knowledge
    DP> as to the best way to achieve this, but my gut feeling is it
    DP> would be best in the native vtk language, C++. This could then
    DP> be wrapped for other languages as per the core vtk.

There are libraries out there that let you more or less do what you
want but its quite unsatisfactory and definitely not in the same
league as what you can do with a scripting language.  C/C++ does not
provide a native mechanism to do this.  This sort of thing is best
done using a scripting language.  One obvious way of doing this for
VTK via C++ would be to dump the method information to a special XML
(or something else) file and then use that to obtain the necessary
information about a particular class and its methods.  However this is
a pain since it does require the XML data and quite unlike how you can
do this in Python or Tcl.

Writing a pipeline editor is sure possible but is IMHO best done in a
scripting language.  Writing it in C++ would be quite masochistic,
IMHO.

cheers,
prabhu



More information about the vtkusers mailing list