summaryrefslogtreecommitdiff
path: root/gcc/ada/a-ciormu.ads
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-05 09:24:44 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-05 09:24:44 +0000
commit55c4b664c2b65a2a346b55beec474e0404634c18 (patch)
tree3b804fec819d027d915850ec88821f23ed5538ea /gcc/ada/a-ciormu.ads
parent3af4a6046ed483eb5301a47290e40328d40f954c (diff)
downloadgcc-55c4b664c2b65a2a346b55beec474e0404634c18.tar.gz
2011-12-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 182001 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@182003 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-ciormu.ads')
-rw-r--r--gcc/ada/a-ciormu.ads24
1 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ada/a-ciormu.ads b/gcc/ada/a-ciormu.ads
index c1d81d5b753..cfd1676aa5f 100644
--- a/gcc/ada/a-ciormu.ads
+++ b/gcc/ada/a-ciormu.ads
@@ -35,6 +35,7 @@
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
+with Ada.Iterator_Interfaces;
generic
type Element_Type (<>) is private;
@@ -50,7 +51,10 @@ package Ada.Containers.Indefinite_Ordered_Multisets is
-- Returns False if Left is less than Right, or Right is less than Left;
-- otherwise, it returns True.
- type Set is tagged private;
+ type Set is tagged private
+ with Default_Iterator => Iterate,
+ Iterator_Element => Element_Type;
+
pragma Preelaborable_Initialization (Set);
type Cursor is private;
@@ -64,6 +68,12 @@ package Ada.Containers.Indefinite_Ordered_Multisets is
-- The default value for cursor objects declared without an explicit
-- initialization expression.
+ function Has_Element (Position : Cursor) return Boolean;
+ -- Equivalent to Position /= No_Element
+
+ package Set_Iterator_Interfaces is new
+ Ada.Iterator_Interfaces (Cursor, Has_Element);
+
function "=" (Left, Right : Set) return Boolean;
-- If Left denotes the same set object as Right, then equality returns
-- True. If the length of Left is different from the length of Right, then
@@ -286,9 +296,6 @@ package Ada.Containers.Indefinite_Ordered_Multisets is
function Contains (Container : Set; Item : Element_Type) return Boolean;
-- Equivalent to Container.Find (Item) /= No_Element
- function Has_Element (Position : Cursor) return Boolean;
- -- Equivalent to Position /= No_Element
-
function "<" (Left, Right : Cursor) return Boolean;
-- Equivalent to Element (Left) < Element (Right)
@@ -333,6 +340,15 @@ package Ada.Containers.Indefinite_Ordered_Multisets is
-- Call Process with a cursor designating each element equivalent to Item,
-- in order from Container.Ceiling (Item) to Container.Floor (Item).
+ function Iterate
+ (Container : Set)
+ return Set_Iterator_Interfaces.Reversible_Iterator'class;
+
+ function Iterate
+ (Container : Set;
+ Start : Cursor)
+ return Set_Iterator_Interfaces.Reversible_Iterator'class;
+
generic
type Key_Type (<>) is private;