private with Ada.Containers.Hash_Tables;
private with Ada.Finalization;
-with Ada.Streams; use Ada.Streams;
+with Ada.Streams; use Ada.Streams;
with Ada.Iterator_Interfaces;
generic
-- Calls Process with the key (with only a constant view) and element (with
-- a variable view) of the node designed by the cursor.
+ procedure Assign (Target : in out Map; Source : Map);
+
+ function Copy (Source : Map; Capacity : Count_Type := 0) return Map;
+
procedure Move (Target : in out Map; Source : in out Map);
-- Clears Target (if it's not empty), and then moves (not copies) the
-- buckets array and nodes from Source to Target.
for Reference_Type'Read use Read;
function Constant_Reference
- (Container : Map; Key : Key_Type) -- SHOULD BE ALIASED
- return Constant_Reference_Type;
+ (Container : aliased Map;
+ Position : Cursor) return Constant_Reference_Type;
+
+ function Reference
+ (Container : aliased in out Map;
+ Position : Cursor) return Reference_Type;
+
+ function Constant_Reference
+ (Container : aliased Map;
+ Key : Key_Type) return Constant_Reference_Type;
- function Reference (Container : Map; Key : Key_Type)
- return Reference_Type;
+ function Reference
+ (Container : aliased in out Map;
+ Key : Key_Type) return Reference_Type;
procedure Iterate
(Container : Map;
Process : not null access procedure (Position : Cursor));
-- Calls Process for each node in the map
- function Iterate (Container : Map)
- return Map_Iterator_Interfaces.Forward_Iterator'class;
+ function Iterate
+ (Container : Map) return Map_Iterator_Interfaces.Forward_Iterator'class;
private
pragma Inline ("=");
for Map'Read use Read;
- type Map_Access is access constant Map;
+ type Map_Access is access all Map;
for Map_Access'Storage_Size use 0;
type Cursor is record