コード例 #1
0
 public QueueNode CreateQueue(int frameSize)
 {
     QueueNode Q=new QueueNode();
     Q.FrameSize=frameSize;
     Q.Count=0;
     Q.Rear=Q.Front=null;
     return Q;
 }
コード例 #2
0
 public void DeQueue(ref QueueNode Q)
 {
     if (isQueueEmpty(Q)) return;
     if( Q.Front==Q.Rear)
         Q.Front =  null;
         QueueNode temp = Q.Rear;
         Q.Rear = Q.Rear.Prev;
         if (Q.Rear == null)
             Q.Rear.Next = null;
         temp = null;
         Q.Count--;
 }
コード例 #3
0
 public bool isQueueFull(QueueNode Q)
 {
     return Q.Count == Q.FrameSize;
 }
コード例 #4
0
 public bool isQueueEmpty(QueueNode Q)
 {
     return Q.Count == 0;
 }