diff options
author | Matthew Heaney <heaney@adacore.com> | 2005-06-16 10:56:24 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-06-16 10:56:24 +0200 |
commit | 8704d4b30e3eace58fc9506cf3533b15835c784a (patch) | |
tree | 60bbc3a40631ce4a825ff74330cd04720cf0d624 /gcc/ada/a-cihama.ads | |
parent | dc8f57914cb54a209cf2d52bb04d21502990842b (diff) | |
download | gcc-8704d4b30e3eace58fc9506cf3533b15835c784a.tar.gz |
a-swunha.ads, [...]: Removed.
2005-06-14 Matthew Heaney <heaney@adacore.com>
* a-swunha.ads, a-swunha.adb: Removed. Replaced by a-swuwha.ad[sb]
* a-swuwha.ads, a-swuwha.adb: New files
* a-szunha.ads, a-szunha.adb: Removed, replaced by a-szuzha.ad[sb]
* a-szuzha.ads, a-szuzha.adb: New files.
* a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb, a-crbtgk.ads,
a-crbtgk.adb, a-crbltr.ads, a-coorse.ads, a-coorse.adb, a-convec.ads,
a-convec.adb, a-coinve.ads, a-coinve.adb, a-cohata.ads, a-cohama.ads,
a-cohama.adb, a-ciorse.ads, a-ciorse.adb, a-cihama.ads, a-cihama.adb,
a-cidlli.ads, a-cidlli.adb, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
a-cdlili.adb, a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb,
a-cohase.ads, a-ciorma.ads, a-coorma.ads, a-ciormu.ads, a-coormu.ads,
a-swunha.adb, a-stunha.adb, a-ciorma.adb, a-coorma.adb, a-shcain.ads,
a-shcain.adb, a-chtgke.ads, a-chtgke.adb, a-stwiha.ads, a-stwiha.adb,
a-strhas.adb, a-stzhas.adb: synchronized to the latest version of the
Ada 2005 RM.
From-SVN: r101069
Diffstat (limited to 'gcc/ada/a-cihama.ads')
-rw-r--r-- | gcc/ada/a-cihama.ads | 69 |
1 files changed, 47 insertions, 22 deletions
diff --git a/gcc/ada/a-cihama.ads b/gcc/ada/a-cihama.ads index 7769cbb1a83..1f15c585db6 100644 --- a/gcc/ada/a-cihama.ads +++ b/gcc/ada/a-cihama.ads @@ -2,11 +2,12 @@ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- --- ADA.CONTAINERS.INDEFINITE_HASHED_MAPS -- +-- A D A . C O N T A I N E R S . -- +-- I N D E F I N I T E _ H A S H E D _ M A P S -- -- -- -- S p e c -- -- -- --- Copyright (C) 2004 Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2005 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 -- @@ -35,6 +36,7 @@ with Ada.Containers.Hash_Tables; with Ada.Streams; +with Ada.Finalization; generic type Key_Type (<>) is private; @@ -61,6 +63,8 @@ package Ada.Containers.Indefinite_Hashed_Maps is procedure Clear (Container : in out Map); + function Key (Position : Cursor) return Key_Type; + function Element (Position : Cursor) return Element_Type; procedure Query_Element @@ -105,14 +109,14 @@ package Ada.Containers.Indefinite_Hashed_Maps is (Container : in out Map; Key : Key_Type); - procedure Exclude - (Container : in out Map; - Key : Key_Type); - procedure Delete (Container : in out Map; Position : in out Cursor); + procedure Exclude + (Container : in out Map; + Key : Key_Type); + function Contains (Container : Map; Key : Key_Type) return Boolean; @@ -125,12 +129,6 @@ package Ada.Containers.Indefinite_Hashed_Maps is (Container : Map; Key : Key_Type) return Element_Type; - function Capacity (Container : Map) return Count_Type; - - procedure Reserve_Capacity - (Container : in out Map; - Capacity : Count_Type); - function First (Container : Map) return Cursor; function Next (Position : Cursor) return Cursor; @@ -139,8 +137,6 @@ package Ada.Containers.Indefinite_Hashed_Maps is function Has_Element (Position : Cursor) return Boolean; - function Key (Position : Cursor) return Key_Type; - function Equivalent_Keys (Left, Right : Cursor) return Boolean; @@ -156,16 +152,48 @@ package Ada.Containers.Indefinite_Hashed_Maps is (Container : Map; Process : not null access procedure (Position : Cursor)); + function Capacity (Container : Map) return Count_Type; + + procedure Reserve_Capacity + (Container : in out Map; + Capacity : Count_Type); + private + pragma Inline ("="); + pragma Inline (Length); + pragma Inline (Is_Empty); + pragma Inline (Clear); + pragma Inline (Key); + pragma Inline (Element); + pragma Inline (Move); + pragma Inline (Contains); + pragma Inline (Capacity); + pragma Inline (Reserve_Capacity); + pragma Inline (Has_Element); + pragma Inline (Equivalent_Keys); + type Node_Type; type Node_Access is access Node_Type; - package HT_Types is - new Hash_Tables.Generic_Hash_Table_Types (Node_Access); + type Key_Access is access Key_Type; + type Element_Access is access Element_Type; - use HT_Types; + type Node_Type is limited record + Key : Key_Access; + Element : Element_Access; + Next : Node_Access; + end record; + + package HT_Types is new Hash_Tables.Generic_Hash_Table_Types + (Node_Type, + Node_Access); + + type Map is new Ada.Finalization.Controlled with record + HT : HT_Types.Hash_Table_Type; + end record; - type Map is new Hash_Table_Type with null record; + use HT_Types; + use Ada.Finalization; procedure Adjust (Container : in out Map); @@ -198,9 +226,6 @@ private for Map'Read use Read; - Empty_Map : constant Map := (Hash_Table_Type with null record); + Empty_Map : constant Map := (Controlled with HT => (null, 0, 0, 0)); end Ada.Containers.Indefinite_Hashed_Maps; - - - |