From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,933ebd8abdfd4df1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-08 11:40:12 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: oo programing question Date: Mon, 08 Dec 2003 20:04:05 +0100 Organization: AdaCL Message-ID: <1717882.x5JnQBoSJY@linux1.krischik.com> References: <4948f537.0312071314.191dcf6b@posting.google.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1070912241 03 9724 ge8sG2q69esxrkg 031208 19:37:21 X-Complaints-To: usenet-abuse@t-online.de X-ID: G5OC1-ZYge67azdMo1OpLZd0nAHCihDiaSo5+20ScKMV5vcc7qhBsE User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3234 Date: 2003-12-08T20:04:05+01:00 List-Id: 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