diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-05 08:05:32 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-05 08:05:32 +0000 |
commit | a4f57dfb8913775e2031ff0a074ca54b188d2ec3 (patch) | |
tree | 7b4be4425a576dfefafcfd6533af08d710bea8f0 /gcc/ada/a-cihase.ads | |
parent | f394630b0d3000248678a2393066f06627336437 (diff) | |
download | gcc-a4f57dfb8913775e2031ff0a074ca54b188d2ec3.tar.gz |
2005-09-01 Matthew Heaney <heaney@adacore.com>
* a-cihase.adb, a-coorse.ads, a-coorse.adb, a-cohama.adb,
a-ciorse.ads, a-ciorse.adb, a-cihama.adb, a-cdlili.adb,
a-cidlli.adb, a-chtgop.adb, a-cihase.adb, a-cihase.ads,
a-cohase.adb, a-cohase.adb, a-cohase.ads: Synchronized with latest
draft (Draft 13, August 2005) of Ada Amendment 1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103892 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cihase.ads')
-rw-r--r-- | gcc/ada/a-cihase.ads | 102 |
1 files changed, 46 insertions, 56 deletions
diff --git a/gcc/ada/a-cihase.ads b/gcc/ada/a-cihase.ads index 6227710bc30..4ecca1ca0bf 100644 --- a/gcc/ada/a-cihase.ads +++ b/gcc/ada/a-cihase.ads @@ -49,8 +49,7 @@ generic with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Indefinite_Hashed_Sets is - - pragma Preelaborate (Indefinite_Hashed_Sets); + pragma Preelaborate; type Set is tagged private; @@ -64,6 +63,12 @@ package Ada.Containers.Indefinite_Hashed_Sets is function Equivalent_Sets (Left, Right : Set) return Boolean; + function Capacity (Container : Set) return Count_Type; + + procedure Reserve_Capacity + (Container : in out Set; + Capacity : Count_Type); + function Length (Container : Set) return Count_Type; function Is_Empty (Container : Set) return Boolean; @@ -72,15 +77,15 @@ package Ada.Containers.Indefinite_Hashed_Sets is function Element (Position : Cursor) return Element_Type; + procedure Replace_Element + (Container : in out Set; + Position : Cursor; + New_Item : Element_Type); + procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)); - procedure Replace_Element - (Container : Set; - Position : Cursor; - By : Element_Type); - procedure Move (Target : in out Set; Source : in out Set); @@ -97,37 +102,11 @@ package Ada.Containers.Indefinite_Hashed_Sets is procedure Replace (Container : in out Set; New_Item : Element_Type); - procedure Delete (Container : in out Set; Item : Element_Type); - - procedure Delete (Container : in out Set; Position : in out Cursor); - procedure Exclude (Container : in out Set; Item : Element_Type); - function Contains (Container : Set; Item : Element_Type) return Boolean; - - function Find (Container : Set; Item : Element_Type) return Cursor; - - function First (Container : Set) return Cursor; - - function Next (Position : Cursor) return Cursor; - - procedure Next (Position : in out Cursor); - - function Has_Element (Position : Cursor) return Boolean; - - function Equivalent_Elements (Left, Right : Cursor) return Boolean; - - function Equivalent_Elements - (Left : Cursor; - Right : Element_Type) return Boolean; - - function Equivalent_Elements - (Left : Element_Type; - Right : Cursor) return Boolean; + procedure Delete (Container : in out Set; Item : Element_Type); - procedure Iterate - (Container : Set; - Process : not null access procedure (Position : Cursor)); + procedure Delete (Container : in out Set; Position : in out Cursor); procedure Union (Target : in out Set; Source : Set); @@ -158,41 +137,59 @@ package Ada.Containers.Indefinite_Hashed_Sets is function Is_Subset (Subset : Set; Of_Set : Set) return Boolean; - function Capacity (Container : Set) return Count_Type; + function First (Container : Set) return Cursor; - procedure Reserve_Capacity - (Container : in out Set; - Capacity : Count_Type); + function Next (Position : Cursor) return Cursor; + + procedure Next (Position : in out Cursor); + + function Find (Container : Set; Item : Element_Type) return Cursor; + + function Contains (Container : Set; Item : Element_Type) return Boolean; + + function Has_Element (Position : Cursor) return Boolean; + + function Equivalent_Elements (Left, Right : Cursor) return Boolean; + + function Equivalent_Elements + (Left : Cursor; + Right : Element_Type) return Boolean; + + function Equivalent_Elements + (Left : Element_Type; + Right : Cursor) return Boolean; + + procedure Iterate + (Container : Set; + Process : not null access procedure (Position : Cursor)); generic - type Key_Type (<>) is limited private; + type Key_Type (<>) is private; with function Key (Element : Element_Type) return Key_Type; with function Hash (Key : Key_Type) return Hash_Type; - with function Equivalent_Keys - (Key : Key_Type; - Element : Element_Type) return Boolean; + with function Equivalent_Keys (Left, Right : Key_Type) return Boolean; package Generic_Keys is - function Contains (Container : Set; Key : Key_Type) return Boolean; - - function Find (Container : Set; Key : Key_Type) return Cursor; - function Key (Position : Cursor) return Key_Type; function Element (Container : Set; Key : Key_Type) return Element_Type; - procedure Replace + procedure Replace -- TODO: ask Randy why this is still here (Container : in out Set; Key : Key_Type; New_Item : Element_Type); + procedure Exclude (Container : in out Set; Key : Key_Type); + procedure Delete (Container : in out Set; Key : Key_Type); - procedure Exclude (Container : in out Set; Key : Key_Type); + function Find (Container : Set; Key : Key_Type) return Cursor; + + function Contains (Container : Set; Key : Key_Type) return Boolean; procedure Update_Element_Preserving_Key (Container : in out Set; @@ -200,13 +197,6 @@ package Ada.Containers.Indefinite_Hashed_Sets is Process : not null access procedure (Element : in out Element_Type)); - function Equivalent_Keys - (Left : Cursor; - Right : Key_Type) return Boolean; - - function Equivalent_Keys - (Left : Key_Type; - Right : Cursor) return Boolean; end Generic_Keys; private |