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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f788831da4de764,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-11 08:03:14 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Abstract Functions Date: Wed, 11 Jul 2001 10:24:09 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9ihnia$i8h$1@nh.pace.co.uk> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 994861450 18705 136.170.200.133 (11 Jul 2001 14:24:10 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 11 Jul 2001 14:24:10 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:9793 Date: 2001-07-11T14:24:10+00:00 List-Id: Suppose you have a tagged type that is not abstract, but you want to provide functions as a "template" that some inheritor is supposed to override. You can't make the functions abstract without the tagged type also being abstract. You might not want that because you might want data and operations in the parent class that actually work. Is there a way to say "Here's almost everything you need, but you have to override this function with one of your own design..." and not have the parent be abstract? I need some way of forcing the inheritor to provide the function and I'd prefer not to go generic. So far, my current answer is to provide the functions I expect to be overriden and have them raise an exception. This keeps the inheritor from actually using the functions, but it would be nice to have a compile-time check that insures the inheritor has to provide the desired functions. Any ideas? MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/