comp.lang.ada
 help / color / mirror / Atom feed
* Howto declare an Ada container with access to objects of a class hierachy
@ 2013-06-13  0:43 Thomas Schmidt
  2013-06-13  1:46 ` Adam Beneschan
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schmidt @ 2013-06-13  0:43 UTC (permalink / raw)


Hi,

Hoping this Is the right newsgroup for asking my question.

I want to set up a hashed set of accesses (allocated from heap) to objects
of a given class hierarchie (the top class may f.e. be called "Top"). I
decided to use "Ada.Containers.Indefinite_Hashed_Sets". The hash method
should be a primitive which may be overwritten by derived classes. I've
declared Tops hash functions formal parameter as of type "access Top". How
do I've to declare the sets Element_Type? I think if I use "Top'Access" it
wouldn't fit the hash functions 
parameter type nor could I store objects of classes derived from "Top".

Sorry, i'm just a beginner coming from C/C++.

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-13 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-13  0:43 Howto declare an Ada container with access to objects of a class hierachy Thomas Schmidt
2013-06-13  1:46 ` Adam Beneschan
2013-06-13 12:12   ` Thomas Schmidt

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