diff options
author | Matthew Heaney <heaney@adacore.com> | 2005-11-15 14:54:02 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-11-15 14:54:02 +0100 |
commit | 2368f04ec19f5d2aa5439e2454217d3135603dd0 (patch) | |
tree | 129bc8844811a17598b415668a54b3f7b4c278d7 /gcc/ada/a-cidlli.ads | |
parent | 5e61ef090a8910843dd421fad19eae41c4fca816 (diff) | |
download | gcc-2368f04ec19f5d2aa5439e2454217d3135603dd0.zip gcc-2368f04ec19f5d2aa5439e2454217d3135603dd0.tar.gz gcc-2368f04ec19f5d2aa5439e2454217d3135603dd0.tar.bz2 |
a-crbtgo.ads, [...]: Compiles against the spec for ordered maps described in sections A.18.6 of the...
2005-11-14 Matthew Heaney <heaney@adacore.com>
* a-crbtgo.ads, a-crbtgo.adb, a-coorse.ads, a-coorse.adb, a-convec.ads,
a-convec.adb, a-coinve.ads, a-coinve.adb, 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-cdlili.ads, a-cdlili.adb, a-coormu.adb, a-ciormu.adb,
a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorma.adb, a-coorma.adb:
Compiles against the spec for ordered maps described in sections
A.18.6 of the most recent (August 2005) AI-302 draft.
From-SVN: r106962
Diffstat (limited to 'gcc/ada/a-cidlli.ads')
-rw-r--r-- | gcc/ada/a-cidlli.ads | 99 |
1 files changed, 56 insertions, 43 deletions
diff --git a/gcc/ada/a-cidlli.ads b/gcc/ada/a-cidlli.ads index eb8657f..9e2d235 100644 --- a/gcc/ada/a-cidlli.ads +++ b/gcc/ada/a-cidlli.ads @@ -7,7 +7,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2005 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 -- @@ -62,46 +62,47 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is procedure Clear (Container : in out List); - function Element (Position : Cursor) - return Element_Type; + function Element (Position : Cursor) return Element_Type; + + procedure Replace_Element + (Container : in out List; + Position : Cursor; + New_Item : Element_Type); procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)); procedure Update_Element - (Position : Cursor; - Process : not null access procedure (Element : in out Element_Type)); - - procedure Replace_Element - (Position : Cursor; - By : Element_Type); + (Container : in out List; + Position : Cursor; + Process : not null access procedure (Element : in out Element_Type)); procedure Move (Target : in out List; Source : in out List); - procedure Prepend + procedure Insert (Container : in out List; + Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1); - procedure Append + procedure Insert (Container : in out List; + Before : Cursor; New_Item : Element_Type; + Position : out Cursor; Count : Count_Type := 1); - procedure Insert + procedure Prepend (Container : in out List; - Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1); - procedure Insert + procedure Append (Container : in out List; - Before : Cursor; New_Item : Element_Type; - Position : out Cursor; Count : Count_Type := 1); procedure Delete @@ -117,21 +118,9 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is (Container : in out List; Count : Count_Type := 1); - generic - with function "<" (Left, Right : Element_Type) return Boolean is <>; - package Generic_Sorting is - - function Is_Sorted (Container : List) return Boolean; - - procedure Sort (Container : in out List); - - procedure Merge (Target, Source : in out List); - - end Generic_Sorting; + procedure Reverse_Elements (Container : in out List); - procedure Reverse_List (Container : in out List); - - procedure Swap (I, J : Cursor); + procedure Swap (Container : in out List; I, J : Cursor); procedure Swap_Links (Container : in out List; I, J : Cursor); @@ -143,13 +132,13 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is procedure Splice (Target : in out List; Before : Cursor; - Position : Cursor); + Source : in out List; + Position : in out Cursor); procedure Splice (Target : in out List; Before : Cursor; - Source : in out List; - Position : in out Cursor); + Position : Cursor); function First (Container : List) return Cursor; @@ -159,9 +148,13 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is function Last_Element (Container : List) return Element_Type; - function Contains - (Container : List; - Item : Element_Type) return Boolean; + function Next (Position : Cursor) return Cursor; + + procedure Next (Position : in out Cursor); + + function Previous (Position : Cursor) return Cursor; + + procedure Previous (Position : in out Cursor); function Find (Container : List; @@ -173,13 +166,9 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is Item : Element_Type; Position : Cursor := No_Element) return Cursor; - function Next (Position : Cursor) return Cursor; - - function Previous (Position : Cursor) return Cursor; - - procedure Next (Position : in out Cursor); - - procedure Previous (Position : in out Cursor); + function Contains + (Container : List; + Item : Element_Type) return Boolean; function Has_Element (Position : Cursor) return Boolean; @@ -191,6 +180,18 @@ package Ada.Containers.Indefinite_Doubly_Linked_Lists is (Container : List; Process : not null access procedure (Position : Cursor)); + generic + with function "<" (Left, Right : Element_Type) return Boolean is <>; + package Generic_Sorting is + + function Is_Sorted (Container : List) return Boolean; + + procedure Sort (Container : in out List); + + procedure Merge (Target, Source : in out List); + + end Generic_Sorting; + private type Node_Type; type Node_Access is access Node_Type; @@ -244,6 +245,18 @@ private Node : Node_Access; end record; + procedure Read + (Stream : access Root_Stream_Type'Class; + Item : out Cursor); + + for Cursor'Read use Read; + + procedure Write + (Stream : access Root_Stream_Type'Class; + Item : Cursor); + + for Cursor'Write use Write; + No_Element : constant Cursor := Cursor'(null, null); end Ada.Containers.Indefinite_Doubly_Linked_Lists; |