Skip to content

Commit cb6608f

Browse files
committed
Delete old commented codes.
1 parent 7e6f12d commit cb6608f

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

SwiftState/StateMachine.swift

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public class StateMachine<S: StateType, E: StateEventType>
119119
for i in 1...8 {
120120
uniqueString += String(UnicodeScalar(arc4random_uniform(0xD800))) // 0xD800 = 55296 = 15.755bit
121121
}
122-
//println("uniqueString = \(uniqueString)")
123122
return uniqueString
124123
}
125124

@@ -454,26 +453,6 @@ public class StateMachine<S: StateType, E: StateEventType>
454453
return false
455454
}
456455

457-
// public func removeTransition(transition: Transition, removeHandlers: Bool = true)
458-
// {
459-
// if self._routes[transition] {
460-
// self._routes[transition] = nil
461-
// }
462-
//
463-
// if removeHandlers {
464-
// self.removeAllHandlers(inTransition: transition)
465-
// }
466-
// }
467-
//
468-
// public func removeAllTransitions(removeHandlers: Bool = true)
469-
// {
470-
// self._routes.removeAll(keepCapacity: false)
471-
//
472-
// if removeHandlers {
473-
// self.removeAllHandlers()
474-
// }
475-
// }
476-
477456
//--------------------------------------------------
478457
// MARK: - Handler
479458
//--------------------------------------------------
@@ -586,22 +565,6 @@ public class StateMachine<S: StateType, E: StateEventType>
586565
return false
587566
}
588567

589-
// public func removeAllHandlers(inTransition transition: Transition? = nil) -> Bool
590-
// {
591-
// if let transition_ = transition {
592-
// if self._handlers[transition_] != nil {
593-
// self._handlers[transition_] = nil
594-
// return true
595-
// }
596-
// }
597-
// else {
598-
// self._handlers.removeAll(keepCapacity: false)
599-
// return true
600-
// }
601-
//
602-
// return false
603-
// }
604-
605568
// MARK: addErrorHandler
606569

607570
public func addErrorHandler(handler: Handler) -> HandlerID
@@ -621,15 +584,6 @@ public class StateMachine<S: StateType, E: StateEventType>
621584
return handlerID
622585
}
623586

624-
// public func removeAllErrorHandlers() -> Bool
625-
// {
626-
// if self._errorHandlers.count > 0 {
627-
// self._errorHandlers = []
628-
// return true
629-
// }
630-
// return false
631-
// }
632-
633587
//--------------------------------------------------
634588
// MARK: - RouteChain
635589
//--------------------------------------------------
@@ -731,10 +685,6 @@ public class StateMachine<S: StateType, E: StateEventType>
731685
shouldStop = false
732686
chainingCount = 0
733687
allCount = 0
734-
// println("[RouteChain] start")
735-
}
736-
else {
737-
// println("[RouteChain] back home a while")
738688
}
739689
}
740690
}
@@ -754,7 +704,6 @@ public class StateMachine<S: StateType, E: StateEventType>
754704
if self_._canPassCondition(route.condition, transition: context.transition) {
755705
if !shouldStop {
756706
chainingCount++
757-
// println("[RouteChain] chainingCount++ =\(chainingCount), transition=\(route.transition)")
758707

759708
shouldIncrementChainingCount = false
760709
}
@@ -771,7 +720,6 @@ public class StateMachine<S: StateType, E: StateEventType>
771720

772721
if !shouldStop {
773722
allCount++
774-
// println("[RouteChain] allCount++")
775723
}
776724

777725
if chainingCount < allCount {
@@ -786,8 +734,6 @@ public class StateMachine<S: StateType, E: StateEventType>
786734
// invoke chainHandler on last route
787735
let lastRoute = chain.routes.last!
788736
handlerID = self.addHandler(lastRoute.transition, order: 200) { [weak self] context in
789-
// println("[RouteChain] finish? \(chainingCount) \(allCount) \(chain.routes.count)")
790-
791737
if let self_ = self {
792738
if self_._canPassCondition(lastRoute.condition, transition: context.transition) {
793739
if chainingCount == allCount && chainingCount == chain.routes.count && chainingCount == chain.routes.count {

0 commit comments

Comments
 (0)