summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cohase.ads
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-11 08:28:21 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-11 08:28:21 +0000
commit84d429b9a24117fcd1ad6b88ae2658cc8fa5f8ac (patch)
treefb62b90dc09045605d9426eb9febca89032fd1b2 /gcc/ada/a-cohase.ads
parentf22b491886dbe1718cc7076fcce41f157ac735d9 (diff)
downloadgcc-84d429b9a24117fcd1ad6b88ae2658cc8fa5f8ac.tar.gz
2012-01-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 183090 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@183091 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cohase.ads')
-rw-r--r--gcc/ada/a-cohase.ads32
1 files changed, 25 insertions, 7 deletions
diff --git a/gcc/ada/a-cohase.ads b/gcc/ada/a-cohase.ads
index b31001c90f3..97b209d280d 100644
--- a/gcc/ada/a-cohase.ads
+++ b/gcc/ada/a-cohase.ads
@@ -52,7 +52,7 @@ package Ada.Containers.Hashed_Sets is
type Set is tagged private
with
- constant_Indexing => Constant_Reference,
+ Constant_Indexing => Constant_Reference,
Default_Iterator => Iterate,
Iterator_Element => Element_Type;
@@ -145,10 +145,6 @@ package Ada.Containers.Hashed_Sets is
-- Calls Process with the element (having only a constant view) of the node
-- designed by the cursor.
- procedure Assign (Target : in out Set; Source : Set);
-
- function Copy (Source : Set; Capacity : Count_Type := 0) return Set;
-
type Constant_Reference_Type
(Element : not null access constant Element_Type) is private
with Implicit_Dereference => Element;
@@ -157,6 +153,10 @@ package Ada.Containers.Hashed_Sets is
(Container : aliased Set;
Position : Cursor) return Constant_Reference_Type;
+ procedure Assign (Target : in out Set; Source : Set);
+
+ function Copy (Source : Set; Capacity : Count_Type := 0) return Set;
+
procedure Move (Target : in out Set; Source : in out Set);
-- Clears Target (if it's not empty), and then moves (not copies) the
-- buckets array and nodes from Source to Target.
@@ -422,14 +422,32 @@ package Ada.Containers.Hashed_Sets is
(Container : aliased in out Set;
Position : Cursor) return Reference_Type;
+ function Constant_Reference
+ (Container : aliased Set;
+ Key : Key_Type) return Constant_Reference_Type;
+
function Reference_Preserving_Key
(Container : aliased in out Set;
- Key : Key_Type) return Reference_Type;
+ Key : Key_Type) return Reference_Type;
private
type Reference_Type (Element : not null access Element_Type)
is null record;
+ use Ada.Streams;
+
+ procedure Read
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : out Reference_Type);
+
+ for Reference_Type'Read use Read;
+
+ procedure Write
+ (Stream : not null access Root_Stream_Type'Class;
+ Item : Reference_Type);
+
+ for Reference_Type'Write use Write;
+
end Generic_Keys;
private
@@ -439,7 +457,7 @@ private
type Node_Access is access Node_Type;
type Node_Type is limited record
- Element : Element_Type;
+ Element : aliased Element_Type;
Next : Node_Access;
end record;