That define/undef pattern was previously used to keep template parameters out of the wrapped class hierarchy.<div><br></div><div>The wrapper generators would simply use vtkSIVectorProperty as the parent class.</div><div><br>
</div><div>Now that generators are macro-aware after this commit, something else has to fool them instead.</div><div><br><br><div class="gmail_quote">On Fri, Feb 10, 2012 at 4:28 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com">marcus.hanwell@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
That makes sense, I wasn't quite sure why we would do things like this,<br>
<br>
#define vtkSIVectorProperty vtkSIVectorPropertyTemplate<vtkIdType, bool><br>
class VTK_EXPORT vtkSIIdTypeVectorProperty : public vtkSIVectorProperty<br>
#undef vtkSIVectorProperty<br>
<br>
This is what is leading to the issue I saw. I guess the major issue<br>
here is that the expanded name is then used to name the command, and<br>
so changing the <, > characters would have resulted in a valid symbol<br>
name.<br>
<br>
Thanks for fixing this up, I am compiling the proposed patch right now<br>
to check it out.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marcus<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, Feb 10, 2012 at 3:27 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> Hi Markus,<br>
><br>
> The error looks identical to an issue that I saw in VTK where the<br>
> developers used macros to fool the wrappers into thinking that<br>
> vtkIntArray et al had vtkDataArray as their superclass, when the<br>
> real superclass was in fact vtkDataArrayTemplate<int>.  With the<br>
> new macro expansion code, the wrappers aren't fooled anymore.<br>
><br>
> I can add special-cases to the wrapper code for these Paraview<br>
> classes (as I did for vtkDataArray) until I up with a general solution.<br>
><br>
>  - David<br>
><br>
><br>
> On Fri, Feb 10, 2012 at 12:34 PM, Marcus D. Hanwell<br>
> <<a href="mailto:marcus.hanwell@kitware.com">marcus.hanwell@kitware.com</a>> wrote:<br>
>> Hi David,<br>
>><br>
>> It looks like there are some issues introduced in ParaView's client<br>
>> server wrapping with the new macro expansion code, I am seeing<br>
>> failures such as,<br>
>><br>
>> [ 85%] Building CXX object<br>
>> ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementationCS.dir/vtkSIDoubleVectorPropertyClientServer.cxx.o<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:16:40:<br>
>> error: invalid declarator before ‘Command’<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:<br>
>> In function ‘int<br>
>> vtkSIDoubleVectorPropertyCommand(vtkClientServerInterpreter*,<br>
>> vtkObjectBase*, const char*, const vtkClientServerStream&,<br>
>> vtkClientServerStream&)’:<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:87:42:<br>
>> error: expected primary-expression before ‘Command’<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:87:42:<br>
>> error: expected ‘)’ before ‘Command’<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:<br>
>> At global scope:<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:109:41:<br>
>> error: invalid declarator before ‘_Init’<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:<br>
>> In function ‘void<br>
>> vtkSIDoubleVectorProperty_Init(vtkClientServerInterpreter*)’:<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:119:49:<br>
>> error: no matching function for call to<br>
>> ‘vtkSIVectorPropertyTemplate<double>::vtkSIVectorPropertyTemplate(vtkClientServerInterpreter*&)’<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:119:49:<br>
>> note: candidates are:<br>
>> /home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:68:3:<br>
>> note: vtkSIVectorPropertyTemplate<T,<br>
>> force_idtype>::vtkSIVectorPropertyTemplate(const<br>
>> vtkSIVectorPropertyTemplate<T, force_idtype>&) [with T = double,<br>
>> force_idtype = int, vtkSIVectorPropertyTemplate<T, force_idtype> =<br>
>> vtkSIVectorPropertyTemplate<double>]<br>
>> /home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:68:3:<br>
>> note:   no known conversion for argument 1 from<br>
>> ‘vtkClientServerInterpreter*’ to ‘const<br>
>> vtkSIVectorPropertyTemplate<double>&’<br>
>> /home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:46:3:<br>
>> note: vtkSIVectorPropertyTemplate<T,<br>
>> force_idtype>::vtkSIVectorPropertyTemplate() [with T = double,<br>
>> force_idtype = int]<br>
>> /home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:46:3:<br>
>> note:   candidate expects 0 arguments, 1 provided<br>
>> /home/marcus/ssd/src/ParaView/ParaViewCore/ServerImplementation/vtkSIVectorPropertyTemplate.h:47:3:<br>
>> error: ‘vtkSIVectorPropertyTemplate<T,<br>
>> force_idtype>::~vtkSIVectorPropertyTemplate() [with T = double,<br>
>> force_idtype = int]’ is protected<br>
>> /home/marcus/ssd/build/ParaView/ParaViewCore/ServerImplementation/vtkSIDoubleVectorPropertyClientServer.cxx:119:49:<br>
>> error: within this context<br>
>> make[2]: *** [ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementationCS.dir/vtkSIDoubleVectorPropertyClientServer.cxx.o]<br>
>> Error 1<br>
>> make[1]: *** [ParaViewCore/ServerImplementation/CMakeFiles/vtkPVServerImplementationCS.dir/all]<br>
>> Error 2<br>
>> make: *** [all] Error 2<br>
>><br>
>> The generated code looks wrong too, things such as the following are appearing,<br>
>><br>
>> int vtkSIVectorPropertyTemplate<double>Command(vtkClientServerInterpreter*,<br>
>> vtkObjectBase*, const char*, const vtkClientServerStream&,<br>
>> vtkClientServerStream& resultStream);<br>
>><br>
>> and,<br>
>><br>
>> if (vtkSIVectorPropertyTemplate<double>Command(arlu,<br>
>> op,method,msg,resultStream))<br>
>>    {<br>
>>    return 1;<br>
>>    }<br>
>><br>
>> which becomes,<br>
>><br>
>> if (vtkSIVectorPropertyCommand(arlu, op,method,msg,resultStream))<br>
>>    {<br>
>>    return 1;<br>
>>    }<br>
>><br>
>> when the commit is reverted locally. Is this a special case we need to<br>
>> add to the ParaView code?<br>
>><br>
>> Thanks,<br>
>><br>
>> Marcus<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br></div>