diff options
author | Matthew Heaney <heaney@adacore.com> | 2012-01-23 09:35:53 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-23 10:35:53 +0100 |
commit | 3c24c853da7ea2106fe07213fdf1efd43b86bddf (patch) | |
tree | b1fee48f14a9a5cc25d00c2a2db9351c395f6a27 /gcc/ada/a-cihama.ads | |
parent | c61b6f0f3c7d3419603e9143a7065fefb3340247 (diff) | |
download | gcc-3c24c853da7ea2106fe07213fdf1efd43b86bddf.zip gcc-3c24c853da7ea2106fe07213fdf1efd43b86bddf.tar.gz gcc-3c24c853da7ea2106fe07213fdf1efd43b86bddf.tar.bz2 |
a-cohase.ads, [...] (Cursor'Read, [...]): Declare in private part.
2012-01-23 Matthew Heaney <heaney@adacore.com>
* 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.
From-SVN: r183418
Diffstat (limited to 'gcc/ada/a-cihama.ads')
-rw-r--r-- | gcc/ada/a-cihama.ads | 85 |
1 files changed, 43 insertions, 42 deletions
diff --git a/gcc/ada/a-cihama.ads b/gcc/ada/a-cihama.ads index 2cd41eb..f2158fd 100644 --- a/gcc/ada/a-cihama.ads +++ b/gcc/ada/a-cihama.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,10 +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; @@ -139,34 +140,10 @@ package Ada.Containers.Indefinite_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; @@ -346,11 +323,25 @@ private HT : HT_Types.Hash_Table_Type; end record; + overriding procedure Adjust (Container : in out Map); + + overriding procedure Finalize (Container : in out Map); + use HT_Types; use Ada.Finalization; + use Ada.Streams; - overriding procedure Adjust (Container : in out Map); - overriding procedure Finalize (Container : in out Map); + procedure Write + (Stream : not null access Root_Stream_Type'Class; + Container : Map); + + for Map'Write use Write; + + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Container : out Map); + + for Map'Read use Read; type Map_Access is access all Map; for Map_Access'Storage_Size use 0; @@ -366,34 +357,44 @@ private for Cursor'Write use Write; + procedure Read + (Stream : not null access Root_Stream_Type'Class; + Item : out Cursor); + + for Cursor'Read use Read; + 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; + 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 Cursor); + Item : out Constant_Reference_Type); - for Cursor'Read use Read; + for Constant_Reference_Type'Read use Read; - No_Element : constant Cursor := - (Container => null, - Node => null); + type Reference_Type + (Element : not null access Element_Type) is null record; procedure Write - (Stream : not null access Root_Stream_Type'Class; - Container : Map); + (Stream : not null access Root_Stream_Type'Class; + Item : Reference_Type); - for Map'Write use Write; + for Reference_Type'Write use Write; procedure Read - (Stream : not null access Root_Stream_Type'Class; - Container : out Map); + (Stream : not null access Root_Stream_Type'Class; + Item : out Reference_Type); - for Map'Read use Read; + 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); + end Ada.Containers.Indefinite_Hashed_Maps; |