adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] SWIG News


From: Alexandre Courbot
Subject: [Adonthell-devel] SWIG News
Date: 02 Dec 2001 20:08:20 +0100

Allright, I've done some serious tests with SWIG 1.3.9.

The templates works well, but unfortunately not for what we need them:
you can't inherit from a template class, as Joel uses to do for the
window system. Moreover, if it encounters a typedef'd template, SWIG
segfaults.

About namespace, there's no support at all, it just raises a syntax
error if it encounters the 'namespace' token.

Another interesting feature is the ability to rename overloaded methods.
Of course, there's no miracle but you can do it easily with a %name
directive.

Well, as you can see everything doesn't work as well as we would like.
We could sort of "emulate" namespaces by using different modules, as we
did before. But if we do so, we must take care of not having too much
redoundant information.

But anyway, soon or later SWIG will truly implement namespaces, so no
need to worry too much about that in our design.

So maybe we could discuss about whether we should organize our code
differently: Kai once suggested to use subdirectories - I say why not,
provided a subdirectory corresponds to a logical entity within the
program (say, a namespace) and that stuff that goes into subdirectories
is as indepandant as possible can from the other stuff. The -I flag of
gcc should then point to the src root, and when including a file you'd
do something like '#include "adgui/label"' which would make sense. But
before doing anything, I'd like we precisely know where to put what.
Once again, this is the beginning of the discussion, so don't take the
ideas exposed above as final opinions - we'd stick to something once the
Troll'o meter raises the critical point! ;)

Opinions, comments, ideas (C)
Alex.

-- 
http://www.gnurou.org

Attachment: pgp9720TgZsoU.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]