/***************************************** * 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 SINGLE_LIST_H #define SINGLE_LIST_H #ifndef nullptr #define nullptr 0 #endif #include "ece250.h" #include "Single_node.h" #include "Exception.h" #include template class Sorted_single_list { private: Single_node *list_head; Single_node *list_tail; int list_size; public: Sorted_single_list(); Sorted_single_list( Sorted_single_list const & ); ~Sorted_single_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( Sorted_single_list & ); Sorted_single_list &operator=( Sorted_single_list const & ); void insert( Type const & ); Type pop_front(); int erase( Type const & ); // Friends template friend std::ostream &operator<<( std::ostream &, Sorted_single_list const & ); }; #endif