Wrapped templated classes and module boundaries
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
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).