#pragma warning disable 0219 public static void Test() { ViDoubleLink2 <int> list = new ViDoubleLink2 <int>(); { ViDoubleLinkNode2 <int> node1 = new ViDoubleLinkNode2 <int>(); node1.Data = 1; ViDoubleLinkNode2 <int> node2 = new ViDoubleLinkNode2 <int>(); node2.Data = 2; list.PushBack(node1); list.PushBack(node2); {//<正向迭代> ViDoubleLinkNode2 <int> iter = list.GetHead(); while (!list.IsEnd(iter)) { int value = iter.Data; ViDoubleLink2 <int> .Next(ref iter); } } {//<反向迭代> ViDoubleLinkNode2 <int> iter = list.GetTail(); while (!list.IsEnd(iter)) { int value = iter.Data; ViDoubleLink2 <int> .Pre(ref iter); } } } }
//------------------------------------------------------------------------- void _AddToClose(ViAstarStep step) { step.State = ViAstarStepState.CLOSE; _closeList.PushBack(step.AttachNode); }
//------------------------------------------------------------------------- void _AddToOpen(ViAstarStep step) { _openList.PushBack(step.AttachNode); step.State = ViAstarStepState.OPEN; _openHeap.Push(step); }
protected void _AttachAsyn() { _node.Data = this; _AsynExecList.PushBack(_node); }