1--  Copyright 1994 Grady Booch
2--  Copyright 2003-2014 Simon Wright <simon@pushface.org>
3--  Copyright 2005 Martin Krischik
4
5--  This package is free software; you can redistribute it and/or
6--  modify it under terms of the GNU General Public License as
7--  published by the Free Software Foundation; either version 2, or
8--  (at your option) any later version. This package is distributed in
9--  the hope that it will be useful, but WITHOUT ANY WARRANTY; without
10--  even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11--  PARTICULAR PURPOSE. See the GNU General Public License for more
12--  details. You should have received a copy of the GNU General Public
13--  License distributed with this package; see file COPYING.  If not,
14--  write to the Free Software Foundation, 59 Temple Place - Suite
15--  330, Boston, MA 02111-1307, USA.
16
17--  As a special exception, if other files instantiate generics from
18--  this unit, or you link this unit with other files to produce an
19--  executable, this unit does not by itself cause the resulting
20--  executable to be covered by the GNU General Public License.  This
21--  exception does not however invalidate any other reasons why the
22--  executable file might be covered by the GNU Public License.
23
24generic
25
26   with function "<" (L, R : Item) return Boolean is <>;
27   --  Must define a strict ordering; if A "<" B and B "<" C, A must
28   --  be "<" C. If A is not "<" B and B is not "<" A, A and B are
29   --  said to be equivalent (they need not be "=").
30
31package BC.Indefinite_Unmanaged_Containers.Queues.Ordered is
32
33   pragma Preelaborate;
34
35   type Queue is new Queues.Queue with private;
36   --  This Queue exhibits unlimited growth and collapsing, limited
37   --  only by available memory.
38
39   function Null_Container return Queue;
40
41   procedure Append (Q : in out Queue; Elem : Item);
42   --  Add the item to the queue at the appropriate position; if any
43   --  equivalent items are found, the new item is inserted after the
44   --  last equivalent item.
45
46   function New_Iterator (For_The_Queue : Queue) return Iterator'Class;
47   --  Return a reset Iterator bound to the specific Queue.
48
49private
50
51   type Queue is new Queues.Queue with null record;
52
53end BC.Indefinite_Unmanaged_Containers.Queues.Ordered;
54