comp.lang.ada
 help / color / mirror / Atom feed
From: Michael Hardeman <mhardeman25@gmail.com>
Subject: Re: GDNative thick binding design
Date: Fri, 16 Oct 2020 11:28:30 -0700 (PDT)	[thread overview]
Message-ID: <dda8138e-3f2e-40e5-b917-472a03879079n@googlegroups.com> (raw)
In-Reply-To: <rmcnl6$dhj$1@gioia.aioe.org>

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.

  reply	other threads:[~2020-10-16 18:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 21:08 GDNative thick binding design Michael Hardeman
2020-10-16  6:38 ` Luke A. Guest
2020-10-16 16:39   ` Michael Hardeman
2020-10-16 18:09     ` Luke A. Guest
2020-10-16 18:28       ` Michael Hardeman [this message]
2020-10-16 18:31         ` Luke A. Guest
2020-10-21  2:58           ` Michael Hardeman
2020-10-21  6:59             ` Luke A. Guest
2020-10-21 22:08               ` Michael Hardeman
2020-10-21 23:22                 ` Luke A. Guest
2020-10-26  3:38                   ` Michael Hardeman
2020-10-26  5:41                     ` Per Sandberg
2020-10-26 13:53                       ` Michael Hardeman
2020-10-27  3:34                         ` Michael Hardeman
2020-10-17 10:09         ` AdaMagica
2020-10-18 20:21 ` Per Sandberg
2020-10-21  3:34   ` Michael Hardeman
2020-10-21 16:16     ` Per Sandberg
2020-10-21 22:48       ` Michael Hardeman
replies disabled

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