[Insight-developers] Re: the swig interfaces

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Nov 22 14:52:54 EST 2006


Hi Bill,

Sorry for the delay

Le Mon, 20 Nov 2006 23:30:22 +0100, Bill Hoffman  
<bill.hoffman at kitware.com> a écrit:

> Gaëtan Lehmann wrote:
>>
>>
>> --Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>> http://voxel.jouy.inra.fr
> So, why does it seem like every file #includes every other file?
> And every typedef is repeated in each .i file.   This is going to
> add to the compile times, possibly break some compilers as the files
> will get so huge.   We need a way to only use the stuff we need in
> a particular translation unit.

Not all the files are included, only the ones in the Base module, and the  
one previously listed in the current module.
But you're right, it shouldn't be done that way. I think that's possible  
to include the headers and define the typedefs only of the type really  
used in a class - that's something to add to the TODO list

>
> Also, from your response it does not sound like you are interested in
> running a smaller test case with a simpler class hierarchy?   I am
> interested in helping, but I really want to make sure this works before
> moving  forward.  By work, I mean java, tcl, python, windows, mac,
> linux.

Without moving forward, and running any new test, we must decide what to  
do about the generated binaries.
I'm currently creating the "big" modules on python, composed of several  
swig modules. It require to generate some code, and I'm really not sure  
that's the right way to go: the code to generate is language specific, and  
will make harder adding support for new languages: it would force us to  
find how to do that with the new language, and that's not sure that it can  
work with all the languages.
By using the swig way, we are sure it will work with any language  
supported by swig, without more work.
It generates lots of files, but there is the same number of .py files, or  
.java files, and the high number of those files doesn't seem to be a  
problem or a performance issue.

Gaetan



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-developers mailing list