asn1_iterators-simpletypes.ads 739 Bytes
Newer Older
1
generic
Maxime Perrotin's avatar
Maxime Perrotin committed
2 3 4 5 6
   type Sort is private;
   with function Elem_Init                 return Sort;
   with function Has_Elem  (Value : Sort)  return Boolean;
   with function Elem_First                return Sort;
   with function Elem_Next (Value : Sort)  return Sort;
7
package ASN1_Iterators.SimpleTypes is
Maxime Perrotin's avatar
Maxime Perrotin committed
8 9 10
   type SimpleType is tagged record
      Value : Sort;
   end record;
11

Maxime Perrotin's avatar
Maxime Perrotin committed
12
   procedure Initialize (Self : in out SimpleType);
13

Maxime Perrotin's avatar
Maxime Perrotin committed
14 15
   function Has_Element (Self : in out SimpleType) return Boolean is
      (Has_Elem (Self.Value));
16

Maxime Perrotin's avatar
Maxime Perrotin committed
17
   procedure First (Self : in out SimpleType);
18

Maxime Perrotin's avatar
Maxime Perrotin committed
19
   procedure Next (Self : in out SimpleType);
20

Maxime Perrotin's avatar
Maxime Perrotin committed
21 22 23
   function Element_Value (Self : in out SimpleType) return Sort is
      (Self.Value);
end ASN1_Iterators.SimpleTypes;