/***************************************** * 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 NAVIGATION_STACK_H #define NAVIGATION_STACK_H #ifndef nullptr #define nullptr 0 #endif #include "ece250.h" #include "Single_list.h" #include "Exception.h" template class Navigation_stack { private: Single_list undo_stack; Single_list redo_stack; public: bool can_undo() const; bool can_redo() const; void swap( Navigation_stack & ); Navigation_stack &operator=( Navigation_stack const & ); void event( Type const & ); Type undo(); Type redo(); void clear(); }; template bool Navigation_stack::can_undo() const { // Enter your implementation here. return false; } template bool Navigation_stack::can_redo() const { // Enter your implementation here. return false; } template void Navigation_stack::swap( Navigation_stack &stack ) { std::swap( undo_stack, stack.undo_stack ); std::swap( redo_stack, stack.redo_stack ); } template Navigation_stack &Navigation_stack::operator=( Navigation_stack const &rhs ) { Navigation_stack copy( rhs ); swap( copy ); return *this; } template void Navigation_stack::event( Type const &obj ) { // Enter your implementation here. } template Type Navigation_stack::undo() { // Enter your implementation here. return Type(); } template Type Navigation_stack::redo() { // Enter your implementation here. return Type(); } template void Navigation_stack::clear() { // Enter your implementation here. } // You can modify this function however you want: it will not be tested template std::ostream &operator<<( std::ostream &out, Navigation_stack const &stack ) { // write code to output stack out << " "; return out; } #endif