using System.Collections.Generic; using FluidHTN.Compounds; using FluidHTN.Conditions; namespace FluidHTN { public interface ITask { /// /// Used for debugging and identification purposes /// string Name { get; set; } /// /// The parent of this task in the hierarchy /// ICompoundTask Parent { get; set; } /// /// The conditions that must be satisfied for this task to pass as valid. /// List Conditions { get; } /// /// Last status returned by Update /// TaskStatus LastStatus { get; } /// /// Add a new condition to the task. /// /// /// ITask AddCondition(ICondition condition); /// /// Check the task's preconditions, returns true if all preconditions are valid. /// /// /// bool IsValid(IContext ctx); DecompositionStatus OnIsValidFailed(IContext ctx); } }