comp.lang.ada
 help / color / mirror / Atom feed
From: Thomas Schmidt <tc.schmidt@gmx.net>
Subject: Howto declare an Ada container with access to objects of a class hierachy
Date: Thu, 13 Jun 2013 00:43:22 +0000 (UTC)
Date: 2013-06-13T00:43:22+00:00	[thread overview]
Message-ID: <78030778392775583.757462tc.schmidt-gmx.net@news1.open-news-network.org> (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

             reply	other threads:[~2013-06-13  0:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13  0:43 Thomas Schmidt [this message]
2013-06-13  1:46 ` Howto declare an Ada container with access to objects of a class hierachy Adam Beneschan
2013-06-13 12:12   ` Thomas Schmidt
replies disabled

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