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-Thread: 103376,100eb0a59892e906 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!panix!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How to pass around access types to interfaces? Date: Sat, 25 Oct 2008 18:15:09 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1224972909 21309 192.74.137.71 (25 Oct 2008 22:15:09 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 25 Oct 2008 22:15:09 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:5Qb3VCzqa6FqL58SgKew4PxCMkQ= Xref: g2news1.google.com comp.lang.ada:2495 Date: 2008-10-25T18:15:09-04:00 List-Id: "Martin Krischik" writes: > Am 24.10.2008, 13:45 Uhr, schrieb Sven : > >> type My_Interface_Access is access all My_Interface'Class; > > Do you realy need an access type? Read: > > http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation#The_class-wide_type > > If so, does it need to be an access all? Read: In my experience, access-to-class-wide types almost always need to have "all", because you often want to convert from access-to-T2 up to access-to-T1'Class (where T2 is a descendant of T1). - Bob