[vtk-developers] [Paraview-developers] Moving vtkMemberFunctionCommand to VTK

David Gobbi david.gobbi at gmail.com
Wed Oct 6 00:20:24 EDT 2010


The dynamic_cast might fail in dlopen()'d plugins, because of gcc's
RTTI system.  I know this sounds silly, but it might be a good idea
for it to do a C-style cast if the dynamic_cast fails:

T* handler = dynamic_cast<T*>(this->Handler.GetPointer());
if (handler == 0)
  {
  handler = (T *)this->Handler.GetPointer();
  }

This way it will only fail under a rare combination of circumstances:
1) gcc compiler, plugins loaded with dlopen() and without RTLD_GLOBAL
2) a "handler" class that uses multiple inheritance

And people who do multiple inheritance with VTK are already asking for trouble.

  David

On Tue, Oct 5, 2010 at 9:10 PM, Utkarsh Ayachit
<utkarsh.ayachit at kitware.com> wrote:
> I've merged the changes into VTK-master (merged using topic branch
> 'member_function_observers').
> Let me know if there are any issues. Attached is the patch for reference.
>
> Utkarsh
>



More information about the vtk-developers mailing list