/***************************************** * 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 DOUBLE_LIST_H #define DOUBLE_LIST_H #ifndef nullptr #define nullptr 0 #endif #include "ece250.h" #include "Double_node.h" #include "Exception.h" #ifndef nullptr #define nullptr 0 #endif template class Double_list { private: Double_node *list_head; Double_node *list_tail; int list_size; public: Double_list(); Double_list( Double_list const & ); ~Double_list(); // Accessors int size() const; bool empty() const; Type front() const; Type back() const; Double_node *head() const; Double_node *tail() const; int count( Type const & ) const; // Mutators void swap( Double_list & ); Double_list &operator=( Double_list const & ); void push_front( Type const & ); void push_back( Type const & ); Type pop_front(); Type pop_back(); int erase( Type const & ); // Friends template friend std::ostream &operator<<( std::ostream &, Double_list const & ); }; #endif