GenericList.h

From Giona

Revision as of 15:03, 20 June 2007 by Rmarino (Talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
#ifndef GENERICLIST_H_
#define GENERICLIST_H_

#define GENERIC_LIST_ERR_NO 0
#define GENERIC_LIST_ERR_NULL_NODE 1
#define GENERIC_LIST_ERR_EMPTY_LIST 2
#define GENERIC_LIST_ERR_NODE_NOT_FOUND 3

class GenericList
{
public:
	GenericList();
	virtual ~GenericList();
	BOOL addNode(GenericListNode *node);
	BOOL deleteNode(GenericListNode *node);
	GenericListNode *getHead(); 
	int getLastError();
	int getLength();
private:
	GenericListNode * head;
	int length;
	int lastError;
	void deleteList();
	
};

#endif /*GENERICLIST_H_*/
Personal tools