using System; using System.Collections.Generic; namespace Misaki.GraphView { public interface ISlot { /// /// The slot data. /// public SlotData SlotData { get; } /// /// The linked slot datas. /// public List LinkedSlotDatas { get; } /// /// Is the slot linked with another slot. /// public bool IsLinked { get; } /// /// The owner of the slot. /// public DataNode Owner { get; } /// /// The data buffer of the slot. /// public object Data { get; } /// /// Link the current slot with another slot. /// /// The slot need to be linked /// The connection that created when link /// True if the link action is succeed, otherwise false public bool Link(ISlot other, out SlotConnection connection); /// /// Unlink the current slot with another slot.W /// /// The slot need to be unlinked public void Unlink(ISlot other); /// /// Pull data from the linked slot to current slot. /// /// The action to execute when pulling data. public void PullData(Action OnPullData); /// /// Push data from the current slot to linked slot. /// /// The action to execute when pushing data. public void PushData(Action OnPushData); /// /// Send data to the slot. /// /// The data want to send public void ReceiveData(object data); } }