comp.lang.ada
 help / color / mirror / Atom feed
From: Javi <fjvera@gmail.com>
Subject: declaration of an incomplete private type before the private part
Date: Fri, 1 Feb 2008 00:28:44 -0800 (PST)
Date: 2008-02-01T00:28:44-08:00	[thread overview]
Message-ID: <5e8bc9cb-a2c1-4c9c-8308-ca8b709801f5@e23g2000prf.googlegroups.com> (raw)

hi guys,

I'm very newbye to ADA, so my apologizes in advance.

My problem: I need to do a declaration such as:

-----------------------------------------
...
   type ListNode is private;
   type List is private;

   package IterList is new Iterators   (Creator => List,
                                        Item => ListNode,
                                        getFirst => Lists.getFirst,
                                        getNext => Lists.getNext,
                                        isLast => Lists.isLast);

   function makeIter (L : List) return IterList.Iterator;
...
   private:
      (complete declaration of ListNode and List)
-----------------------------------------


The problem is that I need to complete the type (ListNode and List)
before instancing the new package. But I do not know how to do that!
The only solution I have found is to declare the types non-private and
then give them the complete declaration. Obviously, this solution does
not satisfy me since I want to make the types private.

Can anyone help me, please?

Thanks in advance,
Javier



             reply	other threads:[~2008-02-01  8:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01  8:28 Javi [this message]
2008-02-01  8:49 ` declaration of an incomplete private type before the private part Niklas Holsti
2008-02-01  9:53   ` Javi
2008-02-01 14:00 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox