asn1_iterators-generic_basic.adb 724 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
package body ASN1_Iterators.Generic_Basic is
    procedure Initialize (self: in out Basic_ASN1_Iterator) is
    begin
        --Self.Value := create;
        Self.Value.Initialize;
    end;

    function First (Item : Iterator) return Iterator_Ptr is
    begin
        Item.Ptr.Value.First;
        return Item.Ptr;
    end;

    function Next (Item : Iterator;
                   Ptr  : Iterator_Ptr) return Iterator_Ptr is
    pragma Unreferenced (Item);
    begin
        Ptr.Value.Next;
        return Ptr;
    end;

    function Iterate (self : Basic_ASN1_Iterator)
        return Forward_Iterator is
    begin
       return I: Iterator do
           I.Ptr := self'Unrestricted_Access;
       end return;
    end;
end;