From dee4c239eae6d805bcdadd421af4593452466869 Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 23 Jan 2012 09:35:53 +0000 Subject: 2012-01-23 Matthew Heaney * a-cohase.ads, a-cihase.ads, a-cbhase.ads, a-coorse.ads, a-ciorse.ads, a-cborse.ads, a-cohama.ads, a-cihama.ads, a-cbhama.ads, a-coorma.ads, a-ciorma.ads, a-cborma.ads, a-cdlili.ads, a-cidlli.ads, a-cbdlli.ads, a-convec.ads, a-coinve.ads, a-cobove.ads (Cursor'Read, Cursor'Write): Declare in private part. (Reference_Type'Read, Reference_Type'Write): Ditto. (Constant_Reference_Type'Read, Constant_Reference_Type'Write): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183418 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/a-cohama.ads | 87 ++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 43 deletions(-) (limited to 'gcc/ada/a-cohama.ads') diff --git a/gcc/ada/a-cohama.ads b/gcc/ada/a-cohama.ads index a5b2ff3e1d7..6550b46a1a1 100644 --- a/gcc/ada/a-cohama.ads +++ b/gcc/ada/a-cohama.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2012, 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 -- @@ -31,11 +31,11 @@ -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ +with Ada.Iterator_Interfaces; + private with Ada.Containers.Hash_Tables; private with Ada.Finalization; - -with Ada.Streams; use Ada.Streams; -with Ada.Iterator_Interfaces; +private with Ada.Streams; generic type Key_Type is private; @@ -61,18 +61,6 @@ package Ada.Containers.Hashed_Maps is type Cursor is private; pragma Preelaborable_Initialization (Cursor); - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Cursor); - - for Cursor'Read use Read; - - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Cursor); - - for Cursor'Write use Write; - Empty_Map : constant Map; -- Map objects declared without an initialization expression are -- initialized to the value Empty_Map. @@ -153,34 +141,10 @@ package Ada.Containers.Hashed_Maps is with Implicit_Dereference => Element; - procedure Write - (Stream : not null access Root_Stream_Type'Class; - Item : Constant_Reference_Type); - - for Constant_Reference_Type'Write use Write; - - procedure Read - (Stream : not null access Root_Stream_Type'Class; - Item : out Constant_Reference_Type); - - 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 Constant_Reference (Container : aliased Map; Position : Cursor) return Constant_Reference_Type; @@ -365,13 +329,14 @@ private HT : HT_Types.Hash_Table_Type; end record; - use HT_Types; - use Ada.Finalization; - overriding procedure Adjust (Container : in out Map); overriding procedure Finalize (Container : in out Map); + use HT_Types; + use Ada.Finalization; + use Ada.Streams; + procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Map); @@ -392,12 +357,48 @@ private Node : Node_Access; end record; + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Cursor); + + for Cursor'Read use Read; + + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Cursor); + + for Cursor'Write use Write; + type Constant_Reference_Type (Element : not null access constant Element_Type) is null record; + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Item : Constant_Reference_Type); + + for Constant_Reference_Type'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Constant_Reference_Type); + + for Constant_Reference_Type'Read use Read; + 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; + Empty_Map : constant Map := (Controlled with HT => (null, 0, 0, 0)); No_Element : constant Cursor := (Container => null, Node => null); -- cgit v1.2.1