#ifndef dll_h
#define dll_h
//# include <iostream>
# include <iostream.h>

template <class Atype>
class Node;

template <class Atype>
class iter;

template <class Atype>
class const_iterator;

template <class Atype>
class List
{
	
	public:
		List(){}
		List(/*const */ List & rhs ){*this =rhs;}
		~List( ){erase(begin(),end());}
	
		void 		copy( List<Atype>&);
		const List& operator=( List& rhs);
	
		//queries
		unsigned int 	size();
		bool 			isEmpty() const;//true empty ,false if more then header
		
	//iterator providers
		const const_iterator<Atype> 	cBegin() const;
		iter<Atype>			begin();
		const const_iterator<Atype>  	cEnd() const;
		iter<Atype> 		end();
		// begin returns first element of list
		// end returns one element past the last real element 
	
	//stack and queue routines
		const Atype&	front() const;
		Atype& 			front();
		const Atype&	back() const;
		Atype& 			back();
		void			push_front(const Atype&);
		void			pop_front();
		void			push_back(const Atype&);
		void			pop_back();
		//front, back throw exceptions when list is empty
		//push are special insert, pop are special erase
		//if list is empty then pop should throw exception
	
	//list modification routines
		iter<Atype> 		insert(iter<Atype>, const Atype &Atype);
		void 			erase(iter<Atype>);
		//remove item that i points at
		void			erase(iter<Atype>, iter<Atype>);
		//remove item x st i<=x<j
	
	//modifications involving antother list
		void splice(iter<Atype>, List<Atype> & );
		//insert contents of List before the location of where //runs in O(1)?
	
		//sort(List& rhs);//uses merge sort//not implemented
		
		void print(ostream& = cout) const;
		void printAll(ostream& = cout) const ;
	private:
		Node<Atype> header;
	
}; 

class ListExecption
{};//empty class didn't implement
#include "node_iter.h"
#endif
