From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: oo programing question
Date: Mon, 08 Dec 2003 20:04:05 +0100
Date: 2003-12-08T20:04:05+01:00 [thread overview]
Message-ID: <1717882.x5JnQBoSJY@linux1.krischik.com> (raw)
In-Reply-To: 4948f537.0312071314.191dcf6b@posting.google.com
shoko wrote:
> here is my generic package:
> generic
> type Element_Type is private;
>
> package queue is
> type Queue is abstract tagged private;
>
> type newqueue is new Queue ;<-- how to create new queue type?
type New_Queue is tagged new Queue with private ;
> procedure Init( Q: in out Queue) is abstract;
Just a thought:
function New_Queue return Queue;
> private
> type Queue is abstract tagged
> record
> value:Element_Type;
> end record;
>
> end queue;
>
> i need to create a new abstract type(newqueue) that will inherit from
> Queue.
>
>
> then need to put the new type(newqueue) in the same generic Queue package,
> and to add a new method to the new abstract type.
>
> the reason that the new abstract type(newqueue) should be in the same
> package is: i have a type that inherit from Queue
> and now i need a new type that inherit from the new abstract type
> (newqueue) and will be the same as the one that inherit from Queue.
This might still be possible with a child package.
With Regards
Martin
--
mailto://krischik@users.sourceforge.net
http://adacl.sourceforge.net
next prev parent reply other threads:[~2003-12-08 19:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-07 21:14 oo programing question shoko
2003-12-08 19:04 ` Martin Krischik [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-12-06 19:01 shoko
2003-12-06 20:18 ` Stephen Leake
2003-12-07 14:01 ` 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