summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-02-07 00:22:13 +1100
committerJed Barber <jjbarber@y7mail.com>2017-02-07 00:22:13 +1100
commit8a7c0dd18cb373a5b3c69e13f110562e156575e9 (patch)
treec83cba28bf96b1cfa13e7fcf9be4d11dc8000b35
parentf11c770329edf407de1e534e286ecbfd2a3495c9 (diff)
Started to sketch out Bundles package
-rw-r--r--src/bundles.adb8
-rw-r--r--src/bundles.ads53
2 files changed, 61 insertions, 0 deletions
diff --git a/src/bundles.adb b/src/bundles.adb
new file mode 100644
index 0000000..6a2d71d
--- /dev/null
+++ b/src/bundles.adb
@@ -0,0 +1,8 @@
+
+
+package body Bundles is
+
+
+end Bundles;
+
+
diff --git a/src/bundles.ads b/src/bundles.ads
new file mode 100644
index 0000000..aa0b0d6
--- /dev/null
+++ b/src/bundles.ads
@@ -0,0 +1,53 @@
+
+
+with Candidates;
+with Rationals;
+private with Ada.Containers.Vectors;
+
+
+generic
+ Number_Of_Candidates : Positive;
+package Bundles is
+
+
+ type Bundle is private;
+ subtype Preference_Array is array (1 .. Number_Of_Candidates) of Candidates.CandidateID;
+
+
+ Empty_Bundle : constant Bundle;
+
+
+ procedure Add
+ (To : in out Bundle;
+ Item : in Preference_Array);
+
+
+ procedure Transfer
+ (From, To : in out Bundle;
+ Value : in Rationals.Fraction);
+
+
+ function Count
+ (This : in Bundle)
+ return Natural;
+
+
+private
+
+
+ type Paper_Lot is record
+ How_Many : Positive := 1;
+ Prefs : Preference_Array;
+ end record;
+
+
+ type Bundle is record
+
+
+
+ Empty_Bundle :=
+
+
+end Bundles;
+
+