Files
alire-index-community/src/table_io.ads
T
Alejandro R. Mosteo 9a930c2c69 Better native origins
2018-03-03 18:27:10 +01:00

32 lines
858 B
Ada

with Ada.Containers.Indefinite_Vectors;
with Ada.Containers.Vectors;
package Table_IO with Preelaborate is
type Table is tagged private;
procedure Append (T : in out Table; Cell : String);
procedure New_Row (T : in out Table);
procedure Print (T : Table; Separator : String := " ");
private
package Natural_Vectors is new Ada.Containers.Vectors (Positive, Natural);
package String_Vectors is new Ada.Containers.Indefinite_Vectors (Positive,
String);
subtype Row is String_Vectors.Vector;
use all type Row;
package Row_Vectors is new Ada.Containers.Vectors (Positive, Row);
type Table is tagged record
Next_Column : Positive := 1;
Rows : Row_Vectors.Vector;
Max_Widths : Natural_Vectors.Vector;
end record;
end Table_IO;