diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-14 16:52:57 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2025-12-14 17:05:21 +0100 |
| commit | d56e777025f3bda29feaec22c125b0e7ab975e0c (patch) | |
| tree | 19295b051c9e32c17e32a4954fc0cdca3d4e0be5 /Sources/WmapParser/DataStructures | |
| parent | 0b90075f76b6f2df77c01c303322323b1395641a (diff) | |
Format, make map equatable
Diffstat (limited to 'Sources/WmapParser/DataStructures')
| -rw-r--r-- | Sources/WmapParser/DataStructures/Component.swift | 12 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Dependency.swift | 12 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Evolution.swift | 10 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Group.swift | 8 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Inertia.swift | 8 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Map.swift | 20 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/MapPoint.swift | 10 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Note.swift | 10 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Shape.swift | 16 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/Stage.swift | 10 | ||||
| -rw-r--r-- | Sources/WmapParser/DataStructures/StageNumber.swift | 16 |
11 files changed, 66 insertions, 66 deletions
diff --git a/Sources/WmapParser/DataStructures/Component.swift b/Sources/WmapParser/DataStructures/Component.swift index 5ef2716..48dac78 100644 --- a/Sources/WmapParser/DataStructures/Component.swift +++ b/Sources/WmapParser/DataStructures/Component.swift @@ -1,8 +1,8 @@ extension WmapParser { - /// A component in the map. - public struct Component: Sendable, Equatable { - public let label: String - public let coordinates: MapPoint - public let shape: Shape - } + /// A component in the map. + public struct Component: Sendable, Equatable { + public let label: String + public let coordinates: MapPoint + public let shape: Shape + } } diff --git a/Sources/WmapParser/DataStructures/Dependency.swift b/Sources/WmapParser/DataStructures/Dependency.swift index 5f0089c..c2f4163 100644 --- a/Sources/WmapParser/DataStructures/Dependency.swift +++ b/Sources/WmapParser/DataStructures/Dependency.swift @@ -1,8 +1,8 @@ extension WmapParser { -/// A dependency between two components. -public struct Dependency: Sendable, Equatable { - public let fromComponent: String - public let toComponent: String - public let isDirected: Bool -} + /// A dependency between two components. + public struct Dependency: Sendable, Equatable { + public let fromComponent: String + public let toComponent: String + public let isDirected: Bool + } } diff --git a/Sources/WmapParser/DataStructures/Evolution.swift b/Sources/WmapParser/DataStructures/Evolution.swift index 07fbf2a..d5b0ee3 100644 --- a/Sources/WmapParser/DataStructures/Evolution.swift +++ b/Sources/WmapParser/DataStructures/Evolution.swift @@ -1,7 +1,7 @@ extension WmapParser { -/// Evolution associated with a component. -public struct Evolution: Sendable, Equatable { - public let component: String - public let value: Double -} + /// Evolution associated with a component. + public struct Evolution: Sendable, Equatable { + public let component: String + public let value: Double + } } diff --git a/Sources/WmapParser/DataStructures/Group.swift b/Sources/WmapParser/DataStructures/Group.swift index 5dabc11..9a18d92 100644 --- a/Sources/WmapParser/DataStructures/Group.swift +++ b/Sources/WmapParser/DataStructures/Group.swift @@ -1,6 +1,6 @@ extension WmapParser { - /// A group of components. - public struct Group: Sendable, Equatable { - public let components: [String] - } + /// A group of components. + public struct Group: Sendable, Equatable { + public let components: [String] + } } diff --git a/Sources/WmapParser/DataStructures/Inertia.swift b/Sources/WmapParser/DataStructures/Inertia.swift index 146ad70..30cace2 100644 --- a/Sources/WmapParser/DataStructures/Inertia.swift +++ b/Sources/WmapParser/DataStructures/Inertia.swift @@ -1,6 +1,6 @@ extension WmapParser { - /// Inertia associated with a component. - public struct Inertia: Sendable, Equatable { - public let component: String - } + /// Inertia associated with a component. + public struct Inertia: Sendable, Equatable { + public let component: String + } } diff --git a/Sources/WmapParser/DataStructures/Map.swift b/Sources/WmapParser/DataStructures/Map.swift index dbb3c7d..776ba18 100644 --- a/Sources/WmapParser/DataStructures/Map.swift +++ b/Sources/WmapParser/DataStructures/Map.swift @@ -1,12 +1,12 @@ extension WmapParser { -/// A parsed wardley map. -public struct Map: Sendable { - public let components: [Component] - public let dependencies: [Dependency] - public let notes: [Note] - public let stages: [Stage] - public let groups: [Group] - public let inertias: [Inertia] - public let evolutions: [Evolution] -} + /// A parsed wardley map. + public struct Map: Sendable, Equatable { + public let components: [Component] + public let dependencies: [Dependency] + public let notes: [Note] + public let stages: [Stage] + public let groups: [Group] + public let inertias: [Inertia] + public let evolutions: [Evolution] + } } diff --git a/Sources/WmapParser/DataStructures/MapPoint.swift b/Sources/WmapParser/DataStructures/MapPoint.swift index c0eb971..7fedc00 100644 --- a/Sources/WmapParser/DataStructures/MapPoint.swift +++ b/Sources/WmapParser/DataStructures/MapPoint.swift @@ -1,7 +1,7 @@ extension WmapParser { - /// A point in the map - public struct MapPoint: Sendable, Equatable { - let xCoordinate: Double - let yCoordinate: Double - } + /// A point in the map + public struct MapPoint: Sendable, Equatable { + let xCoordinate: Double + let yCoordinate: Double + } } diff --git a/Sources/WmapParser/DataStructures/Note.swift b/Sources/WmapParser/DataStructures/Note.swift index de87979..b6184a9 100644 --- a/Sources/WmapParser/DataStructures/Note.swift +++ b/Sources/WmapParser/DataStructures/Note.swift @@ -1,7 +1,7 @@ extension WmapParser { -/// A note. -public struct Note: Sendable, Equatable { - public let text: String - public let coordinates: MapPoint -} + /// A note. + public struct Note: Sendable, Equatable { + public let text: String + public let coordinates: MapPoint + } } diff --git a/Sources/WmapParser/DataStructures/Shape.swift b/Sources/WmapParser/DataStructures/Shape.swift index 146b0e6..4870670 100644 --- a/Sources/WmapParser/DataStructures/Shape.swift +++ b/Sources/WmapParser/DataStructures/Shape.swift @@ -1,10 +1,10 @@ extension WmapParser { -/// Any of the potential shapes in a component. -@frozen -public enum Shape: Sendable, Equatable { - case circle - case xMark - case square - case triangle -} + /// Any of the potential shapes in a component. + @frozen + public enum Shape: Sendable, Equatable { + case circle + case xMark + case square + case triangle + } } diff --git a/Sources/WmapParser/DataStructures/Stage.swift b/Sources/WmapParser/DataStructures/Stage.swift index e0a99f1..87efdc1 100644 --- a/Sources/WmapParser/DataStructures/Stage.swift +++ b/Sources/WmapParser/DataStructures/Stage.swift @@ -1,7 +1,7 @@ extension WmapParser { -/// An override for the width of an evolution stage. -public struct Stage: Sendable, Equatable { - public let stage: StageNumber - public let value: Double -} + /// An override for the width of an evolution stage. + public struct Stage: Sendable, Equatable { + public let stage: StageNumber + public let value: Double + } } diff --git a/Sources/WmapParser/DataStructures/StageNumber.swift b/Sources/WmapParser/DataStructures/StageNumber.swift index 603e06b..b308742 100644 --- a/Sources/WmapParser/DataStructures/StageNumber.swift +++ b/Sources/WmapParser/DataStructures/StageNumber.swift @@ -1,10 +1,10 @@ extension WmapParser { -/// The potential stages of evolution. -@frozen -public enum StageNumber: Sendable, Equatable { - case stageI - case stageII - case stageIII - case stageIV -} + /// The potential stages of evolution. + @frozen + public enum StageNumber: Sendable, Equatable { + case stageI + case stageII + case stageIII + case stageIV + } } |