/* This class specifies the basic operation on a queue as a linked list */ #ifndef DATA_STRUCTURES_QUEUE_QUEUE_H_ #define DATA_STRUCTURES_QUEUE_QUEUE_H_ /** Definition of the node */ template struct node { Kind data; node *next; }; /** Definition of the queue class */ template class queue { public: void display(); /**< Show queue */ queue(); /**< Default constructor*/ ~queue(); /**< Destructor */ bool isEmptyQueue(); /**< Determine whether the queue is empty */ void enQueue(Kind item); /**< Add new item to the queue */ Kind front(); /**< Return the first element of the queue */ void deQueue(); /**< Remove the top element of the queue */ void clear(); private: node *queueFront; /**< Pointer to the front of the queue */ node *queueRear; /**< Pointer to the rear of the queue */ int size; }; #endif // DATA_STRUCTURES_QUEUE_QUEUE_H_