/***************************************** * Instructions * - Replace 'uwuserid' with your uWaterloo User ID * - Select the current calendar term and enter the year * - List students with whom you had discussions and who helped you * * uWaterloo User ID: uwuserid @uwaterloo.ca * Submitted for ECE 250 * Department of Electrical and Computer Engineering * University of Waterloo * Calender Term of Submission: (Winter|Spring|Fall) 201N * * By submitting this file, I affirm that * I am the author of all modifications to * the provided code. * * The following is a list of uWaterloo User IDs of those students * I had discussions with in preparing this project: * - * * The following is a list of uWaterloo User IDs of those students * who helped me with this project (describe their help; e.g., debugging): * - *****************************************/ #ifndef CYCLIC_LIST_H #define CYCLIC_LIST_H #ifndef nullptr #define nullptr 0 #endif #include "ece250.h" #include "Single_node.h" #include "Exception.h" template class Cyclic_list { private: Single_node *list_head; Single_node *list_tail; int list_size; public: Cyclic_list(); Cyclic_list( Cyclic_list const & ); ~Cyclic_list(); // Accessors int size() const; bool empty() const; Type front() const; Type back() const; Single_node *head() const; Single_node *tail() const; int count( Type const & ) const; // Mutators void swap( Cyclic_list & ); Cyclic_list &operator=( Cyclic_list const & ); void push_front( Type const & ); void push_back( Type const & ); Type pop_front(); int erase( Type const & ); }; #endif