//------------------------------------------------------------------------- // 将队列移到新的队列中 // 相当于原来的list复制到新的list,原来的恢复初始值 public void MoveList(EbDoubleLinkList <TObject> pnew_list) { if (!pnew_list.Empty()) { pnew_list.Init(); pnew_list.mpHead.next = mpHead.next; pnew_list.mpHead.prev = mpHead.prev; Init(); } }
//------------------------------------------------------------------------- // 添加队列到本队列(队尾) public void AddTailList(EbDoubleLinkList <TObject> plist) { if (!plist.Empty()) { EbDoubleLinkNode <TObject> add_list_first = plist.FirstNode(); EbDoubleLinkNode <TObject> add_list_last = plist.LastNode(); plist.Init(); EbDoubleLinkNode <TObject> list_last = LastNode(); list_last.next = add_list_first; add_list_first.prev = list_last; add_list_last.next = mpHead; mpHead.prev = add_list_last; } }