GenericList.h

From Giona

(Difference between revisions)
Line 28: Line 28:
#endif /*GENERICLIST_H_*/
#endif /*GENERICLIST_H_*/
</pre>
</pre>
 +
[[Category:Codice Sorgente]]

Revision as of 15:04, 20 June 2007

#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