/*
 * This file name: queue.cpp
 *
 * This file contains the implementation of the queue container
 * class implemented with the cdlist_node toolkit for circular 
 * doubly linked lists.
 */


#include "queue.h"

namespace uprm_icom4035 {

  ///////////////////// DO NOT MODIFY THIS FUNCTION ///////////////////////
  /*
   * Prints the contents of this queue.
   * Mainly for debugging purposes. This method assumes
   * that the Item data type has overloaded the operator <<
   */
  template <typename Item>
  void queue<Item>::print_queue(ostream& out){
    cl_list_node<Item> *cursor = NULL;
    for (cursor = q_front->next; cursor != q_rear; cursor = cursor->next){
      out << cursor->data << endl;
    }
  }
  /////////////////////////////////////////////////////////////////////////
  
  ////////////////////// START ADDING YOUR CODE HERE //////////////////////

}
