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=-0.9 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:44c3:: with SMTP id b3mr4711294qto.221.1602872911330; Fri, 16 Oct 2020 11:28:31 -0700 (PDT) X-Received: by 2002:a0c:e1d1:: with SMTP id v17mr5149012qvl.15.1602872911140; Fri, 16 Oct 2020 11:28:31 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 16 Oct 2020 11:28:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=99.10.228.144; posting-account=AgomvAoAAAAj6rtZlNDUf1S1XVXbXDpg NNTP-Posting-Host: 99.10.228.144 References: <9d822023-b604-46b1-9443-4471e095704bn@googlegroups.com> <6f14427c-15a6-4874-a3f5-7bc308b2d3bfn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GDNative thick binding design From: Michael Hardeman Injection-Date: Fri, 16 Oct 2020 18:28:31 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:60448 List-Id: not when the object is constructed. I was wondering if something like the following were possible: package GDNative.Thick.Objects is type Object is abstract tagged private; -- create abstract or null subprograms for each subprogram here: -- https://docs.godotengine.org/en/stable/classes/class_object.html#class-object function Name (Self : in Object'class) return Wide_String is abstract; procedure Initialize (Self : in out Object'class) is null; -- etc... private type Object is abstract tagged null record; end; But I need some way of knowing here: https://github.com/MichaelAllenHardeman/gdnative_ada/blob/feature/adventure_game/examples/adventure_game/src/engine_hooks.adb#L28 what all the types that extend that object tagged type are, and what all the null methods they've chosen to override are. Kind of like the Java Class() style introspection. I'm sure there must be some way of doing it better tho, with generics? I'm just not creative enough to see the solution atm.