Перенос.

This commit is contained in:
2023-09-17 22:13:42 +03:00
parent dd2e0ca7e0
commit 629d8b8477
1239 changed files with 61161 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
package GlobalData.Tasks.Passes;
import Common.Current;
import Common.Global;
import GlobalData.Tasks.Supervisor.TaskSupervisor;
import Visual_DVM_2021.Passes.ProcessPass;
public abstract class TaskLocalPass<S extends TaskSupervisor> extends ProcessPass {
public S supervisor; //инициализация идет в конструкторе потомка.
public TaskLocalPass(Class<S> s_class) {
try {
supervisor = s_class.newInstance();
} catch (Exception e) {
Global.Log.PrintException(e);
}
}
@Override
protected boolean needsAnimation() {
return true;
}
@Override
protected void body() throws Exception {
supervisor.PerformTask();
}
@Override
protected void performFinish() throws Exception {
supervisor.UpdateTask();
}
@Override
public void Interrupt() throws Exception {
Current.getProject().CreateInterruptFile();
}
}