mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 08:55:34 +00:00
33 lines
844 B
Swift
33 lines
844 B
Swift
//
|
|
// FullLexicalModelID.swift
|
|
// KeymanEngine
|
|
//
|
|
// Created by Randy Boring on 3/14/19.
|
|
// Copyright © 2019 SIL International. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
/// A complete identifier for an `InstallableLexicalModel`. LexicalModels must have unique `FullLexicalModelID`s.
|
|
public struct FullLexicalModelID: Codable, LanguageResourceFullID, Equatable {
|
|
public typealias Resource = InstallableLexicalModel
|
|
|
|
public var lexicalModelID: String
|
|
public var languageID: String
|
|
|
|
public var id: String {
|
|
return lexicalModelID
|
|
}
|
|
|
|
public var type: LanguageResourceType {
|
|
return .lexicalModel
|
|
}
|
|
}
|
|
|
|
// MARK: - CustomStringConvertible
|
|
extension FullLexicalModelID: CustomStringConvertible {
|
|
public var description: String {
|
|
return "<lexicalModelID: \"\(lexicalModelID)\", languageID: \"\(languageID)\">"
|
|
}
|
|
}
|
|
|