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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,18f6de557e6897b2 X-Google-Attributes: gid103376,public From: Stephen Schmid Subject: Re: circular unit dependency Date: 1997/06/06 Message-ID: #1/1 X-Deja-AN: 246683649 References: <3386d96f.171920@noticias.ibernet.es> <9A7E8196B8D7EE83.E6C868B798076E45.6F1AD9E8B3E01F66@library-proxy.airnews.net> <33932F31.4399@sprintmail.com> <3393D0E1.AC9@sprintmail.com> Organization: Interactive Development Environments Newsgroups: comp.lang.ada Date: 1997-06-06T00:00:00+00:00 List-Id: mheaney@ni.net (Matthew Heaney) writes: > The example is of a queue and its iterator. Obviously the iterator has to > know the representation of the queue, so it can iterate over it. But the > queue also keeps track of the iterators that have registered with it, so > that it can adjust the pointer if an element is removed from the queue. I haven't thought about how to implement it in Ada95, but the 'Iterator' pattern in the 'Design Patterns' book by the GOF shows how to construct collections and iterators that do not need access to the internal representations of each other. Steve Schmid