[vtk-developers] [VTK 0013581]: Wrapped templated classes and module boundaries

Mantis Bug Tracker mantis at public.kitware.com
Sun Oct 28 14:50:06 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.vtk.org/Bug/view.php?id=13581 
====================================================================== 
Reported By:                David Gobbi
Assigned To:                David Gobbi
====================================================================== 
Project:                    VTK
Issue ID:                   13581
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     tabled
Project:                    TBD 
Type:                       incorrect functionality 
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2012-10-28 12:50 MDT
Last Modified:              2012-10-28 12:50 MDT
====================================================================== 
Summary:                    Wrapped templated classes and module boundaries
Description: 
TestTemplates has been failing since the vtkTuple was moved from CommonDataModel
to CommonMath.  Because of the move, the python wrappers no longer recognize
vtkTuple as the superclass of vtkVector and vtkColor, resulting in loss of
functionality within the python wrappers.

The problem is that vtkWrapPython searches through the module hierarchy file to
see what instances of each templated class are used within its own module, but
vtkWrapPython cannot know how a templated class might be used in other modules. 
Hence, vtkWrapPython cannot know what instances of the vtkTuple template are
required by the vtkVector header file, because vtkVector.h is in a different
module.

The solution could either be a "global view" mechanism or some sort of hinting
mechanism, the latter is preferable.  The hints for vtkTuple<T,N> would be
T=uchar,int,float,double and N=2,3,4.

Another issue is that special wrapper files for non-vtkObjectBase types like
vtkVectorPython.cxx do not use import/export macros yet.  For each type that is
referred to, it will be necessary to check if that type is within the current
module (EXPORT) or a different module (IMPORT).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-10-28 12:50 David Gobbi    New Issue                                    
2012-10-28 12:50 David Gobbi    Status                   backlog => tabled   
2012-10-28 12:50 David Gobbi    Assigned To               => David Gobbi     
======================================================================




More information about the vtk-developers mailing list