comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Breaking a circularity
Date: Mon, 28 Mar 2011 11:15:08 +0100
Date: 2011-03-28T11:15:08+01:00	[thread overview]
Message-ID: <m2lizzpn4j.fsf@pushface.org> (raw)
In-Reply-To: dd0c7179-9e48-4366-9b1f-c5586b2c6e3c@e21g2000yqe.googlegroups.com

How is the Event_Queue going to know which instance of State_Type to
pass to a call of Handle (State, Event)?

Could the same State instance be passed to more than one Event_Queue?

Will you really be using different State_Types? (just checking.) 

You could try constraining an Event_Queue by "access State_Type'Class".

Should State_Type be tagged as well as Event_Type? (I realise this ends
up double-dispatching in Handle, would need to be class-wide in -
probably - State_Type.)

I think that with this sort of problem you are going to have to bite the
bullet and use access and controlled types (well, controlled if you are
going to delete queues. If not, why bother?)



  parent reply	other threads:[~2011-03-28 10:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28  4:11 Breaking a circularity Gene
2011-03-28  9:59 ` Ludovic Brenta
2011-03-28 11:37   ` Simon Wright
2011-03-28 22:38     ` Gene
2011-03-29  3:01       ` Randy Brukardt
2011-03-28 19:47   ` Gene
2011-03-28 10:15 ` Simon Wright [this message]
2011-03-28 21:31   ` Gene
2011-03-28 11:06 ` Martin
2011-03-28 22:26   ` Gene
2011-03-29 16:28     ` Martin
replies disabled

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