summaryrefslogtreecommitdiff
path: root/src/fmd.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/fmd.ads')
-rw-r--r--src/fmd.ads50
1 files changed, 6 insertions, 44 deletions
diff --git a/src/fmd.ads b/src/fmd.ads
index 1c64deb..6b06d20 100644
--- a/src/fmd.ads
+++ b/src/fmd.ads
@@ -4,7 +4,8 @@ with
Ada.Containers.Vectors,
Ada.Strings.Unbounded,
- Ada.Text_IO;
+ Ada.Text_IO,
+ Datatypes;
private with
@@ -22,20 +23,9 @@ package FMD is
- generic
-
- type Vector_Index is range <>;
- type Vector_Data is private;
-
- with package Data_Vectors is new Ada.Containers.Vectors (Vector_Index, Vector_Data);
-
- with function To_Unbounded_String
- (Data : in Vector_Data)
- return Ada.Strings.Unbounded.Unbounded_String is <>;
-
procedure Put_Fields
(File_Handle : in Ada.Text_IO.File_Type;
- Field_IDs : in Data_Vectors.Vector);
+ Field_IDs : in Datatypes.Field_ID_Vector);
@@ -43,25 +33,12 @@ package FMD is
procedure Start_Pack_Section
(File_Handle : in Ada.Text_IO.File_Type);
-
- generic
-
- type Vector_Index is range <>;
- type Vector_Data is private;
-
- with package Data_Vectors is new Ada.Containers.Vectors (Vector_Index, Vector_Data);
-
- with function To_Unbounded_String
- (Data : in Vector_Data)
- return Ada.Strings.Unbounded.Unbounded_String is <>;
-
procedure Put_Pack
(File_Handle : in Ada.Text_IO.File_Type;
- Q_Data : in Data_Vectors.Vector;
- A_Data : in Data_Vectors.Vector)
+ Q_Data : in Datatypes.Field_ID_Vector;
+ A_Data : in Datatypes.Field_ID_Vector)
with Pre => not Q_Data.Is_Empty and not A_Data.Is_Empty;
-
procedure End_Pack_Section
(File_Handle : in Ada.Text_IO.File_Type);
@@ -71,24 +48,11 @@ package FMD is
procedure Start_Entry_Section
(File_Handle : in Ada.Text_IO.File_Type);
-
- generic
-
- type Vector_Index is range <>;
- type Vector_Data is private;
-
- with package Data_Vectors is new Ada.Containers.Vectors (Vector_Index, Vector_Data);
-
- with function To_Unbounded_String
- (Data : in Vector_Data)
- return Ada.Strings.Unbounded.Unbounded_String is <>;
-
procedure Put_Entry
(File_Handle : in Ada.Text_IO.File_Type;
- Data : in Data_Vectors.Vector;
+ Data : in Datatypes.Field_Vector;
Quantity : in Positive);
-
procedure End_Entry_Section
(File_Handle : in Ada.Text_IO.File_Type);
@@ -124,13 +88,11 @@ private
Sub : in String)
with Pre => Ada.Strings.Fixed.Count (Sub, Ada.Strings.Maps.To_Set (Char)) = 0;
-
procedure Replace_All
(Text : in out SU.Unbounded_String;
Item : in String;
Sub : in String);
-
function Prep
(Text : in SU.Unbounded_String)
return SU.Unbounded_String;