with Unbounded_String;
package Lines is

    -- All operations which are passed invalid parameters raise
    -- Constraint_Error.

    subtype Line is String;

    type Lines_Type is private;

    function Make return Lines_Type;

    function Is_Empty (Lines : Lines_Type) return Boolean;

    procedure Add (New_Line : Line; To : in out Lines_Type);

    type Line_Iterator is private;

    function Initialize (Lines : Lines_Type) return Line_Iterator;
    function Value (Iterator : Line_Iterator) return Line;
    procedure Next (Iterator : in out Line_Iterator);
    function Done (Iterator : Line_Iterator) return Boolean;

private
    package Ubs is new Unbounded_String;

    type Line_Rec;
    type Lines_Type is access Line_Rec;

    type Line_Rec is
        record
            A_Line : Ubs.Variable_String;
            Next : Lines_Type;
        end record;

    type Line_Iterator is new Lines_Type;
end Lines;
