From: rodkay@dodo.com.au
Subject: Re: C to Ada
Date: 25 Nov 2006 15:52:47 -0800
Date: 2006-11-25T15:52:47-08:00 [thread overview]
Message-ID: <1164498767.618164.197920@14g2000cws.googlegroups.com> (raw)
In-Reply-To: <sa4slg7187u.fsf@margay.local>
Brian May wrote:
> >>>>> "rodkay" == rodkay <rodkay@dodo.com.au> writes:
>
> rodkay> These attempt to generate Ada bindings to both C and
> rodkay> C++ libraries. The 'ada' module is for any Ada compiler,
> rodkay> and produces bindings based on a 'proxy' approach. The
> rodkay> 'gnat' compiler targets the GNAT family of compilers, and
> rodkay> produces Ada types and objects which are the binary
> rodkay> equivalent of their corresponding C/C++ types.
>
> I am still not clear on the difference - what is the 'proxy' approach?
With the 'proxy' approach, the Ada type holds only a pointer to the
wrapped C++ object. When an object of the the Ada type is constructed,
a corresponding C++ object is created, and its pointer stored in the
Ada type object. All operations on the Ada object are then relayed to
its internal C++ object.
The 'gnat' binary approach produces an Ada record layout which is
equivalent to the C++ class layout. Operations act directly on the Ada
object.
> Can I assume that the GNAT target uses GNAT specific features and
> won't work without GNAT??
Yes, the 'gnat' SWIG module produces bindings which require a GNAT
compiler.
Perhaps a similar approach (binary-compatible) for other compilers
might be attempted, after the existing modules have matured a little
more.
next prev parent reply other threads:[~2006-11-25 23:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-23 22:12 C to Ada Brian May
2006-11-24 2:28 ` rodkay
2006-11-25 22:18 ` Brian May
2006-11-25 23:52 ` rodkay [this message]
2006-11-26 15:45 ` Robert A Duff
2006-11-26 18:12 ` Jeffrey Creem
2006-11-26 19:00 ` Martin Krischik
-- strict thread matches above, loose matches on Subject: below --
2003-01-20 19:28 chris.danx
1997-02-23 0:00 Cliff Lim
1997-02-27 0:00 ` David Wheeler
1996-10-30 0:00 Eiffel and Java + Ada dispatching Jon S Anthony
1996-11-04 0:00 ` Don Harrison
1996-11-04 0:00 ` C to Ada Ali Mirhosseini
1996-11-04 0:00 ` Robert Dewar
1996-11-04 0:00 ` Matthew Daniel
1995-04-07 0:00 c to ada JH Lee
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox