Skip to content

Commit

Permalink
Add final modifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
inamiy committed Nov 28, 2015
1 parent 12cb3b8 commit 7333177
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 15 deletions.
4 changes: 4 additions & 0 deletions SwiftState.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
1F198C5C19972320001C3700 /* QiitaTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F198C5B19972320001C3700 /* QiitaTests.swift */; };
1F1F74BC1C09FAA000675EAA /* ChainHandlerID.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1F74BB1C09FAA000675EAA /* ChainHandlerID.swift */; };
1F24C72C19D068B900C2FDC7 /* SwiftState.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4872D5AC19B4211900F326B5 /* SwiftState.framework */; };
1F27771E1BE68D1D00C57CC9 /* RouteMappingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F27771C1BE68C7F00C57CC9 /* RouteMappingTests.swift */; };
1F27771F1BE68D1E00C57CC9 /* RouteMappingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F27771C1BE68C7F00C57CC9 /* RouteMappingTests.swift */; };
Expand Down Expand Up @@ -73,6 +74,7 @@

/* Begin PBXFileReference section */
1F198C5B19972320001C3700 /* QiitaTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QiitaTests.swift; sourceTree = "<group>"; };
1F1F74BB1C09FAA000675EAA /* ChainHandlerID.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChainHandlerID.swift; sourceTree = "<group>"; };
1F27771C1BE68C7F00C57CC9 /* RouteMappingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteMappingTests.swift; sourceTree = "<group>"; };
1F70FB651BF0F46000E5AC8C /* RouteID.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteID.swift; sourceTree = "<group>"; };
1F70FB681BF0F46E00E5AC8C /* RouteChainID.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteChainID.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -146,6 +148,7 @@
1F70FB681BF0F46E00E5AC8C /* RouteChainID.swift */,
1F70FB6B1BF0F47700E5AC8C /* RouteMappingID.swift */,
1F70FB6E1BF0F59600E5AC8C /* HandlerID.swift */,
1F1F74BB1C09FAA000675EAA /* ChainHandlerID.swift */,
);
name = Identifiers;
sourceTree = "<group>";
Expand Down Expand Up @@ -423,6 +426,7 @@
1FA620241996606300460108 /* Transition.swift in Sources */,
1F70FB661BF0F46000E5AC8C /* RouteID.swift in Sources */,
1FA620201996606300460108 /* EventType.swift in Sources */,
1F1F74BC1C09FAA000675EAA /* ChainHandlerID.swift in Sources */,
1F70FB6C1BF0F47700E5AC8C /* RouteMappingID.swift in Sources */,
1FA620221996606300460108 /* Route.swift in Sources */,
1F70FB6F1BF0F59600E5AC8C /* HandlerID.swift in Sources */,
Expand Down
17 changes: 17 additions & 0 deletions SwiftState/ChainHandlerID.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ChainHandlerID.swift
// SwiftState
//
// Created by Yasuhiro Inami on 2015-11-29.
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
//

public final class ChainHandlerID<S: StateType, E: EventType>
{
internal let bundledHandlerIDs: [HandlerID<S, E>]

internal init(bundledHandlerIDs: [HandlerID<S, E>])
{
self.bundledHandlerIDs = bundledHandlerIDs
}
}
12 changes: 1 addition & 11 deletions SwiftState/HandlerID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
//

public class HandlerID<S: StateType, E: EventType>
public final class HandlerID<S: StateType, E: EventType>
{
/// - Note: `nil` is used for error-handlerID
internal let transition: Transition<S>?
Expand All @@ -18,14 +18,4 @@ public class HandlerID<S: StateType, E: EventType>
self.transition = transition
self.key = key
}
}

public class ChainHandlerID<S: StateType, E: EventType>
{
internal let bundledHandlerIDs: [HandlerID<S, E>]

internal init(bundledHandlerIDs: [HandlerID<S, E>])
{
self.bundledHandlerIDs = bundledHandlerIDs
}
}
2 changes: 1 addition & 1 deletion SwiftState/Machine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Darwin
public typealias HandlerOrder = UInt8
private let _defaultOrder: HandlerOrder = 100

public class Machine<S: StateType, E: EventType>
public final class Machine<S: StateType, E: EventType>
{
// NOTE: `event = nil` is equivalent to `_Event.None`, which happens when non-event-based transition e.g. `tryState()` occurs.
public typealias Context = (event: E?, fromState: S, toState: S, userInfo: Any?)
Expand Down
2 changes: 1 addition & 1 deletion SwiftState/RouteChainID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
//

public class RouteChainID<S: StateType, E: EventType>
public final class RouteChainID<S: StateType, E: EventType>
{
internal let bundledRouteIDs: [RouteID<S, E>]?

Expand Down
2 changes: 1 addition & 1 deletion SwiftState/RouteID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
//

public class RouteID<S: StateType, E: EventType>
public final class RouteID<S: StateType, E: EventType>
{
internal let event: _Event<E>
internal let transition: Transition<S>
Expand Down
2 changes: 1 addition & 1 deletion SwiftState/RouteMappingID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Yasuhiro Inami. All rights reserved.
//

public class RouteMappingID
public final class RouteMappingID
{
internal let key: String

Expand Down

0 comments on commit 7333177

Please sign in to comment.