#include<iostream.h>

#define DEFINE_TEMPLATE
#include<LINK/basic/DList.h>
#undef DEFINE_TEMPLATE

// It's important that any header file *not* defining new templates be included
// *after* all those defining templates.  The reason is that nested includes
// of higher level classes such as Container and Iterator must be included
// along with their method *definitions* (.cc files).  Once a header is 
// included, a flag is set so that it cannot be multiply included.  If, in
// this example, List.h had been included first, the Container and Iterator
// methods for the new element type List<int>* would be undefined.

#include<LINK/basic/List.h>

template class Container<List<int>* >;
template class Iterator<List<int>* >;
template class DList<List<int>* >;

main()
{
	DList<List<int>* > dl;
	List<int> l, l2;

	l.insert(5); l2.insert(0);
	dl.insert(&l);
	dl.insert(&l2);

	//l2.remove(19);
	//List<int>* l3 = dl.pred(&l2);
	//l3->append(19);

	ContainerNode *cn= dl.search(dl.first());
	dl.unlink(cn);	
	//dl.insert(cn);	


	cout << l << endl; 
	cout << l2 << endl; 
	cout << dl << endl; 
}
