-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refactoring] Move files into folders (breaking change)
This will break existing client code. But I have to store files in more structured way
- Loading branch information
Showing
94 changed files
with
707 additions
and
279 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...hine/CoroutinesLibCoroutineAbstraction.kt → ...ines/CoroutinesLibCoroutineAbstraction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package ru.nsk.kstatemachine | ||
package ru.nsk.kstatemachine.coroutines | ||
|
||
import kotlinx.coroutines.* | ||
|
||
|
5 changes: 4 additions & 1 deletion
5
...k/kstatemachine/CoroutinesStateMachine.kt → ...ne/statemachine/CoroutinesStateMachine.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
.../ru/nsk/kstatemachine/StateMachineFlow.kt → ...emachine/statemachine/StateMachineFlow.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
kstatemachine/src/commonMain/kotlin/ru/nsk/kstatemachine/DefaultState.kt
This file was deleted.
Oops, something went wrong.
6 changes: 5 additions & 1 deletion
6
kstatemachine/src/commonMain/kotlin/ru/nsk/kstatemachine/LibraryUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 16 additions & 3 deletions
19
kstatemachine/src/commonMain/kotlin/ru/nsk/kstatemachine/StateMachine.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
kstatemachine/src/commonMain/kotlin/ru/nsk/kstatemachine/TreeAlgorithms.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
...nsk/kstatemachine/CoroutineAbstraction.kt → ...achine/coroutines/CoroutineAbstraction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...lin/ru/nsk/kstatemachine/DataExtractor.kt → .../nsk/kstatemachine/event/DataExtractor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...tlin/ru/nsk/kstatemachine/EventMatcher.kt → ...u/nsk/kstatemachine/event/EventMatcher.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...n/kotlin/ru/nsk/kstatemachine/MetaInfo.kt → ...ru/nsk/kstatemachine/metainfo/MetaInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 13 additions & 5 deletions
18
...lin/ru/nsk/kstatemachine/BaseStateImpl.kt → .../nsk/kstatemachine/state/BaseStateImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
.../ru/nsk/kstatemachine/DefaultDataState.kt → ...k/kstatemachine/state/DefaultDataState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
kstatemachine/src/commonMain/kotlin/ru/nsk/kstatemachine/state/DefaultState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package ru.nsk.kstatemachine.state | ||
|
||
import ru.nsk.kstatemachine.state.ChildMode.EXCLUSIVE | ||
|
||
/** | ||
* The most common state | ||
*/ | ||
open class DefaultState(name: String? = null, childMode: ChildMode = EXCLUSIVE) : | ||
BaseStateImpl(name, childMode), State | ||
|
||
open class DefaultFinalState(name: String? = null) : DefaultState(name), FinalState |
16 changes: 14 additions & 2 deletions
16
...ain/kotlin/ru/nsk/kstatemachine/IState.kt → ...tlin/ru/nsk/kstatemachine/state/IState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...lin/ru/nsk/kstatemachine/InternalState.kt → .../nsk/kstatemachine/state/InternalState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...u/nsk/kstatemachine/StateGroupListener.kt → ...kstatemachine/state/StateGroupListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
...lin/ru/nsk/kstatemachine/StateListener.kt → .../nsk/kstatemachine/state/StateListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
...u/nsk/kstatemachine/TransitionStateApi.kt → ...kstatemachine/state/TransitionStateApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
kstatemachine/src/commonMain/kotlin/ru/nsk/kstatemachine/state/pseudo/BasePseudoState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package ru.nsk.kstatemachine.state.pseudo | ||
|
||
import ru.nsk.kstatemachine.event.Event | ||
import ru.nsk.kstatemachine.state.* | ||
import ru.nsk.kstatemachine.transition.Transition | ||
import ru.nsk.kstatemachine.transition.TransitionParams | ||
|
||
open class BasePseudoState(name: String?) : BaseStateImpl(name, ChildMode.EXCLUSIVE), PseudoState { | ||
override suspend fun doEnter(transitionParams: TransitionParams<*>) = internalError() | ||
override suspend fun doExit(transitionParams: TransitionParams<*>) = internalError() | ||
|
||
override fun <L : IState.Listener> addListener(listener: L) = | ||
throw UnsupportedOperationException("PseudoState $this can not have listeners") | ||
|
||
override fun <S : IState> addState(state: S, init: StateBlock<S>?) = | ||
throw UnsupportedOperationException("PseudoState $this can not have child states") | ||
|
||
|
||
override fun <E : Event> addTransition(transition: Transition<E>) = | ||
throw UnsupportedOperationException("PseudoState $this can not have transitions") | ||
|
||
private fun internalError(): Nothing = | ||
error("Internal error, PseudoState $this can not be entered or exited, looks that machine is purely configured") | ||
} |
Oops, something went wrong.