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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,af92cb4b0cc736af X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-01 03:32:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!skynet.be!skynet.be!freenix!oleane.net!oleane!bnewspeer00.bru.ops.eu.uu.net!auucp0.ams.ops.eu.uu.net!bnewsifeed00.bru.ops.eu.uu.net!bnewspost00.bru.ops.eu.uu.net!emea.uu.net!read.news.de.uu.net!not-for-mail Date: Fri, 01 Nov 2002 12:32:04 +0100 From: Ulrich Eckhardt Organization: Private at home User-Agent: Mozilla/5.0 (X11; U; Linux i686; en; Stable) Gecko/20020603 Beonex/0.8-stable X-Accept-Language: de, de-DE, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: problem with abstract types References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 1Cust159.tnt6.fft4.deu.da.uu.net X-Trace: 1036150368 read.news.de.uu.net 189 149.225.94.159 X-Complaints-To: abuse@de.uu.net Xref: archiver1.google.com comp.lang.ada:30281 Date: 2002-11-01T12:32:04+01:00 List-Id: Dmitry A.Kazakov wrote: > you could use class-wide objects. Make your registry object a non-limited > type to have an ability to declare an abstract "constructor": > > package Registry is > type Registry_Object is abstract tagged private; > function Create (...) return Registry_Object is abstract; > function Get (...) return ... is abstract; > procedure Put (...) is abstract; > private [..] > Then you could well hide all nasty details: > > with Registry; use Registry; > with Registry.Factory; use Registry.Factory; > ... > My_Registry : Registry_Object'Class := Create (UNIX, ...); Hi, yes thanks, thats the solution. Also i will do some rewritings on my naming schemes. It wasn't a good idea to create a package named registry with a type named registry. Then i wondered why registry'Class creates error messages. Also thanks for all the other good tips and comments here. Uli -- Ulrich Eckhardt http://www.uli-eckhardt.de