comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: please help - access and inheritence
Date: Mon, 08 Dec 2003 19:50:58 +0100
Date: 2003-12-08T19:50:58+01:00	[thread overview]
Message-ID: <1339724.UG9tll5RLS@linux1.krischik.com> (raw)
In-Reply-To: 3fd27939$1@news.barak.net.il

Ratson Janiv wrote:

> type Vehicleptr is access Jr.Vehicle.Vehicle'Class;

An other poster allready pointed out that you need to use access all. 

> type Vehiclesarr is array (1..Maxvehilces) of Vehicleptr;
> 
> Vp1,Vp2,Vp3,Vp4,Vp5: aliased Jr.Vehicle.Private_Car.Vehicle_Private;
> 
> Arr(1) := Vehicleptr(Vp1'access); -- failed, why? please ...

But maybee you would be better off using some container library i.E. the
booch components:

http://www.pushface.org/components/bc

and since you are trying to store 

Vehicle'Class you might also want to look at the indefinte extension at:

http://adacl.sourceforge.net

Examples:

http://adacl.sourceforge.net/html
______Include__AdaCL-SAR-Filter-Container__ads.htm

http://adacl.sourceforge.net/html/sarDo-CommandLine__adb.htm#176_15

The interesting Part: You won't need any access any more. 

With Regards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://adacl.sourceforge.net




  parent reply	other threads:[~2003-12-08 18:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-07  0:47 please help - access and inheritence Ratson Janiv
2003-12-07  7:14 ` tmoran
2003-12-07 18:44 ` Jeffrey Carter
2003-12-08  4:46   ` Mr. J.
2003-12-08 18:07     ` Jeffrey Carter
2003-12-08 19:05       ` Martin Krischik
2003-12-08 19:17     ` Martin Krischik
2003-12-08 18:50 ` Martin Krischik [this message]
2003-12-09  5:58   ` Mr. J.
2003-12-09 16:55     ` Martin Krischik
replies disabled

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