PsychomatrixBase/src/main/kotlin/com/github/insanusmokrassar/PsychomatrixBase/presentation/presenters/DefaultRealisations/ModifyPsychomatrixPresenterImpl.kt

38 lines
1.8 KiB
Kotlin
Raw Normal View History

package com.github.insanusmokrassar.PsychomatrixBase.presentation.presenters.DefaultRealisations
import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.ModifyPsychomatrixUseCase
import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.PsychomatrixOperationIsConvert
2018-09-07 13:54:19 +00:00
import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.MutablePsychomatrix
import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.Psychomatrix
2018-09-07 14:24:54 +00:00
import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.operations.Operation
import com.github.insanusmokrassar.PsychomatrixBase.presentation.presenters.ModifyPsychomatrixPresenter
2019-03-15 02:54:38 +00:00
import kotlinx.coroutines.channels.ReceiveChannel
class ModifyPsychomatrixPresenterImpl(
private val modifyPsychomatrixUseCase: ModifyPsychomatrixUseCase
) : ModifyPsychomatrixPresenter {
override fun openPsychomatrixChangedSubscription(): ReceiveChannel<PsychomatrixOperationIsConvert> {
return modifyPsychomatrixUseCase.openPsychomatrixChangedSubscription()
}
2018-09-07 14:21:52 +00:00
override fun makeConvert(psychomatrix: MutablePsychomatrix, operation: Operation): Boolean {
2018-09-07 12:36:55 +00:00
return modifyPsychomatrixUseCase.makeConvert(psychomatrix, operation)
}
2018-09-07 14:21:52 +00:00
override fun makeInvert(psychomatrix: MutablePsychomatrix, operation: Operation): Boolean {
2018-09-07 14:11:54 +00:00
return modifyPsychomatrixUseCase.makeInvert(psychomatrix, operation)
}
2018-09-07 14:21:52 +00:00
override fun getConverts(psychomatrix: Psychomatrix): List<Operation> {
2018-09-07 14:11:54 +00:00
return modifyPsychomatrixUseCase.getConverts(psychomatrix)
}
2018-09-07 14:21:52 +00:00
override fun getInverts(psychomatrix: Psychomatrix): List<Operation> {
2018-09-07 14:11:54 +00:00
return modifyPsychomatrixUseCase.getInverts(psychomatrix)
}
2018-09-07 14:21:52 +00:00
override fun getPsychomatrixHistory(psychomatrix: Psychomatrix): List<Operation> {
return modifyPsychomatrixUseCase.getPsychomatrixHistory(psychomatrix)
}
}