[vtk-developers] vtkVector class -- proposed rewrite

David Gobbi david.gobbi at gmail.com
Mon Jul 25 14:03:18 EDT 2011


Hi Jean-Christophe,

Like I said in my email, I already know how to do it.  In fact, the
macro expansion code already exists in the preprocessor that I
wrote last year.  The only piece that I still have to write is the bit
that feeds the result of the expansion into lex via yy_scan_string(),
and that part is tricky because it will require a rearrangement of
the current vtkParse.l.

 - David


On Mon, Jul 25, 2011 at 11:51 AM, Jean-Christophe Fillion-Robin
<jchris.fillionr at kitware.com> wrote:
> Regarding the macro expansion, it may be worth looking into the following
> class:
> http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/libs/cplusplus/pp-macro-expander.h
>
> Hth
> Jc
>
> On Mon, Jul 25, 2011 at 1:39 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>
>> On Fri, Jul 22, 2011 at 6:13 PM, David Lonie <loniedavid at gmail.com> wrote:
>>
>> > I'd like to ask for opinions on the following patch:
>> >
>> >
>> > http://github.com/dlonie/VTK/commit/6fd3b1c50244174d2ecb2e8bf4ae40996b0f61d6
>>
>> A couple quick notes re: wrapping.  The current wrappers will not be
>> able to wrap this class because
>> 1) the wrappers do not perform macro expansion (except in ifdefs)
>> 2) the wrappers do not wrap classes in #included files
>> 3) the "+" and "-" operators are not wrapped
>>
>> None of these issues are insurmountable, I know how to fix them but do
>> not know when I might have time.  So I'd just like to warn you that,
>> for now, the wrappers will not allow you to use a macro for a class
>> name.
>>
>>  - David



More information about the vtk-developers mailing list