[multiple changes]
[gcc.git] / gcc / ada / a-iteint.ads
index 99dd304a4e9ec409e7ab57f19667932ac5b9306e..192bdcb430b166b4612c1fcaec4af50197c9b4a3 100644 (file)
@@ -6,32 +6,46 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
+--          Copyright (C) 2004-2011, Free Software Foundation, Inc.         --
+--                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
--- GNAT.  In accordance with the copyright of that document, you can freely --
--- copy and modify this specification,  provided that if you redistribute a --
--- modified version,  any changes that you have made are clearly indicated. --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the  contents of the part following the private keyword. --
+--                                                                          --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
+--                                                                          --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.               --
+--                                                                          --
+-- You should have received a copy of the GNU General Public License and    --
+-- a copy of the GCC Runtime Library Exception along with this program;     --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
+-- <http://www.gnu.org/licenses/>.                                          --
 --                                                                          --
 ------------------------------------------------------------------------------
 
 generic
-   type Cursor is private;
-   No_Element : Cursor;
-   pragma Unreferenced (No_Element);
-
+   type Cursor;
+   with function Has_Element (Position : Cursor) return Boolean;
+   pragma Unreferenced (Has_Element);
 package Ada.Iterator_Interfaces is
-   type Forward_Iterator is limited interface;
+   pragma Pure;
 
+   type Forward_Iterator is limited interface;
    function First (Object : Forward_Iterator) return Cursor is abstract;
-
    function Next
-     (Object : Forward_Iterator;
+     (Object   : Forward_Iterator;
       Position : Cursor) return Cursor is abstract;
-
    type Reversible_Iterator is limited interface and Forward_Iterator;
 
    function Last (Object : Reversible_Iterator) return Cursor is abstract;
-
    function Previous
-     (Object : Reversible_Iterator;
+     (Object   : Reversible_Iterator;
       Position : Cursor) return Cursor is abstract;
 end Ada.Iterator_Interfaces;