summaryrefslogtreecommitdiff
path: root/gcc/ada/a-coorse.ads
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-29 15:10:17 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-29 15:10:17 +0000
commit4c47a04c0431d4f1cad46094c7a6daf497846a25 (patch)
treecd3b4ff74b4f4ba042780676731541c8d3e000a9 /gcc/ada/a-coorse.ads
parentd07112c342791bf7dabe3de99dbf274e3a4961f5 (diff)
downloadgcc-4c47a04c0431d4f1cad46094c7a6daf497846a25.tar.gz
2011-09-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 179351 using svnmerge. gcc/ 2011-09-29 Basile Starynkevitch <basile@starynkevitch.net> * melt-runtime.c (melt_really_initialize): Change, because get_random_seed gives a string in GCC 4.6 and a number in GCC 4.7. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@179356 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-coorse.ads')
-rw-r--r--gcc/ada/a-coorse.ads82
1 files changed, 42 insertions, 40 deletions
diff --git a/gcc/ada/a-coorse.ads b/gcc/ada/a-coorse.ads
index 21eb7197779..8349ef85fb4 100644
--- a/gcc/ada/a-coorse.ads
+++ b/gcc/ada/a-coorse.ads
@@ -50,11 +50,9 @@ package Ada.Containers.Ordered_Sets is
function Equivalent_Elements (Left, Right : Element_Type) return Boolean;
type Set is tagged private
- with
- Constant_Indexing => Constant_Reference,
- Variable_Indexing => Reference,
- Default_Iterator => Iterate,
- Iterator_Element => Element_Type;
+ with Constant_Indexing => Constant_Reference,
+ Default_Iterator => Iterate,
+ Iterator_Element => Element_Type;
pragma Preelaborable_Initialization (Set);
@@ -67,18 +65,6 @@ package Ada.Containers.Ordered_Sets is
No_Element : constant Cursor;
- procedure Write
- (Stream : not null access Root_Stream_Type'Class;
- Item : Cursor);
-
- for Cursor'Write use Write;
-
- procedure Read
- (Stream : not null access Root_Stream_Type'Class;
- Item : out Cursor);
-
- for Cursor'Read use Read;
-
package Ordered_Set_Iterator_Interfaces is new
Ada.Iterator_Interfaces (Cursor, Has_Element);
@@ -104,26 +90,6 @@ package Ada.Containers.Ordered_Sets is
for Constant_Reference_Type'Read use Read;
- type Reference_Type (Element : not null access Element_Type) is private
- with
- Implicit_Dereference => Element;
-
- procedure Write
- (Stream : not null access Root_Stream_Type'Class;
- Item : Reference_Type);
-
- for Reference_Type'Write use Write;
-
- procedure Read
- (Stream : not null access Root_Stream_Type'Class;
- Item : out Reference_Type);
-
- for Reference_Type'Read use Read;
-
- function Reference
- (Container : Set; Position : Cursor)
- return Reference_Type;
-
function "=" (Left, Right : Set) return Boolean;
function Equivalent_Sets (Left, Right : Set) return Boolean;
@@ -302,6 +268,33 @@ package Ada.Containers.Ordered_Sets is
Process : not null access
procedure (Element : in out Element_Type));
+ type Reference_Type (Element : not null access Element_Type) is private
+ with
+ Implicit_Dereference => Element;
+
+ function Reference_Preserving_Key
+ (Container : aliased in out Set;
+ Key : Key_Type) return Constant_Reference_Type;
+
+ function Reference_Preserving_Key
+ (Container : aliased in out Set;
+ Key : Key_Type) return Reference_Type;
+
+ private
+ type Reference_Type
+ (Element : not null access Element_Type) is null record;
+
+ procedure Write
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : Reference_Type);
+
+ for Reference_Type'Write use Write;
+
+ procedure Read
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : out Reference_Type);
+
+ for Reference_Type'Read use Read;
end Generic_Keys;
private
@@ -343,6 +336,18 @@ private
Node : Node_Access;
end record;
+ procedure Write
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : Cursor);
+
+ for Cursor'Write use Write;
+
+ procedure Read
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : out Cursor);
+
+ for Cursor'Read use Read;
+
No_Element : constant Cursor := Cursor'(null, null);
procedure Write
@@ -360,9 +365,6 @@ private
type Constant_Reference_Type
(Element : not null access constant Element_Type) is null record;
- type Reference_Type
- (Element : not null access Element_Type) is null record;
-
Empty_Set : constant Set :=
(Controlled with Tree => (First => null,
Last => null,