#ifndef H_cList
#define H_cList

#include "TOOLType.h"

template<class T> class cList{
private:
	struct sListNode{
		T Data;
		sListNode *Left, *Right;
	} *Head, *Tail, *This;
	int Count;

public:
	cList();
	~cList();
	void Clear();
	int GetCount();

	bool IsEmpty();

	bool SetSelect();
	bool SelectNext();
	bool SelectPrev();
	void DeleteThis();

	void Insert(T nData);
	void Delete(T nData);
	void InsertList(cList *List);
	void Add(T nData);
	bool Get(T *nData);

};

#endif
