asn1_iterators-generic_enumerated.adb 563 Bytes
Newer Older
1 2
with Text_IO; use Text_IO;

3 4 5 6
package body ASN1_Iterators.Generic_Enumerated is

   function Elem_Init return Sort is
   begin
7
      Put_Line ("Elem_Init ");
8 9 10 11 12 13 14
      Is_Last := (Sort'First = Sort'Last);
      return Sort'First;
   end Elem_Init;

   function Has_Elem (Value: Sort) return Boolean is
      Result : constant Boolean := (not Is_Last and Value <= Sort'Last);
   begin
15
      Put_Line ("Value: " & Value'Img & " Has_Elem = " & Result'Img);
16 17 18 19 20 21
      if Value = Sort'Last then
         Is_Last := True;
      end if;
      return Result;
   end Has_Elem;
end;