From 60b2207a469a5a1e7a7e5619a8eb1b01c67f314a Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 10 Feb 2017 18:41:36 +1100 Subject: Preference data reads into Bundles properly, with packed memory and a few fixed bugs --- src/bundles-containers.ads | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/bundles-containers.ads (limited to 'src/bundles-containers.ads') diff --git a/src/bundles-containers.ads b/src/bundles-containers.ads new file mode 100644 index 0000000..d405e7e --- /dev/null +++ b/src/bundles-containers.ads @@ -0,0 +1,30 @@ + + +with Ada.Containers.Ordered_Maps; +with Ada.Containers.Vectors; + + +generic +package Bundles.Containers is + + + package Bundle_Vectors is new Ada.Containers.Vectors + (Index_Type => Positive, + Element_Type => Bundle); + + + package Bundle_Maps is new Ada.Containers.Ordered_Maps + (Key_Type => Candidates.CandidateID, + Element_Type => Bundle_Vectors.Vector, + "<" => Candidates."<", + "=" => Bundle_Vectors."="); + + + procedure Read_Bundles + (Filename : in String; + Result : out Bundle_Maps.Map); + + +end Bundles.Containers; + + -- cgit