aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-cfhama.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-cfhama.ads')
-rw-r--r--gcc/ada/a-cfhama.ads63
1 files changed, 6 insertions, 57 deletions
diff --git a/gcc/ada/a-cfhama.ads b/gcc/ada/a-cfhama.ads
index c076d40..fdbd7a0 100644
--- a/gcc/ada/a-cfhama.ads
+++ b/gcc/ada/a-cfhama.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2013, 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 --
@@ -52,7 +52,6 @@
-- See detailed specifications for these subprograms
private with Ada.Containers.Hash_Tables;
-private with Ada.Streams;
generic
type Key_Type is private;
@@ -87,14 +86,15 @@ package Ada.Containers.Formal_Hashed_Maps is
function Is_Empty (Container : Map) return Boolean;
- -- ??? what does clear do to active elements?
procedure Clear (Container : in out Map);
procedure Assign (Target : in out Map; Source : Map);
- -- ???
- -- capacity=0 means use container.length as cap of tgt
- -- modulos=0 means use default_modulous(container.length)
+ -- Copy returns a container stricty equal to Source
+ -- It must have the same cursors associated to each element
+ -- Therefore:
+ -- - capacity=0 means use container.capacity as cap of tgt
+ -- - the modulus cannot be changed.
function Copy
(Source : Map;
Capacity : Count_Type := 0) return Map;
@@ -108,18 +108,6 @@ package Ada.Containers.Formal_Hashed_Maps is
Position : Cursor;
New_Item : Element_Type);
- procedure Query_Element
- (Container : in out Map;
- Position : Cursor;
- Process : not null access
- procedure (Key : Key_Type; Element : Element_Type));
-
- procedure Update_Element
- (Container : in out Map;
- Position : Cursor;
- Process : not null access
- procedure (Key : Key_Type; Element : in out Element_Type));
-
procedure Move (Target : in out Map; Source : in out Map);
procedure Insert
@@ -132,12 +120,6 @@ package Ada.Containers.Formal_Hashed_Maps is
procedure Insert
(Container : in out Map;
Key : Key_Type;
- Position : out Cursor;
- Inserted : out Boolean);
-
- procedure Insert
- (Container : in out Map;
- Key : Key_Type;
New_Item : Element_Type);
procedure Include
@@ -186,11 +168,6 @@ package Ada.Containers.Formal_Hashed_Maps is
Right : Map;
CRight : Cursor) return Boolean;
- procedure Iterate
- (Container : Map;
- Process : not null access
- procedure (Container : Map; Position : Cursor));
-
function Default_Modulus (Capacity : Count_Type) return Hash_Type;
function Strict_Equal (Left, Right : Map) return Boolean;
@@ -237,39 +214,11 @@ private
new HT_Types.Hash_Table_Type (Capacity, Modulus) with null record;
use HT_Types;
- use Ada.Streams;
-
- procedure Write
- (Stream : not null access Root_Stream_Type'Class;
- Container : Map);
-
- for Map'Write use Write;
-
- procedure Read
- (Stream : not null access Root_Stream_Type'Class;
- Container : out Map);
-
- for Map'Read use Read;
-
- type Map_Access is access all Map;
- for Map_Access'Storage_Size use 0;
type Cursor is record
Node : Count_Type;
end record;
- procedure Read
- (Stream : not null access Root_Stream_Type'Class;
- Item : out Cursor);
-
- for Cursor'Read use Read;
-
- procedure Write
- (Stream : not null access Root_Stream_Type'Class;
- Item : Cursor);
-
- for Cursor'Write use Write;
-
Empty_Map : constant Map := (Capacity => 0, Modulus => 0, others => <>);
No_Element : constant Cursor := (Node => 0);