OSDN Git Service

2005-06-15 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / ada / a-crbtgk.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT LIBRARY COMPONENTS                          --
4 --                                                                          --
5 --               ADA.CONTAINERS.RED_BLACK_TREES.GENERIC_KEYS                --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 -- This specification is adapted from the Ada Reference Manual for use with --
10 -- GNAT.  In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification,  provided that if you redistribute a --
12 -- modified version,  any changes that you have made are clearly indicated. --
13 --                                                                          --
14 ------------------------------------------------------------------------------
15
16 with Ada.Containers.Red_Black_Trees.Generic_Operations;
17
18 generic
19    with package Tree_Operations is new Generic_Operations (<>);
20
21    use Tree_Operations.Tree_Types;
22
23    type Key_Type (<>) is limited private;
24
25    with function Is_Less_Key_Node
26      (L : Key_Type;
27       R : Node_Access) return Boolean;
28
29    with function Is_Greater_Key_Node
30      (L : Key_Type;
31       R : Node_Access) return Boolean;
32
33 package Ada.Containers.Red_Black_Trees.Generic_Keys is
34 pragma Pure (Generic_Keys);
35
36    generic
37       with function New_Node return Node_Access;
38    procedure Generic_Insert_Post
39      (Tree : in out Tree_Type;
40       X, Y : Node_Access;
41       Key  : Key_Type;
42       Z    : out Node_Access);
43
44    generic
45       with procedure Insert_Post
46         (Tree : in out Tree_Type;
47          X, Y : Node_Access;
48          Key  : Key_Type;
49          Z    : out Node_Access);
50
51    procedure Generic_Conditional_Insert
52      (Tree    : in out Tree_Type;
53       Key     : Key_Type;
54       Node    : out Node_Access;
55       Success : out Boolean);
56
57    generic
58       with procedure Insert_Post
59         (Tree : in out Tree_Type;
60          X, Y : Node_Access;
61          Key  : Key_Type;
62          Z    : out Node_Access);
63
64    procedure Generic_Unconditional_Insert
65      (Tree : in out Tree_Type;
66       Key  : Key_Type;
67       Node : out Node_Access);
68
69    generic
70       with procedure Insert_Post
71         (Tree : in out Tree_Type;
72          X, Y : Node_Access;
73          Key  : Key_Type;
74          Z    : out Node_Access);
75
76       with procedure Unconditional_Insert_Sans_Hint
77         (Tree    : in out Tree_Type;
78          Key     : Key_Type;
79          Node    : out Node_Access);
80
81    procedure Generic_Unconditional_Insert_With_Hint
82      (Tree : in out Tree_Type;
83       Hint : Node_Access;
84       Key  : Key_Type;
85       Node : out Node_Access);
86
87    generic
88       with procedure Insert_Post
89         (Tree : in out Tree_Type;
90          X, Y : Node_Access;
91          Key  : Key_Type;
92          Z    : out Node_Access);
93
94       with procedure Conditional_Insert_Sans_Hint
95         (Tree    : in out Tree_Type;
96          Key     : Key_Type;
97          Node    : out Node_Access;
98          Success : out Boolean);
99
100    procedure Generic_Conditional_Insert_With_Hint
101      (Tree     : in out Tree_Type;
102       Position : Node_Access;
103       Key      : Key_Type;
104       Node     : out Node_Access;
105       Success  : out Boolean);
106
107    function Find
108      (Tree : Tree_Type;
109       Key  : Key_Type) return Node_Access;
110
111    function Ceiling
112      (Tree : Tree_Type;
113       Key  : Key_Type) return Node_Access;
114
115    function Floor
116      (Tree : Tree_Type;
117       Key  : Key_Type) return Node_Access;
118
119    function Upper_Bound
120      (Tree : Tree_Type;
121       Key  : Key_Type) return Node_Access;
122
123    generic
124       with procedure Process (Node : Node_Access);
125    procedure Generic_Iteration
126      (Tree : Tree_Type;
127       Key  : Key_Type);
128
129    generic
130       with procedure Process (Node : Node_Access);
131    procedure Generic_Reverse_Iteration
132      (Tree : Tree_Type;
133       Key  : Key_Type);
134
135 end Ada.Containers.Red_Black_Trees.Generic_Keys;
136
137
138