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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc3e3a6e4f85e03f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-11 13:10:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!news.iucc.ac.il!not-for-mail From: "Ehud Lamm" Newsgroups: comp.lang.ada Subject: Re: class wide object in generic package Date: Tue, 11 Jun 2002 22:57:11 +0200 Organization: Ehud Lamm Message-ID: References: <3D045767.8020102@rcs.ei.tum.de> NNTP-Posting-Host: di3-79.dialin.huji.ac.il X-Trace: news.iucc.ac.il 1023825693 3329 132.64.13.79 (11 Jun 2002 20:01:33 GMT) X-Complaints-To: abuse@news.iucc.ac.il NNTP-Posting-Date: Tue, 11 Jun 2002 20:01:33 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Xref: archiver1.google.com comp.lang.ada:25759 Date: 2002-06-11T22:57:11+02:00 List-Id: "Stephen Leake" wrote in message news:wkelffffuy.fsf@acm.org... > Thomas Maier-Komor writes: > > > If you want dispatching, you'll have to use a generic formal package > parameter: > > generic > package Object_Package is new Generic_Obj_Package (...); > package generic_pac ... > It seems to me you want as a generic paramter any type that has the Eval operation. So you can define a parent type having this operation (say an abstract type called Evalable). Now you can define the generic with Evalable_Pak; generic type My_Evalable is new Evalable_Pak.Evalable with private; .... My_Evalable will have a primitive Eval operation. (Hope I am not making a fool of myself here. I confess not compiling a real example.) Ehud Lamm (Stay tuned to the results of the Ada-Europe'2002 Workshop on a Standard Container Library for Ada!)