HillList
public struct HillList
A type that represents a list of hills that can be tracked by the app. In keeping with the way the app presents lists, this type has properties to store:
- the
HillList.Classification
of hills within the list (e.g. Dewey); - the
HillList.Region
s covered by the list (e.g. England, Isle of Man & Wales); - the
HillList.Flag
displayed alongside the list’s name (e.g. United Kingdom).
The hills tracked by each list are generally straightforward to determine
based on lookup of classification and regions in the
database of British and Irish hills
(DoBIH). However, the app takes an arguably non-obvious approach when it
comes to Ireland and Northern Ireland. For any HillList
:
- if
HillList.Region.ireland
is in itsregions
set:- if its
flag
isHillList.Flag.ireland
then only hills in the Republic of Ireland are included; - if its
flag
isHillList.Flag.northernIreland
then hills in both the Republic of Ireland and Northern Ireland are included; - if its
flag
isHillList.Flag.unitedKingdom
then only hills in Northern Ireland are included.
- if its
-
The classification of hills in this list.
Declaration
Swift
public let classification: Classification
-
The geographical regions covered by this list.
Declaration
Swift
public let regions: Set<Region>
-
The flag used by the app for this list.
Declaration
Swift
public let flag: Flag
-
An enumeration of hill classifications.
Descriptions of the case values are taken from the database notes of the Database of British and Irish Hills (DoBIH).
Note
the raw value of each case is its unique ID of the classification in the DoBIH, with the exception ofClassification.nineHundred
which is not present in that database.Declaration
Swift
public enum Classification: String
-
An enumeration of geographical regions within Britain and Ireland to which hill lists can belong.
Note
the raw value of each case is the reference letter used by the Database of British and Irish Hills (DoBIH) for the region.Declaration
Swift
public enum Region: String