LGV_CleantimeKeytagDescription
public struct LGV_CleantimeKeytagDescription
This will generate a list of String-based enums, that will allow the caller to construct a “keytag chain,” with the number of keytags that would be awarded for the given cleandate.
This works in a “layered” fashion, with the “body” as the bottom layer, and “text” over the body.
This struct is really only a namespace for a functional and static enum implementation.
-
This enum has the names for all of the various keytag body visual resources.
You can use these, in conjunction with customized (and/or localized) visual assets.
See moreDeclaration
Swift
public enum KeytagResourceNamesBody : String, CaseIterable
-
This enum has the names for all of the various keytag text visual resources.
See moreDeclaration
Swift
public enum KeytagResourceNamesText : String, CaseIterable
-
This contains enums for all the keytags array elements.
See moreDeclaration
Swift
public enum KeytagIndexes : Int
-
This is a preset collection of all the keytags.
Declaration
Swift
public static let keytags: [LGV_CleantimeKeytagDescription]
-
This returns the descriptions of all the tags that apply to the cleantime passed in. This is a “short” stack, meaning that only the highest awarded tag is used at various multi-year thresholds.
Declaration
Swift
public static func getAShortStackOfTags(totalDays inTotalDays: Int = 0, totalMonths inTotalMonths: Int = 0) -> [LGV_CleantimeKeytagDescription]
Parameters
totalDays
The total day count. It is mutually exclusive with totalMonths. It’s like Highlander: There can only be one…
totalMonths
The total number of months (including years). It is mutually exclusive with totalDays.
Return Value
An Array of the tag descriptions that apply, up to the date.
-
This returns the descriptions of all the tags that apply to the cleantime passed in, but with multiple black (multiYear) tags between multi-year thresholds. It will only make a difference after two years.
Declaration
Swift
public static func getTheFullMonty(totalDays inTotalDays: Int = 0, totalMonths inTotalMonths: Int = 0) -> [LGV_CleantimeKeytagDescription]
Parameters
totalDays
The total day count. It is mutually exclusive with totalMonths. It’s like Highlander: There can only be one…
totalMonths
The total number of months (including years). It is mutually exclusive with totalDays.
Return Value
An Array of the tag descriptions that apply, up to the date; including interim black tags.
-
This returns the description of the highest tag that applies to the cleantime passed in.
Declaration
Swift
public static func getLastTagThatApplies(totalDays inTotalDays: Int = 0, totalMonths inTotalMonths: Int = 0) -> LGV_CleantimeKeytagDescription?
Parameters
totalDays
The total day count. It is mutually exclusive with totalMonths. It’s like Highlander: There can only be one…
totalMonths
The total number of months (including years). It is mutually exclusive with totalDays.
Return Value
An Array of the tag descriptions that apply, up to the date. May be nil, if no tags apply.
-
If the tag measures only days, then this will contain the number of days required to implement this tag. It is mutually exclusive with totalMonths. It’s like Highlander: There can only be one… If zero, then it will not be considered.
Declaration
Swift
public let totalDays: Int
-
If the tag measures only months (including years), then this will contain the number of months required to implement this tag. It is mutually exclusive with totalDays. If zero, then it will not be considered.
Declaration
Swift
public let totalMonths: Int
-
This is the resource name for the tag body image for this tag.
Declaration
Swift
public let bodyImage: KeytagResourceNamesBody
-
This is the resource name for the text for this tag.
Declaration
Swift
public let textImage: KeytagResourceNamesText
-
This lets us know if this tag applies to the cleantime passed in.
Declaration
Swift
public func doesThisTagApply(totalDays inTotalDays: Int = 0, totalMonths inTotalMonths: Int = 0) -> Bool
Parameters
totalDays
The total day count. It is mutually exclusive with totalMonths. It’s like Highlander: There can only be one…
totalMonths
The total number of months (including years). It is mutually exclusive with totalDays.
Return Value
True, if the tag applies (is for the exact time, or for less time).