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-coorma.ads | |
parent | dc8f57914cb54a209cf2d52bb04d21502990842b (diff) | |
download | gcc-8704d4b30e3eace58fc9506cf3533b15835c784a.zip gcc-8704d4b30e3eace58fc9506cf3533b15835c784a.tar.gz gcc-8704d4b30e3eace58fc9506cf3533b15835c784a.tar.bz2 |
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-coorma.ads')
-rw-r--r-- | gcc/ada/a-coorma.ads | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/gcc/ada/a-coorma.ads b/gcc/ada/a-coorma.ads index 7fa06e0..c31a7f0 100644 --- a/gcc/ada/a-coorma.ads +++ b/gcc/ada/a-coorma.ads @@ -2,11 +2,11 @@ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- --- ADA.CONTAINERS.ORDERED_MAPS -- +-- A D A . C O N T A I N E R S . O R D E R 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 -- @@ -93,34 +93,34 @@ pragma Preelaborate (Ordered_Maps); procedure Insert (Container : in out Map; Key : Key_Type; - New_Item : Element_Type); + Position : out Cursor; + Inserted : out Boolean); - procedure Include + procedure Insert (Container : in out Map; Key : Key_Type; New_Item : Element_Type); - procedure Replace + procedure Include (Container : in out Map; Key : Key_Type; New_Item : Element_Type); - procedure Insert + procedure Replace (Container : in out Map; Key : Key_Type; - Position : out Cursor; - Inserted : out Boolean); + New_Item : Element_Type); procedure Delete (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 Delete_First (Container : in out Map); procedure Delete_Last (Container : in out Map); + procedure Exclude (Container : in out Map; Key : Key_Type); + function Contains (Container : Map; Key : Key_Type) return Boolean; function Find (Container : Map; Key : Key_Type) return Cursor; @@ -145,10 +145,10 @@ pragma Preelaborate (Ordered_Maps); function Next (Position : Cursor) return Cursor; - function Previous (Position : Cursor) return Cursor; - procedure Next (Position : in out Cursor); + function Previous (Position : Cursor) return Cursor; + procedure Previous (Position : in out Cursor); function Has_Element (Position : Cursor) return Boolean; @@ -178,21 +178,32 @@ private type Node_Type; type Node_Access is access Node_Type; - package Tree_Types is - new Red_Black_Trees.Generic_Tree_Types (Node_Access); + type Node_Type is limited record + Parent : Node_Access; + Left : Node_Access; + Right : Node_Access; + Color : Red_Black_Trees.Color_Type := Red_Black_Trees.Red; + Key : Key_Type; + Element : Element_Type; + end record; - use Tree_Types; - use Ada.Finalization; + package Tree_Types is new Red_Black_Trees.Generic_Tree_Types + (Node_Type, + Node_Access); - type Map is new Controlled with record - Tree : Tree_Type := (Length => 0, others => null); + type Map is new Ada.Finalization.Controlled with record + Tree : Tree_Types.Tree_Type; end record; procedure Adjust (Container : in out Map); procedure Finalize (Container : in out Map) renames Clear; - type Map_Access is access constant Map; + use Red_Black_Trees; + use Tree_Types; + use Ada.Finalization; + + type Map_Access is access Map; for Map_Access'Storage_Size use 0; type Cursor is record @@ -210,7 +221,6 @@ private for Map'Write use Write; - procedure Read (Stream : access Root_Stream_Type'Class; Container : out Map); @@ -218,6 +228,11 @@ private for Map'Read use Read; Empty_Map : constant Map := - (Controlled with Tree => (Length => 0, others => null)); + (Controlled with Tree => (First => null, + Last => null, + Root => null, + Length => 0, + Busy => 0, + Lock => 0)); end Ada.Containers.Ordered_Maps; |