예제 #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;
 }