public void PushBefore(ViRefNode2 <T> after, ViRefList2 <T> list) { if (list.Size == 0) { return; } if (after.IsAttach(list)) { return; } if (after.IsAttach() == false) { return; } ViDebuger.AssertError(after._list); ViRefList2 <T> receiveList = after._list; ViRefNode2 <T> iter = list._root._next; while (iter != list._root) { iter._list = receiveList; iter = iter._next; } ViDebuger.AssertError(receiveList != list); ViRefNode2 <T> first = list._root._next; ViRefNode2 <T> back = list._root._pre; ViRefNode2 <T> pre = after._pre; _Link(pre, first); _Link(back, after); receiveList._cnt += list.Size; list._Init(); }
internal void Attach(Callback dele, ViRefList2 <ViCallbackInterface <T0> > list) { End(); // _delegate = dele; _node.Data = this; list.PushBack(_node); }
public void PushFront(ViRefList2 <T> list) { if (list == this) { return; } PushAfter(_root, list); }
public void PushBack(ViRefList2 <T> list) { if (list == this) { return; } PushBefore(_root, list); }
public static void Update(ViGameUnit entity, ViRefList2 <ViStateConditionCallback> list) { list.BeginIterator(); while (!list.IsEnd()) { ViStateConditionCallback obj = list.CurrentNode.Data; list.Next(); ViDebuger.AssertError(obj); obj._Update(entity); } }
#pragma warning disable 0219 public static void Test() { ViRefList2 <int> list = new ViRefList2 <int>(); ViRefNode2 <int> node0 = new ViRefNode2 <int>(); node0.Data = 0; ViRefNode2 <int> node1 = new ViRefNode2 <int>(); node1.Data = 1; ViRefNode2 <int> node2 = new ViRefNode2 <int>(); node2.Data = 2; list.PushBack(node0); list.PushBack(node1); list.PushBack(node2); list.BeginIterator(); while (!list.IsEnd()) { ViRefNode2 <int> node = list.CurrentNode; list.Next(); ///<使用> ///</使用> } list.Clear(); }
internal void Attach(Callback dele, ViRefList2 <ViTupleCallbackInterface> list) { _delegate = dele; _node.Data = this; list.PushBack(_node); }
public bool IsAttach(ViRefList2 <T> list) { return(list == _list); }
public void OwnedTo(ViRefList2 <ViExpressInterface> list) { list.PushBack(_ownAttachNode); }