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,e8fd9bf92374a60a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!postnews.google.com!e39g2000hsf.googlegroups.com!not-for-mail From: Matthew Heaney Newsgroups: comp.lang.ada Subject: Re: Declaration of private type Containers Date: Fri, 30 May 2008 13:27:49 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <6d6feee1-fe69-4d19-9745-4748d341a56e@r66g2000hsg.googlegroups.com> NNTP-Posting-Host: 66.162.65.129 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1212179270 20353 127.0.0.1 (30 May 2008 20:27:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 30 May 2008 20:27:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e39g2000hsf.googlegroups.com; posting-host=66.162.65.129; posting-account=umyUbgkAAADe5rQC4VzV-ffCoH4N30u3 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:491 Date: 2008-05-30T13:27:49-07:00 List-Id: On May 30, 7:49=A0am, alexander.kle...@web.de wrote: > The only thing I want to do is to =A0declare a list package, whose > Element_Type is of a private record type: > > package A is > > type My_Type is private > > package My_Type_Lists is new Ada.Containers.Doubly_Linked_List > =A0 =A0 =A0(Element_Type =A0 =A0 =A0=3D> My_Type); > > private > > type My_Type is > record > ... > end record; > > end A; It's unlikely you need all of the features supported by the standard linked list container. If so, one alternative for you would be to create a more high level container: package A is type T is private; type Container is tagged limited private; procedure Insert (C : in out Container; Obj : T); procedure Remove (C : in out Container; Obj : T); procedure Iterate (C : Container; P : not null access procedure (Obj : T)); private type T is ...; package T_Lists is new Ada.C.DLLists (T); type Container is tagged limited record L : T_Lists.List; end Container; end A;