Ejemplo n.º 1
0
        /// <summary>
        /// Remove bottom queued run.
        /// </summary>
        /// <returns>The botttom queued run.</returns>
        public QueuedRun Dequeue()
        {
            QueuedRun bottom = store[start];

            start = (start + 1) % size;
            count--;
            return(bottom);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Add a Run to the queue.
 /// </summary>
 /// <param name="run"></param>
 public void Enqueue(Run run)
 {
     store[(start + count) % size] = new QueuedRun(run);
     //runLengths[(start + count) % size] = run.Text.Length;
     if (count < size)
     {
         count++;
     }
     else
     {
         start = (start + 1) % size;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Add a Run to the queue.
 /// </summary>
 /// <param name="run"></param>
 public void Enqueue(Run run)
 {
     store[(start + count) % size] = new QueuedRun(run);
     //runLengths[(start + count) % size] = run.Text.Length;
     if (count < size)
         count++;
     else
         start = (start+1)%size;
 }
Ejemplo n.º 4
0
 public void TestQueuedRun()
 {
     QueuedRun qr = new QueuedRun(new Run("1234"));
     qr.RegisterHit( 2);
     Assert.AreEqual("\n\n34", qr.HitAvailableText);
 }