Commit ee28b08b authored by Maxime Perrotin's avatar Maxime Perrotin

Fix current build of iterators

parent c1b6a44f
...@@ -15,12 +15,12 @@ package ASN1_Iterators.Generic_Iterator is ...@@ -15,12 +15,12 @@ package ASN1_Iterators.Generic_Iterator is
end record end record
with Default_Iterator => Iterate, with Default_Iterator => Iterate,
Iterator_Element => ASN1_Type, Iterator_Element => ASN1_Type,
Constant_Indexing => Element; Constant_Indexing => Elem;
type Cursor is access all Generic_Iterator_Type; type Cursor is access all Generic_Iterator_Type;
function Element (Self : Generic_Iterator_Type; function Elem (Self : Generic_Iterator_Type; Ptr : Cursor)
Ptr : Cursor) return ASN1_Type is (Ptr.Item.Element); return ASN1_Type is (Ptr.Item.Element);
function Has_Element (Ptr : Cursor) return Boolean is function Has_Element (Ptr : Cursor) return Boolean is
(ASN1_Iterable.Has_Element(ASN1_Iterable.Iterable'Class(Ptr.all.Item))); (ASN1_Iterable.Has_Element(ASN1_Iterable.Iterable'Class(Ptr.all.Item)));
......
...@@ -24,13 +24,13 @@ begin ...@@ -24,13 +24,13 @@ begin
end loop; end loop;
Put_Line ("With 'for each in':"); Put_Line ("With 'for each in':");
for each in It.Iterate loop for each in It.Iterate loop
Put_Line (It.Element (each)'Img); Put_Line (It.Elem (each)'Img);
end loop; end loop;
-- With manual iterators: -- With manual iterators:
Put_Line ("With manual iterators:"); Put_Line ("With manual iterators:");
C := Iter.First; C := Iter.First;
while MyInt.Has_Element (C) loop while MyInt.Has_Element (C) loop
Put_Line (It.Element (C)'Img); Put_Line (It.Elem (C)'Img);
C := Iter.Next (C); C := Iter.Next (C);
end loop; end loop;
Put_Line ("SeqOF manual iterators:"); Put_Line ("SeqOF manual iterators:");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment