comp.lang.ada
 help / color / mirror / Atom feed
From: Roger <rogermcm2@gmail.com>
Subject: Re: Interface Ada string with C++ std::string
Date: Wed, 4 Jul 2018 18:08:27 -0700 (PDT)
Date: 2018-07-04T18:08:27-07:00	[thread overview]
Message-ID: <6e33e4c2-6972-4c61-9e26-171913d119d7@googlegroups.com> (raw)
In-Reply-To: <bcd99977-2edb-4a68-9ab9-c278854c6e52@googlegroups.com>

On Wednesday, July 4, 2018 at 9:52:35 PM UTC+10, Lucretia wrote:

> The test_binding is the extreme way to do it.
> 
> The simpler, kind of, and preferred way would be to work out what you need from the string class. Pass around the C++ pointer inside Ada. Then have C functions which are imported to Ada which handle the messy C/C++ stuff, then wrap those in Ada handling the Messy Ada/C stuff there.

Thanks for all your advice.
It turns out that my original effort was almost there and now works.
As you advise, it just needs a C function between Ada and C++.

  reply	other threads:[~2018-07-05  1:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03 12:59 Interface Ada string with C++ std::string Roger
2018-07-03 13:13 ` Dan'l Miller
2018-07-03 13:16   ` Roger
2018-07-03 16:34     ` Jacob Sparre Andersen
2018-07-03 16:52       ` Roger
2018-07-03 16:56 ` Lucretia
2018-07-04  3:33   ` Roger
2018-07-04  4:13     ` Roger
2018-07-04 11:23     ` Lucretia
2018-07-04 11:45       ` Roger
2018-07-04 11:52         ` Lucretia
2018-07-05  1:08           ` Roger [this message]
2018-07-05 23:32 ` Roger
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox