a-coprnu.ads, a-cohata.ads, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads, a-cgarso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads, a-chtgke.ads, a-chtgke.ads, a-coprnu.ads, a-contai.ads, a-chtgke.ads, a-chtgke.adb, a-stwiha.ads, a-strhas.ads, a-lfztio.ads, a-liztio.ads, a-llfzti.ads, a-llizti.ads, a-sfztio.ads, a-siztio.ads, a-ssizti.ads, a-stzfix.ads, a-stzhas.ads, a-szuzha.ads, a-tiunio.ads, a-wwunio.ads, a-ztcoio.ads, a-ztinio.ads, a-zttest.ads, a-zzunio.ads, a-astaco.ads, a-charac.ads, a-chlat1.ads, ada.ads, a-dynpri.ads, a-flteio.ads, a-fwteio.ads, a-inteio.ads, a-intnam.ads, a-ioexce.ads, a-iwteio.ads, a-lfteio.ads, a-lfwtio.ads, a-liteio.ads, a-liwtio.ads, a-llftio.ads, a-llfwti.ads, a-llitio.ads, a-lliwti.ads, a-ncelfu.ads, a-ngcefu.ads, a-ngelfu.ads, a-nlcefu.ads, a-nlcoty.ads, a-nlelfu.ads, a-nllcef.ads, a-nllcty.ads, a-nllefu.ads, a-nscefu.ads, a-nscoty.ads, a-nselfu.ads, a-nucoty.ads, a-nuelfu.ads, a-numeri.ads, a-sfteio.ads, a-sfwtio.ads, a-siteio.ads, a-siwtio.ads, a-ssitio.ads, a-ssiwti.ads, a-storio.ads, a-strfix.ads, a-string.ads, a-stwifi.ads, a-titest.ads, a-unccon.ads, a-uncdea.ads, a-wtcoio.ads, a-wtinio.ads, a-wttest.ads, calendar.ads, directio.ads, i-c.ads, ioexcept.ads, machcode.ads, sequenio.ads, text_io.ads, unchconv.ads, unchdeal.ads, a-widcha.ads, a-zchara.ads, a-stboha.ads, a-stfiha.ads, a-coteio.ads, a-envvar.ads, a-lcteio.ads, a-llctio.ads, a-scteio.ads, a-swbwha.ads, a-swfwha.ads, a-szbzha.ads, a-szfzha.ads, a-tiboio.ads, a-wwboio.ads, a-zzboio.ads, a-dispat.ads, a-tgdico.ads, expander.adb, g-socket.ads, par-labl.adb, sinput-c.adb, s-tarest.ads, s-stchop.ads, g-expect-vms.adb, s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-traceb-hpux.adb, s-taprop-linux.adb, s-taprop-dummy.adb, s-osprim-unix.adb, s-osprim-solaris.adb, s-taprop-solaris.adb, s-taprop-vms.adb, s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb, s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads, a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb, a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads, g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads, s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb, s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads, s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb, s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads, s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb, s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb, a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads, a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads, a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-swuwha.ads, a-ciormu.ads, a-coormu.ads, a-rbtgso.ads, a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads, a-ztexio.adb, a-ztexio.ads...

2007-04-06  Javier Miranda  <miranda@adacore.com>
	    Matt Heaney  <heaney@adacore.com>
	    Robert Dewar  <dewar@adacore.com>

	a-coprnu.ads, a-cohata.ads, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
	a-cgarso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads, a-chtgke.ads,
	a-chtgke.ads, a-coprnu.ads, a-contai.ads, a-chtgke.ads, a-chtgke.adb,
	a-stwiha.ads, a-strhas.ads, a-lfztio.ads, a-liztio.ads, a-llfzti.ads,
	a-llizti.ads, a-sfztio.ads, a-siztio.ads, a-ssizti.ads, a-stzfix.ads,
	a-stzhas.ads, a-szuzha.ads, a-tiunio.ads, a-wwunio.ads, a-ztcoio.ads,
	a-ztinio.ads, a-zttest.ads, a-zzunio.ads, a-astaco.ads, a-charac.ads,
	a-chlat1.ads, ada.ads, a-dynpri.ads, a-flteio.ads, a-fwteio.ads,
	a-inteio.ads, a-intnam.ads, a-ioexce.ads, a-iwteio.ads, a-lfteio.ads,
	a-lfwtio.ads, a-liteio.ads, a-liwtio.ads, a-llftio.ads, a-llfwti.ads,
	a-llitio.ads, a-lliwti.ads, a-ncelfu.ads, a-ngcefu.ads, a-ngelfu.ads,
	a-nlcefu.ads, a-nlcoty.ads, a-nlelfu.ads, a-nllcef.ads, a-nllcty.ads,
	a-nllefu.ads, a-nscefu.ads, a-nscoty.ads, a-nselfu.ads, a-nucoty.ads,
	a-nuelfu.ads, a-numeri.ads, a-sfteio.ads, a-sfwtio.ads, a-siteio.ads,
	a-siwtio.ads, a-ssitio.ads, a-ssiwti.ads, a-storio.ads, a-strfix.ads,
	a-string.ads, a-stwifi.ads, a-titest.ads, a-unccon.ads, a-uncdea.ads,
	a-wtcoio.ads, a-wtinio.ads, a-wttest.ads, calendar.ads, directio.ads,
	i-c.ads, ioexcept.ads, machcode.ads, sequenio.ads, text_io.ads,
	unchconv.ads, unchdeal.ads, a-widcha.ads, a-zchara.ads, a-stboha.ads,
	a-stfiha.ads, a-coteio.ads, a-envvar.ads, a-lcteio.ads, a-llctio.ads,
	a-scteio.ads, a-swbwha.ads, a-swfwha.ads, a-szbzha.ads, a-szfzha.ads,
	a-tiboio.ads, a-wwboio.ads, a-zzboio.ads, a-dispat.ads, a-tgdico.ads,
	expander.adb, g-socket.ads, par-labl.adb, sinput-c.adb, s-tarest.ads,
	s-stchop.ads, g-expect-vms.adb, s-taprop-lynxos.adb,
	s-taprop-tru64.adb, s-taprop-irix.adb,
	s-taprop-hpux-dce.adb, s-traceb-hpux.adb,
	s-taprop-linux.adb, s-taprop-dummy.adb, s-osprim-unix.adb,
	s-osprim-solaris.adb, s-taprop-solaris.adb, s-taprop-vms.adb,
	s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb, 
	s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads, 
	a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb, 
	a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads, 
	g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads, 
	s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb, 
	s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads, 
	s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb, 
	s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads, 
	s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb, 
	s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb, 
	a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads, 
	a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads, 
	a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb, 
	a-cohase.ads, a-swuwha.ads, a-ciormu.ads, a-coormu.ads, a-rbtgso.ads,
	a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads, 
	a-ztexio.adb, a-ztexio.ads: Addition of null-exclusion to anonymous
	access types.
	Update documentation.
	Minor rewording.

From-SVN: r123538
This commit is contained in:
Javier Miranda 2007-04-06 11:13:42 +02:00 committed by Arnaud Charlet
parent 96a94ff460
commit d90e94c7f7
198 changed files with 1004 additions and 735 deletions

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -37,9 +37,9 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
--------------------------
procedure Delete_Key_Sans_Free
(HT : in out Hash_Table_Type;
Key : Key_Type;
X : out Node_Access)
(HT : in out Hash_Table_Type;
Key : Key_Type;
X : out Node_Access)
is
Indx : Hash_Type;
Prev : Node_Access;
@ -59,7 +59,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
if Equivalent_Keys (Key, X) then
if HT.Busy > 0 then
raise Program_Error;
raise Program_Error with
"attempt to tamper with elements (container is busy)";
end if;
HT.Buckets (Indx) := Next (X);
HT.Length := HT.Length - 1;
@ -76,7 +77,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
if Equivalent_Keys (Key, X) then
if HT.Busy > 0 then
raise Program_Error;
raise Program_Error with
"attempt to tamper with elements (container is busy)";
end if;
Set_Next (Node => Prev, Next => Next (X));
HT.Length := HT.Length - 1;
@ -130,7 +132,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
begin
if B = null then
if HT.Busy > 0 then
raise Program_Error;
raise Program_Error with
"attempt to tamper with elements (container is busy)";
end if;
if HT.Length = Count_Type'Last then
@ -159,7 +162,8 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
end loop;
if HT.Busy > 0 then
raise Program_Error;
raise Program_Error with
"attempt to tamper with elements (container is busy)";
end if;
if HT.Length = Count_Type'Last then
@ -184,20 +188,74 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
return Hash (Key) mod HT.Buckets'Length;
end Index;
---------------------
-- Replace_Element --
---------------------
-----------------------------
-- Generic_Replace_Element --
-----------------------------
procedure Generic_Replace_Element
(HT : in out Hash_Table_Type;
Node : Node_Access;
Key : Key_Type)
is
begin
pragma Assert (HT.Length > 0);
pragma Assert (Node /= null);
Old_Hash : constant Hash_Type := Hash (Node);
Old_Indx : constant Hash_Type := Old_Hash mod HT.Buckets'Length;
New_Hash : constant Hash_Type := Hash (Key);
New_Indx : constant Hash_Type := New_Hash mod HT.Buckets'Length;
New_Bucket : Node_Access renames HT.Buckets (New_Indx);
N, M : Node_Access;
begin
if Equivalent_Keys (Key, Node) then
pragma Assert (Hash (Key) = Hash (Node));
pragma Assert (New_Hash = Old_Hash);
if HT.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (container is locked)";
end if;
-- We can change a node's key to Key (that's what Assign is for), but
-- only if Key is not already in the hash table. (In a unique-key
-- hash table as this one a key is mapped to exactly one node only.)
-- The exception is when Key is mapped to Node, in which case the
-- change is allowed.
Assign (Node, Key);
pragma Assert (Hash (Node) = New_Hash);
pragma Assert (Equivalent_Keys (Key, Node));
return;
end if;
-- Key is not equivalent to Node, so we now have to determine if it's
-- equivalent to some other node in the hash table. This is the case
-- irrespective of whether Key is in the same or a different bucket from
-- Node.
N := New_Bucket;
while N /= null loop
if Equivalent_Keys (Key, N) then
pragma Assert (N /= Node);
raise Program_Error with
"attempt to replace existing element";
end if;
N := Next (N);
end loop;
-- We have determined that Key is not already in the hash table, so
-- the change is tenatively allowed. We now perform the standard
-- checks to determine whether the hash table is locked (because you
-- cannot change an element while it's in use by Query_Element or
-- Update_Element), or if the container is busy (because moving a
-- node to a different bucket would interfere with iteration).
if Old_Indx = New_Indx then
-- The node is already in the bucket implied by Key. In this case
-- we merely change its value without moving it.
if HT.Lock > 0 then
raise Program_Error with
@ -205,70 +263,54 @@ package body Ada.Containers.Hash_Tables.Generic_Keys is
end if;
Assign (Node, Key);
pragma Assert (Hash (Node) = New_Hash);
pragma Assert (Equivalent_Keys (Key, Node));
return;
end if;
declare
J : Hash_Type;
K : constant Hash_Type := Index (HT, Key);
B : Node_Access renames HT.Buckets (K);
N : Node_Access := B;
M : Node_Access;
-- The node is a bucket different from the bucket implied by Key.
begin
while N /= null loop
if Equivalent_Keys (Key, N) then
raise Program_Error with
"attempt to replace existing element";
if HT.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (container is busy)";
end if;
-- Do the assignment first, before moving the node, so that if Assign
-- propagates an exception, then the hash table will not have been
-- modified (except for any possible side-effect Assign had on Node).
Assign (Node, Key);
pragma Assert (Hash (Node) = New_Hash);
pragma Assert (Equivalent_Keys (Key, Node));
-- Now we can safely remove the node from its current bucket
N := HT.Buckets (Old_Indx);
pragma Assert (N /= null);
if N = Node then
HT.Buckets (Old_Indx) := Next (Node);
else
pragma Assert (HT.Length > 1);
loop
M := Next (N);
pragma Assert (M /= null);
if M = Node then
Set_Next (Node => N, Next => Next (Node));
exit;
end if;
N := Next (N);
N := M;
end loop;
end if;
J := Hash (Node);
-- Now we link the node into its new bucket (corresponding to Key)
if J = K then
if HT.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (container is locked)";
end if;
Assign (Node, Key);
return;
end if;
if HT.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (container is busy)";
end if;
Assign (Node, Key);
N := HT.Buckets (J);
pragma Assert (N /= null);
if N = Node then
HT.Buckets (J) := Next (Node);
else
pragma Assert (HT.Length > 1);
loop
M := Next (N);
pragma Assert (M /= null);
if M = Node then
Set_Next (Node => N, Next => Next (Node));
exit;
end if;
N := M;
end loop;
end if;
Set_Next (Node => Node, Next => B);
B := Node;
end;
Set_Next (Node => Node, Next => New_Bucket);
New_Bucket := Node;
end Generic_Replace_Element;
end Ada.Containers.Hash_Tables.Generic_Keys;

View File

@ -9,10 +9,6 @@
-- --
-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
@ -34,6 +30,9 @@
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
-- Hash_Table_Type is used to implement hashed containers. This package
-- declares hash-table operations that depend on keys.
generic
with package HT_Types is
new Generic_Hash_Table_Types (<>);
@ -61,13 +60,18 @@ package Ada.Containers.Hash_Tables.Generic_Keys is
(HT : Hash_Table_Type;
Key : Key_Type) return Hash_Type;
pragma Inline (Index);
-- Returns the bucket number (array index value) for the given key
procedure Delete_Key_Sans_Free
(HT : in out Hash_Table_Type;
Key : Key_Type;
X : out Node_Access);
(HT : in out Hash_Table_Type;
Key : Key_Type;
X : out Node_Access);
-- Removes the node (if any) with the given key from the hash table,
-- without deallocating it. Program_Error is raised if the hash
-- table is busy.
function Find (HT : Hash_Table_Type; Key : Key_Type) return Node_Access;
-- Returns the node (if any) corresponding to the given key
generic
with function New_Node (Next : Node_Access) return Node_Access;
@ -76,6 +80,11 @@ package Ada.Containers.Hash_Tables.Generic_Keys is
Key : Key_Type;
Node : out Node_Access;
Inserted : out Boolean);
-- Attempts to insert a new node with the given key into the hash table.
-- If a node with that key already exists in the table, then that node
-- is returned and Inserted returns False. Otherwise New_Node is called
-- to allocate a new node, and Inserted returns True. Program_Error is
-- raised if the hash table is busy.
generic
with function Hash (Node : Node_Access) return Hash_Type;
@ -84,5 +93,15 @@ package Ada.Containers.Hash_Tables.Generic_Keys is
(HT : in out Hash_Table_Type;
Node : Node_Access;
Key : Key_Type);
-- Assigns Key to Node, possibly changing its equivalence class. If Node
-- is in the same equivalence class as Key (that is, it's already in the
-- bucket implied by Key), then if the hash table is locked then
-- Program_Error is raised; otherwise Assign is called to assign Key to
-- Node. If Node is in a different bucket from Key, then Program_Error is
-- raised if the hash table is busy. Otherwise it Assigns Key to Node and
-- moves the Node from its current bucket to the bucket implied by Key.
-- Note that it is never proper to assign to Node a key value already
-- in the map, and so if Key is equivalent to some other node then
-- Program_Error is raised.
end Ada.Containers.Hash_Tables.Generic_Keys;

View File

@ -7,13 +7,32 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
-- Hash_Table_Type is used to implement hashed containers. This package
-- declares hash-table operations that do not depend on keys.
with Ada.Streams;
generic
@ -39,20 +58,31 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
pragma Preelaborate;
procedure Free_Hash_Table (Buckets : in out Buckets_Access);
-- First frees the nodes in all non-null buckets of Buckets, and then frees
-- the Buckets array itself.
function Index
(Buckets : Buckets_Type;
Node : Node_Access) return Hash_Type;
pragma Inline (Index);
-- Uses the hash value of Node to compute its Buckets array index
function Index
(Hash_Table : Hash_Table_Type;
Node : Node_Access) return Hash_Type;
pragma Inline (Index);
-- Uses the hash value of Node to compute its Hash_Table buckets array
-- index.
procedure Adjust (HT : in out Hash_Table_Type);
-- Used to implement controlled Adjust. It is assumed that HT has the value
-- of the bit-wise copy that immediately follows controlled Finalize.
-- Adjust first allocates a new buckets array for HT (having the same
-- length as the source), and then allocates a copy of each node of source.
procedure Finalize (HT : in out Hash_Table_Type);
-- Used to implement controlled Finalize. It first calls Clear to
-- deallocate any remaining nodes, and then deallocates the buckets array.
generic
with function Find
@ -60,46 +90,77 @@ package Ada.Containers.Hash_Tables.Generic_Operations is
Key : Node_Access) return Boolean;
function Generic_Equal
(L, R : Hash_Table_Type) return Boolean;
-- Used to implement hashed container equality. For each node in hash table
-- L, it calls Find to search for an equivalent item in hash table R. If
-- Find returns False for any node then Generic_Equal terminates
-- immediately and returns False. Otherwise if Find returns True for every
-- node then Generic_Equal returns True.
procedure Clear (HT : in out Hash_Table_Type);
-- Deallocates each node in hash table HT. (Note that it only deallocates
-- the nodes, not the buckets array.) Program_Error is raised if the hash
-- table is busy.
procedure Move (Target, Source : in out Hash_Table_Type);
-- Moves (not copies) the buckets array and nodes from Source to
-- Target. Program_Error is raised if Source is busy. The Target is first
-- cleared to deallocate its nodes (implying that Program_Error is also
-- raised if Target is busy). Source is empty following the move.
function Capacity (HT : Hash_Table_Type) return Count_Type;
-- Returns the length of the buckets array
procedure Reserve_Capacity
(HT : in out Hash_Table_Type;
N : Count_Type);
-- If N is greater than the current capacity, then it expands the buckets
-- array to at least the value N. If N is less than the current capacity,
-- then it contracts the buckets array. In either case existing nodes are
-- rehashed onto the new buckets array, and the old buckets array is
-- deallocated. Program_Error is raised if the hash table is busy.
procedure Delete_Node_Sans_Free
(HT : in out Hash_Table_Type;
X : Node_Access);
-- Removes node X from the hash table without deallocating the node
function First (HT : Hash_Table_Type) return Node_Access;
-- Returns the head of the list in the first (lowest-index) non-empty
-- bucket.
function Next
(HT : Hash_Table_Type;
Node : Node_Access) return Node_Access;
-- Returns the node that immediately follows Node. This corresponds to
-- either the next node in the same bucket, or (if Node is the last node in
-- its bucket) the head of the list in the first non-empty bucket that
-- follows.
generic
with procedure Process (Node : Node_Access);
procedure Generic_Iteration (HT : Hash_Table_Type);
-- Calls Process for each node in hash table HT
generic
use Ada.Streams;
with procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
procedure Generic_Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
HT : Hash_Table_Type);
-- Used to implement the streaming attribute for hashed containers. It
-- calls Write for each node to write its value into Stream.
generic
use Ada.Streams;
with function New_Node (Stream : access Root_Stream_Type'Class)
with function New_Node (Stream : not null access Root_Stream_Type'Class)
return Node_Access;
procedure Generic_Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
HT : out Hash_Table_Type);
-- Used to implement the streaming attribute for hashed containers. It
-- first clears hash table HT, then populates the hash table by calling
-- New_Node for each item in Stream.
end Ada.Containers.Hash_Tables.Generic_Operations;

View File

@ -72,7 +72,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
pragma Inline (Next);
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
procedure Set_Next (Node : Node_Access; Next : Node_Access);
pragma Inline (Set_Next);
@ -80,7 +80,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
function Vet (Position : Cursor) return Boolean;
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
--------------------------
@ -772,7 +772,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
procedure Read_Nodes is new HT_Ops.Generic_Read (Read_Node);
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Map)
is
begin
@ -780,7 +780,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -792,7 +792,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
@ -1050,7 +1050,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
procedure Write_Nodes is new HT_Ops.Generic_Write (Write_Node);
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Map)
is
begin
@ -1058,7 +1058,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin
@ -1070,7 +1070,7 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin

View File

@ -198,13 +198,13 @@ private
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
@ -214,13 +214,13 @@ private
Node => null);
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Map);
for Map'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Map);
for Map'Read use Read;

View File

@ -84,7 +84,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
function Next (Node : Node_Access) return Node_Access;
pragma Inline (Next);
function Read_Node (Stream : access Root_Stream_Type'Class)
function Read_Node (Stream : not null access Root_Stream_Type'Class)
return Node_Access;
pragma Inline (Read_Node);
@ -94,7 +94,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
function Vet (Position : Cursor) return Boolean;
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1094,7 +1094,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
begin
@ -1102,7 +1102,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -1114,7 +1114,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
X : Element_Access := new Element_Type'(Element_Type'Input (Stream));
@ -1730,7 +1730,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
begin
@ -1738,7 +1738,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin
@ -1750,7 +1750,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin

View File

@ -241,13 +241,13 @@ private
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
@ -257,13 +257,13 @@ private
Node => null);
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set);
for Set'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set);
for Set'Read use Read;

View File

@ -1048,7 +1048,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
Container : out Map)
is
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
@ -1059,7 +1059,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
begin
@ -1326,7 +1326,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
Container : Map)
is
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1338,7 +1338,7 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin

View File

@ -1508,11 +1508,11 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
@ -1523,7 +1523,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
begin
@ -1542,7 +1542,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -1823,11 +1823,11 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1839,7 +1839,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin
@ -1853,7 +1853,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin

View File

@ -277,25 +277,27 @@ private
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
No_Element : constant Cursor := Cursor'(null, null);
procedure Write (Stream : access Root_Stream_Type'Class; Container : Set);
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Set);
for Set'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set);
for Set'Read use Read;

View File

@ -1382,11 +1382,11 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
@ -1397,7 +1397,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
@ -1418,7 +1418,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -1717,11 +1717,11 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1733,7 +1733,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin
@ -1747,7 +1747,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin

View File

@ -281,13 +281,13 @@ private
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
@ -295,13 +295,13 @@ private
No_Element : constant Cursor := Cursor'(null, null);
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set);
for Set'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set);
for Set'Read use Read;

View File

@ -65,7 +65,7 @@ package body Ada.Containers.Hashed_Maps is
pragma Inline (Next);
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Set_Next (Node : Node_Access; Next : Node_Access);
@ -74,7 +74,7 @@ package body Ada.Containers.Hashed_Maps is
function Vet (Position : Cursor) return Boolean;
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -703,7 +703,7 @@ package body Ada.Containers.Hashed_Maps is
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Map)
is
begin
@ -711,7 +711,7 @@ package body Ada.Containers.Hashed_Maps is
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -723,7 +723,7 @@ package body Ada.Containers.Hashed_Maps is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
@ -924,7 +924,7 @@ package body Ada.Containers.Hashed_Maps is
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Map)
is
begin
@ -932,7 +932,7 @@ package body Ada.Containers.Hashed_Maps is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin
@ -944,7 +944,7 @@ package body Ada.Containers.Hashed_Maps is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin

View File

@ -192,13 +192,13 @@ private
use Ada.Streams;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Map);
for Map'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Map);
for Map'Read use Read;
@ -215,13 +215,13 @@ private
end record;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;

View File

@ -85,7 +85,7 @@ package body Ada.Containers.Hashed_Sets is
function Next (Node : Node_Access) return Node_Access;
pragma Inline (Next);
function Read_Node (Stream : access Root_Stream_Type'Class)
function Read_Node (Stream : not null access Root_Stream_Type'Class)
return Node_Access;
pragma Inline (Read_Node);
@ -95,7 +95,7 @@ package body Ada.Containers.Hashed_Sets is
function Vet (Position : Cursor) return Boolean;
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1009,15 +1009,15 @@ package body Ada.Containers.Hashed_Sets is
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
Container : out Set)
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
begin
Read_Nodes (Stream, Container.HT);
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -1028,7 +1028,7 @@ package body Ada.Containers.Hashed_Sets is
-- Read_Node --
---------------
function Read_Node (Stream : access Root_Stream_Type'Class)
function Read_Node (Stream : not null access Root_Stream_Type'Class)
return Node_Access
is
Node : Node_Access := new Node_Type;
@ -1561,7 +1561,7 @@ package body Ada.Containers.Hashed_Sets is
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
begin
@ -1569,7 +1569,7 @@ package body Ada.Containers.Hashed_Sets is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin
@ -1581,7 +1581,7 @@ package body Ada.Containers.Hashed_Sets is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin

View File

@ -238,13 +238,13 @@ private
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
@ -252,13 +252,13 @@ private
No_Element : constant Cursor := (Container => null, Node => null);
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set);
for Set'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set);
for Set'Read use Read;

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -962,7 +962,7 @@ package body Ada.Containers.Ordered_Maps is
Container : out Map)
is
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
@ -973,7 +973,7 @@ package body Ada.Containers.Ordered_Maps is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
begin
@ -1206,7 +1206,7 @@ package body Ada.Containers.Ordered_Maps is
Container : Map)
is
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1218,7 +1218,7 @@ package body Ada.Containers.Ordered_Maps is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin

View File

@ -1425,11 +1425,11 @@ package body Ada.Containers.Ordered_Multisets is
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
@ -1440,7 +1440,7 @@ package body Ada.Containers.Ordered_Multisets is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
begin
@ -1459,7 +1459,7 @@ package body Ada.Containers.Ordered_Multisets is
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -1729,11 +1729,11 @@ package body Ada.Containers.Ordered_Multisets is
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1745,7 +1745,7 @@ package body Ada.Containers.Ordered_Multisets is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin
@ -1759,7 +1759,7 @@ package body Ada.Containers.Ordered_Multisets is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin

View File

@ -282,13 +282,13 @@ private
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
@ -296,13 +296,13 @@ private
No_Element : constant Cursor := Cursor'(null, null);
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set);
for Set'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set);
for Set'Read use Read;

View File

@ -1297,11 +1297,11 @@ package body Ada.Containers.Ordered_Sets is
----------
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
pragma Inline (Read_Node);
procedure Read is
@ -1312,7 +1312,7 @@ package body Ada.Containers.Ordered_Sets is
---------------
function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access
(Stream : not null access Root_Stream_Type'Class) return Node_Access
is
Node : Node_Access := new Node_Type;
@ -1333,7 +1333,7 @@ package body Ada.Containers.Ordered_Sets is
end Read;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
@ -1618,11 +1618,11 @@ package body Ada.Containers.Ordered_Sets is
-----------
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
pragma Inline (Write_Node);
@ -1634,7 +1634,7 @@ package body Ada.Containers.Ordered_Sets is
----------------
procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access)
is
begin
@ -1648,7 +1648,7 @@ package body Ada.Containers.Ordered_Sets is
end Write;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin

View File

@ -270,13 +270,13 @@ private
end record;
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
@ -284,13 +284,13 @@ private
No_Element : constant Cursor := Cursor'(null, null);
procedure Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : Set);
for Set'Write use Write;
procedure Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Container : out Set);
for Set'Read use Read;

View File

@ -6,13 +6,34 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- Copyright (C) 2004-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
-- This package declares the prime numbers array used to implement hashed
-- containers. Bucket arrays are always allocated with a prime-number
-- length (computed using To_Prime below), as this produces better scatter
-- when hash values are folded.
package Ada.Containers.Prime_Numbers is
pragma Pure;
@ -27,5 +48,6 @@ package Ada.Containers.Prime_Numbers is
1610612741, 3221225473, 4294967291);
function To_Prime (Length : Count_Type) return Hash_Type;
-- Returns the smallest value in Primes not less than Length
end Ada.Containers.Prime_Numbers;

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -698,7 +698,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Operations is
------------------
procedure Generic_Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Tree : in out Tree_Type)
is
N : Count_Type'Base;
@ -776,7 +776,7 @@ package body Ada.Containers.Red_Black_Trees.Generic_Operations is
-------------------
procedure Generic_Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Tree : Tree_Type)
is
procedure Process (Node : Node_Access);

View File

@ -137,10 +137,10 @@ package Ada.Containers.Red_Black_Trees.Generic_Operations is
generic
with procedure Write_Node
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Access);
procedure Generic_Write
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Tree : Tree_Type);
-- Used to implement stream attribute T'Write. Generic_Write
-- first writes the number of nodes into Stream, then calls
@ -149,9 +149,9 @@ package Ada.Containers.Red_Black_Trees.Generic_Operations is
generic
with procedure Clear (Tree : in out Tree_Type);
with function Read_Node
(Stream : access Root_Stream_Type'Class) return Node_Access;
(Stream : not null access Root_Stream_Type'Class) return Node_Access;
procedure Generic_Read
(Stream : access Root_Stream_Type'Class;
(Stream : not null access Root_Stream_Type'Class;
Tree : in out Tree_Type);
-- Used to implement stream attribute T'Read. Generic_Read
-- first clears Tree. It then reads the number of nodes out of

View File

@ -6,9 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2006, Free Software Foundation, Inc. --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,13 +6,11 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2005-2006, Free Software Foundation, Inc. --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
--- --
-- --
------------------------------------------------------------------------------
package Ada.Environment_Variables is

View File

@ -179,7 +179,7 @@ package body Exception_Propagation is
(UW_Version : Integer;
UW_Phases : Unwind_Action;
UW_Eclass : Exception_Class;
UW_Exception : access GNAT_GCC_Exception;
UW_Exception : not null access GNAT_GCC_Exception;
UW_Context : System.Address;
UW_Argument : System.Address) return Unwind_Reason_Code;
-- Hook called at each step of the forced unwinding we perform to
@ -191,11 +191,11 @@ package body Exception_Propagation is
-- __gnat stubs for these.
procedure Unwind_RaiseException
(UW_Exception : access GNAT_GCC_Exception);
(UW_Exception : not null access GNAT_GCC_Exception);
pragma Import (C, Unwind_RaiseException, "__gnat_Unwind_RaiseException");
procedure Unwind_ForcedUnwind
(UW_Exception : access GNAT_GCC_Exception;
(UW_Exception : not null access GNAT_GCC_Exception;
UW_Handler : System.Address;
UW_Argument : System.Address);
pragma Import (C, Unwind_ForcedUnwind, "__gnat_Unwind_ForcedUnwind");
@ -353,7 +353,7 @@ package body Exception_Propagation is
(UW_Version : Integer;
UW_Phases : Unwind_Action;
UW_Eclass : Exception_Class;
UW_Exception : access GNAT_GCC_Exception;
UW_Exception : not null access GNAT_GCC_Exception;
UW_Context : System.Address;
UW_Argument : System.Address) return Unwind_Reason_Code
is

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -59,25 +59,51 @@ package Ada.Containers.Red_Black_Trees.Generic_Set_Operations is
pragma Pure;
procedure Union (Target : in out Tree_Type; Source : Tree_Type);
-- Attempts to insert each element of Source in Target. If Target is
-- busy then Program_Error is raised. We say "attempts" here because
-- if these are unique-element sets, then the insertion should fail
-- (not insert a new item) when the insertion item from Source is
-- equivalent to an item already in Target. If these are multisets
-- then of course the attempt should always succeed.
function Union (Left, Right : Tree_Type) return Tree_Type;
-- Makes a copy of Left, and attempts to insert each element of
-- Right into the copy, then returns the copy.
procedure Intersection (Target : in out Tree_Type; Source : Tree_Type);
-- Removes elements from Target that are not equivalent to items in
-- Source. If Target is busy then Program_Error is raised.
function Intersection (Left, Right : Tree_Type) return Tree_Type;
-- Returns a set comprising all the items in Left equivalent to items in
-- Right.
procedure Difference (Target : in out Tree_Type; Source : Tree_Type);
-- Removes elements from Target that are equivalent to items in Source. If
-- Target is busy then Program_Error is raised.
function Difference (Left, Right : Tree_Type) return Tree_Type;
-- Returns a set comprising all the items in Left not equivalent to items
-- in Right.
procedure Symmetric_Difference
(Target : in out Tree_Type;
Source : Tree_Type);
-- Removes from Target elements that are equivalent to items in Source, and
-- inserts into Target items from Source not equivalent elements in
-- Target. If Target is busy then Program_Error is raised.
function Symmetric_Difference (Left, Right : Tree_Type) return Tree_Type;
-- Returns a set comprising the union of the elements in Left not
-- equivalent to items in Right, and the elements in Right not equivalent
-- to items in Left.
function Is_Subset (Subset : Tree_Type; Of_Set : Tree_Type) return Boolean;
-- Returns False if Subset contains at least one element not equivalent to
-- any item in Of_Set; returns True otherwise.
function Overlap (Left, Right : Tree_Type) return Boolean;
-- Returns True if at least one element of Left is equivalent to an item in
-- Right; returns False otherwise.
end Ada.Containers.Red_Black_Trees.Generic_Set_Operations;

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -76,7 +76,7 @@ package body Ada.Streams.Stream_IO is
-- No special processing required for closing Stream_IO file
procedure AFCB_Close (File : access Stream_AFCB) is
procedure AFCB_Close (File : not null access Stream_AFCB) is
pragma Warnings (Off, File);
begin
null;
@ -86,7 +86,7 @@ package body Ada.Streams.Stream_IO is
-- AFCB_Free --
---------------
procedure AFCB_Free (File : access Stream_AFCB) is
procedure AFCB_Free (File : not null access Stream_AFCB) is
type FCB_Ptr is access all Stream_AFCB;
FT : FCB_Ptr := FCB_Ptr (File);

View File

@ -176,8 +176,8 @@ private
function AFCB_Allocate (Control_Block : Stream_AFCB) return FCB.AFCB_Ptr;
procedure AFCB_Close (File : access Stream_AFCB);
procedure AFCB_Free (File : access Stream_AFCB);
procedure AFCB_Close (File : not null access Stream_AFCB);
procedure AFCB_Free (File : not null access Stream_AFCB);
procedure Read
(File : in out Stream_AFCB;

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

View File

@ -7,7 +7,7 @@
-- --
-- S p e c --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --

Some files were not shown because too many files have changed in this diff Show More