Ejemplo n.º 1
0
 //-------------------------------------------------------------------------
 public static void PushBefore(ViDoubleLinkNode2 <T> after, ViDoubleLink2 <T> list)
 {
     if (after.IsAttach() == false)
     {
         return;
     }
     if (list.IsEmpty())
     {
         return;
     }
     _PushBefore(after, list);
 }
Ejemplo n.º 2
0
 //-------------------------------------------------------------------------
 public static void PushAfter(ViDoubleLinkNode2 <T> before, ViDoubleLink2 <T> list)
 {
     if (before.IsAttach() == false)
     {
         return;
     }
     if (list.IsEmpty())
     {
         return;
     }
     _PushAfter(before, list);
 }
Ejemplo n.º 3
0
    //-------------------------------------------------------------------------
    static void _PushBefore(ViDoubleLinkNode2 <T> after, ViDoubleLink2 <T> list)
    {
        if (list.IsEmpty())
        {
            return;
        }
        ViDoubleLinkNode2 <T> first = list._root._next;
        ViDoubleLinkNode2 <T> back  = list._root._pre;
        ViDoubleLinkNode2 <T> pre   = after._pre;

        _Link(pre, first);
        _Link(back, after);
        list._Init();
    }
Ejemplo n.º 4
0
    //-------------------------------------------------------------------------
    static void _PushAfter(ViDoubleLinkNode2 <T> before, ViDoubleLink2 <T> list)
    {
        if (list.IsEmpty())
        {
            return;
        }
        ViDoubleLinkNode2 <T> first = list._root._next;
        ViDoubleLinkNode2 <T> back  = list._root._pre;
        ViDoubleLinkNode2 <T> next  = before._next;

        _Link(before, first);
        _Link(back, next);
        list._Init();
    }