using StandardScene.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static StandardScene.Chained.AbstractLoopMission;
namespace StandardScene.Chained.Loop
{
///
/// 进入点规则:返回是否允许进入。
///
public interface IEnterRule
{
bool CanEnter(LoopPoint point, LoopTask task, object context = null);
}
///
/// 离开点规则:返回是否允许离开。
///
public interface IExitRule
{
bool CanExit(LoopPoint point, LoopTask task, object context = null);
}
///
/// 合流规则:从候选任务中选择一个
///
public interface IJoinRule
{
LoopTask SelectJoin(IEnumerable candidates, LoopPoint point);
}
///
/// 分流规则:为任务选取下一分支标识
///
public interface IBranchRule
{
string SelectBranch(LoopPoint point, LoopTask task, object context = null);
}
///
/// 任务策略接口:提供任务数据来源与基础策略决策(由 LoopViewer 或其它组件实现/替换)。
///
public interface ITaskStrategy
{
///
/// 返回当前策略下的任务集合(策略负责数据来源,例如读取 LoopViewer 的 JSON)。
///
IEnumerable GetTasks();
///
/// 刷新策略数据(例如重新加载 JSON)。
///
void Refresh();
}
}