private with Ada.Strings.Unbounded; -- This source is licensed under Creative Commons CC0 v1.0. -- -- To read the full text, see license.txt in the main directory of this repository -- or go to https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt -- -- For a human readable summary, go to https://creativecommons.org/publicdomain/zero/1.0/ package Candidates is type State_Name is (ACT, NT, TAS, SA, WA, VIC, QLD, NSW); type Candidate is private; -- this is restricted to 255 values for memory conservation reasons type CandidateID is new Positive range 1 .. 255; subtype Extended_CandidateID is CandidateID'Base range CandidateID'First - 1 .. CandidateID'Last; No_Candidate : constant Extended_CandidateID := Extended_CandidateID'First; function To_String (Input_Candidate : in Candidate; Delimiter : in Character := ',') return String; function Candidate_Header (Delimiter : in Character := ',') return String; function Name_And_Party (Input_Candidate : in Candidate) return String; private package SU renames Ada.Strings.Unbounded; type Candidate is record First_Name : SU.Unbounded_String; Last_Name : SU.Unbounded_String; Group : SU.Unbounded_String; Group_Rank : SU.Unbounded_String; Party : SU.Unbounded_String; end record; end Candidates;