comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Lundin" <bjorn.lundin.nospam@swipnet.se>
Subject: Re: Mapping c++ type VARIANT to Ada
Date: Mon, 07 Oct 2002 18:10:40 +0200
Date: 2002-10-07T18:10:40+02:00	[thread overview]
Message-ID: <Dkio9.1773$hT3.5522@nntpserver.swip.net> (raw)
In-Reply-To: 3DA08C2E.7040105@acm.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1202 bytes --]

Jeffrey Carter wrote:


> 
> I could be more helpful if you included the definition of VARIANT.

That was my question, although not very clear. 
Steve D pointed me to gnatcom

> 
> I would suggest that you use the types from Interfaces.C whenever
> possible. 

I'll do that

> Note that time stamp and quality are both passed as pointers. I'm not
> sure about a record, but an integer will be passed by copy. You need one
> of

Well I wrote the spec as pointers, but in the dll's documetation they are 
not, however in all other similar calls/callbacks they are pointers, which 
now makes me now belive that the documentation is wrong.
I'll try with pointers  
> 
> Finally, C knows nothing about protected procedures. You probably should
>   remove the "protected" from the type definition, and apply
> 
> pragma Convention (C, Opc_Callback_Handler_Type);
>

This construct was taken from 'Ada as a second language'. 
I tried whitout it just an ordinary procedure, and it worked.
However, the point with protected types was to enable some sort
of tasking, since the callbacks can come anytime, always asychronic.
I do get the callbacks now too.

Thanks for the tips about the pragmas.

/Bj�rn







  reply	other threads:[~2002-10-07 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-06 18:27 Mapping c++ type VARIANT to Ada Björn Lundin
2002-10-06 19:16 ` Jeffrey Carter
2002-10-07 16:10   ` Björn Lundin [this message]
2002-10-07  3:21 ` SteveD
2002-10-07 16:00   ` Björn Lundin
replies disabled

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