[vtk-developers] Template expansion in wrappers and ParaView client server wrapping

Marcus D. Hanwell marcus.hanwell at kitware.com
Fri Feb 10 14:34:55 EST 2012


Hi David,

It looks like there are some issues introduced in ParaView's client
server wrapping with the new macro expansion code, I am seeing
failures such as,

[ 85%] Building CXX object
ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementationCS.dir/vtkSIDoubleVectorPropertyClientServer.cxx.o
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:16:40:
error: invalid declarator before ‘Command’
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:
In function ‘int
vtkSIDoubleVectorPropertyCommand(vtkClientServerInterpreter*,
vtkObjectBase*, const char*, const vtkClientServerStream&,
vtkClientServerStream&)’:
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:87:42:
error: expected primary-expression before ‘Command’
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:87:42:
error: expected ‘)’ before ‘Command’
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:
At global scope:
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:109:41:
error: invalid declarator before ‘_Init’
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:
In function ‘void
vtkSIDoubleVectorProperty_Init(vtkClientServerInterpreter*)’:
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:119:49:
error: no matching function for call to
‘vtkSIVectorPropertyTemplate<double>::vtkSIVectorPropertyTemplate(vtkClientServerInterpreter*&)’
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:119:49:
note: candidates are:
/home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:68:3:
note: vtkSIVectorPropertyTemplate<T,
force_idtype>::vtkSIVectorPropertyTemplate(const
vtkSIVectorPropertyTemplate<T, force_idtype>&) [with T = double,
force_idtype = int, vtkSIVectorPropertyTemplate<T, force_idtype> =
vtkSIVectorPropertyTemplate<double>]
/home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:68:3:
note:   no known conversion for argument 1 from
‘vtkClientServerInterpreter*’ to ‘const
vtkSIVectorPropertyTemplate<double>&’
/home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:46:3:
note: vtkSIVectorPropertyTemplate<T,
force_idtype>::vtkSIVectorPropertyTemplate() [with T = double,
force_idtype = int]
/home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:46:3:
note:   candidate expects 0 arguments, 1 provided
/home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:47:3:
error: ‘vtkSIVectorPropertyTemplate<T,
force_idtype>::~vtkSIVectorPropertyTemplate() [with T = double,
force_idtype = int]’ is protected
/home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:119:49:
error: within this context
make[2]: *** [ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementationCS.dir/vtkSIDoubleVectorPropertyClientServer.cxx.o]
Error 1
make[1]: *** [ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementationCS.dir/all]
Error 2
make: *** [all] Error 2

The generated code looks wrong too, things such as the following are appearing,

int vtkSIVectorPropertyTemplate<double>Command(vtkClientServerInterpreter*,
vtkObjectBase*, const char*, const vtkClientServerStream&,
vtkClientServerStream& resultStream);

and,

if (vtkSIVectorPropertyTemplate<double>Command(arlu,
op,method,msg,resultStream))
    {
    return 1;
    }

which becomes,

if (vtkSIVectorPropertyCommand(arlu, op,method,msg,resultStream))
    {
    return 1;
    }

when the commit is reverted locally. Is this a special case we need to
add to the ParaView code?

Thanks,

Marcus



More information about the vtk-developers mailing list