C++ Binding Generator
ed
growlercab at gmail.com
Tue Feb 18 01:28:07 PST 2014
On Tuesday, 18 February 2014 at 09:15:11 UTC, Abdulhaq wrote:
> On Tuesday, 18 February 2014 at 08:32:07 UTC, ed wrote:
>> On Tuesday, 18 February 2014 at 06:44:19 UTC, ed wrote:
>> [snip]
>>
>>>>
>>>> Is your SWIG wrapping online somewhere? - I'd like to take a
>>>> look.
>>>
>>> https://github.com/lyrebirdsw/vtkdbind
>>>
>>> The SWIG bindings were left in a very bad state so they won't
>>> work at the moment. It should generate the D code and
>>> possibly compile but I don't think it will link I sort of
>>> gave up on it and decided to try the VTK wrapper generator.
>>>
>>> The last bindings I generated are in the repo under
>>> swigd/bindings/d
>>>
>>> Oh and some of the scripts will have a copyright in them,
>>> ignore it. It is just the automatic header our editors at
>>> work stamp in. It is all opensource, consider it BSD, I just
>>> haven't bothered putting any license in the files themselves.
>>>
>>> As for the VTK wrapper bindings they are convoluted but I'm
>>> making some headway. It is spread across C++/CMake files to
>>> complete the full process. The C++ creates a parser which
>>> extracts the required details, CMake then feeds the output of
>>> this into the wrapper generator.
>>>
>>> I have it generating half D / half Java at the moment. If I
>>> get it all D and compiling I'll upload it.
>>>
>>> Cheers,
>>> ed
>>
>> Oh let me say this is real hack code I wrote for
>> experimentation only :D
>
> Thanks for taking the effort to upload it! If you do get the
> VTK wrapper approach going then please do upload that. I'd
> really like to know how the wrapper generator deals with object
> ownership transferal, or is it using some kind of reference
> counting?
Well I only know the Java wrapper as that is the one I'm trying
to adapt. It uses reference counting and a custom garbage
collector in the Java layer (vtkJavaGarbageCollector).
I'm looking at adapting this over to D. So far all goes well,
Java -->> D is straight forward. It will get interesting though
when things statr compiling :)
I'll post here if I get any further...
Cheers,
ed
vtkJava
More information about the Digitalmars-d
mailing list