using System; using System.Collections.Generic; namespace UnityEngine.Graphing { public delegate void OnGraphChange(GraphChange change); public interface IGraph : IOnAssetEnabled { IEnumerable GetNodes() where T : INode; IEnumerable edges { get; } void AddNode(INode node); void RemoveNode(INode node); IEdge Connect(SlotReference fromSlotRef, SlotReference toSlotRef); void RemoveEdge(IEdge e); void RemoveElements(IEnumerable nodes, IEnumerable edges); INode GetNodeFromGuid(Guid guid); bool ContainsNodeGuid(Guid guid); T GetNodeFromGuid(Guid guid) where T : INode; IEnumerable GetEdges(SlotReference s); void ValidateGraph(); void ReplaceWith(IGraph other); OnGraphChange onChange { get; set; } } }