From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: GDNative thick binding design Date: Fri, 16 Oct 2020 19:09:13 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <9d822023-b604-46b1-9443-4471e095704bn@googlegroups.com> <6f14427c-15a6-4874-a3f5-7bc308b2d3bfn@googlegroups.com> NNTP-Posting-Host: JUN8/iIzeA71QWaIWFKODA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 Content-Language: en-GB X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:60447 List-Id: On 16/10/2020 17:39, Michael Hardeman wrote: > On Friday, October 16, 2020 at 2:38:38 AM UTC-4, Luke A. Guest wrote: > > Thanks for the detailed reply. Unfortunately I think I didn't get my question across correctly. > > I'm pretty familiar with most of the basic stuff I can do in Ada. I'm not asking for general advice on making a thick binding, I'm asking for help with one specific data structure/pattern. > > What is the best way to make Ada types/functions that wrap a particular thing: > > I just pushed a work in progress branch where you can see what I'm struggling with: > > https://github.com/MichaelAllenHardeman/gdnative_ada/blob/feature/adventure_game/examples/adventure_game/src/engine_hooks.adb#L29 > https://github.com/MichaelAllenHardeman/gdnative_ada/blob/feature/adventure_game/examples/adventure_game/src/example_object.adb#L90 > > Is it possible to create type (tagged record maybe) who's dispatching methods automatically register in some way? > If you mean call Register(Context); on construction of the object, then have you looked at the factory stuff? http://www.ada-auth.org/standards/12rm/html/RM-3-9.html#I2118