From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd85303b24b257e2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-09 09:42:09 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!lll-winken.llnl.gov!ames!newsfeed.gsfc.nasa.gov!Eric.Beser From: ebeser@rigperson.atsc.allied.com (Eric Beser) Newsgroups: comp.lang.ada Subject: Re: Calling C++ from within ADA Date: 8 Nov 1994 15:22:16 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Message-ID: <39o538$d0h@paperboy.gsfc.nasa.gov> References: NNTP-Posting-Host: rigperson.atsc.allied.com Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Posted-From: InterNews 1.0@paperboy.gsfc.nasa.gov. Xdisclaimer: No attempt was made to authenticate the sender's name. Date: 1994-11-08T15:22:16+00:00 List-Id: We call C++ from Ada by doing the following. If the C++ object has been created before calling Ada, A "This Ptr" needs to be passed to the Ada for the object that is to be called. The This Ptr points to the object of reference. If other objects needed to be accessed, you can do it by getting other "This Ptr" pointers. The calling interface from Ada to C++ has to be to an extern "C" function. However this function can be defined in the H file. The "This Ptr" is used to access class member functions from the calling interface. The other rule is that no object can be called unless elaborated first. This includes Ada and C++. Hope this helps. Eric Beser