-- --
-- S p e c --
-- --
--- Copyright (C) 2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2011, 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 --
------------------------------------------------------------------------------
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
+ pragma Pure;
+
type Forward_Iterator is limited interface;
function First (Object : Forward_Iterator) return Cursor is abstract;
- function Next (Object : Forward_Iterator; Position : Cursor) return Cursor
- is abstract;
+ function Next
+ (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; Position : Cursor)
- return Cursor is abstract;
+ function Previous
+ (Object : Reversible_Iterator;
+ Position : Cursor) return Cursor is abstract;
end Ada.Iterator_Interfaces;