comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: Exposing agreggate members of a class
Date: 1999/01/03
Date: 1999-01-03T00:00:00+00:00	[thread overview]
Message-ID: <x7vyankguj9.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: 76cd39$21c8$1@news.gate.net

"David Botton" <dbotton@hotmail.com> writes:

> Given:
> 
> with GCanvas_Package; use GCanvas_Package;
> 
> type GWindow_Object is tagged with private;
> type GWindow_Pointer is access all GWindow_Object;
> 
> private:
> 
> type GWindow_Object is tagged
>    record
>         Canvas : GCanvas_Object;
>    end record;
> 
> What is the cleanest way to give access to the Canvas by reference in a way
> that will not require Unchecked Programming

You could use a generic:

  generic
    with procedure process (c : in out gcanvas_object);
  procedure access_canvas (g : gwindow_object);

(actually, I suspect that should be (g : in out gwindow_object))

NB, I'm not sure you actually mean 'by reference' here? see LRM 6.2(2)




  parent reply	other threads:[~1999-01-03  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-30  0:00 Exposing agreggate members of a class David Botton
1998-12-30  0:00 ` Tom Moran
1998-12-31  0:00 ` LeakyStain
1998-12-31  0:00   ` David Botton
1999-01-03  0:00 ` Simon Wright [this message]
1999-01-06  0:00 ` Matthew Heaney
replies disabled

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