Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cc6bc8f
[Test] Add FrogcjnTest (event + associated value).
inamiy Nov 1, 2015
ef07416
Refactor code for better typing, naming, and routeMapping support.
inamiy Nov 14, 2015
465146a
[Test] Remove unnecessary `case Any`.
inamiy Nov 14, 2015
da9b9b4
Remove unnecessary methods.
inamiy Nov 24, 2015
c9f6db9
Add comment.
inamiy Nov 24, 2015
32630e2
Rename `Mapping` to `RouteMapping`.
inamiy Nov 24, 2015
93f184b
[Test] Organize tests.
inamiy Nov 24, 2015
bfd9ed2
Remove verbose methods in `Transition` & `Route`.
inamiy Nov 24, 2015
439d5a8
Organize code.
inamiy Nov 28, 2015
12cb3b8
[Test] Add testHasRoute_anyEvent()
inamiy Nov 28, 2015
2eeff1f
Add `final` modifiers.
inamiy Nov 28, 2015
1be6782
[Test] Re-add HierarchicalMachineTests which was deleted in ef07416.
inamiy Nov 29, 2015
8e093da
Update README.md & BasicTests.
inamiy Nov 30, 2015
2986012
Resize logo.png
inamiy Nov 30, 2015
f7ce748
Refactor code by separating event-only-driven `Machine` and `StateMac…
inamiy Dec 5, 2015
8ade68e
[Test] Add more RouteMapping tests.
inamiy Dec 5, 2015
e9c1bf3
[Test] Improve 8ade68e & update README.md
inamiy Dec 5, 2015
c1c18ec
Add `addStateRouteMapping()` & rename `EventRouteMapping` to `RouteMa…
inamiy Dec 7, 2015
b42ac6d
Update README.md
inamiy Dec 7, 2015
4c15f86
Conform State<S> & Event<E> to RawRepresentable.
inamiy Dec 8, 2015
edc0f3e
Set codeCoverageEnabled=YES.
inamiy Dec 8, 2015
2c9844f
[Test] Add StateTests & EventTests.
inamiy Dec 8, 2015
ce2ef2a
Fix RouteMapping + handler.
inamiy Dec 8, 2015
56b8c76
Simplify `machine.addRoutes()`.
inamiy Dec 8, 2015
e49b1c6
[Test] Improve code coverage.
inamiy Dec 8, 2015
c1751bf
Create universal framework to support watchOS & tvOS by using xcconfigs.
inamiy Dec 8, 2015
c6b59e4
Merge pull request #38 from ReactKit/universal-framework
inamiy Dec 8, 2015
83af536
Remove unnecessary xcodeproj settings.
inamiy Dec 9, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add final modifiers.
  • Loading branch information
inamiy committed Nov 28, 2015
commit 2eeff1fecf589d6c3cf8942ef3de17293e54e36f
6 changes: 6 additions & 0 deletions SwiftState.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* 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 */; };
1F1F74C01C0A017E00675EAA /* 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 +75,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 +149,7 @@
1F70FB681BF0F46E00E5AC8C /* RouteChainID.swift */,
1F70FB6B1BF0F47700E5AC8C /* RouteMappingID.swift */,
1F70FB6E1BF0F59600E5AC8C /* HandlerID.swift */,
1F1F74BB1C09FAA000675EAA /* ChainHandlerID.swift */,
);
name = Identifiers;
sourceTree = "<group>";
Expand Down Expand Up @@ -423,6 +427,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 Expand Up @@ -481,6 +486,7 @@
48797D6019B42CCE0085D80F /* TransitionChain.swift in Sources */,
1F70FB671BF0F46000E5AC8C /* RouteID.swift in Sources */,
48797D5F19B42CCE0085D80F /* Transition.swift in Sources */,
1F1F74C01C0A017E00675EAA /* ChainHandlerID.swift in Sources */,
1F70FB6D1BF0F47700E5AC8C /* RouteMappingID.swift in Sources */,
48797D6319B42CD40085D80F /* StateType.swift in Sources */,
1F70FB701BF0F59600E5AC8C /* 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