From 866565c42134dbe8828c9a9b8140a90598df4069 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sat, 6 Nov 2021 00:53:55 +1300 Subject: Factored out deck datatypes into their own package --- src/csv.ads | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/csv.ads') diff --git a/src/csv.ads b/src/csv.ads index cc1eef5..ec0c096 100644 --- a/src/csv.ads +++ b/src/csv.ads @@ -4,7 +4,8 @@ with Ada.Containers.Vectors, Ada.Strings.Unbounded, - Ada.Text_IO; + Ada.Text_IO, + Datatypes; generic @@ -25,20 +26,14 @@ package CSV is Data : in Ada.Strings.Unbounded.Unbounded_String); - generic - - type Vector_Index is range <>; - type Vector_Data is private; - - with package Data_Vectors is new Ada.Containers.Vectors (Vector_Index, Vector_Data); + procedure Put_Header + (File_Handle : in Ada.Text_IO.File_Type; + Titles : in Datatypes.Field_ID_Vector); - with function To_Unbounded_String - (Data : in Vector_Data) - return Ada.Strings.Unbounded.Unbounded_String is <>; procedure Put_Row (File_Handle : in Ada.Text_IO.File_Type; - Cells : in Data_Vectors.Vector; + Cells : in Datatypes.Field_Vector; Quantity : in Positive); -- cgit