GenericAttributeList.h

From Giona

Revision as of 16:25, 19 December 2007 by Rmarino (Talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
#ifndef GENERICATTRIBUTELIST_H_
#define GENERICATTRIBUTELIST_H_

#include <cstring>
#include "gionaTypes.h"
#include "Debug.h"
#include "GenericListNode.h"
#include "GenericList.h"
#include "GenericAttribute.h"


class GenericAttributeList
{
public:
	static const int ERROR_NO 			= 0;
	static const int ERROR_NULL_PARAMETER 		= 1;
	static const int ERROR_EMPTY_STRING 		= 2;
	static const int ERROR_ATTRIBUTE_NOT_FOUND 	= 3;
	static const int ERROR_GENERIC_LIST_ERROR 	= 4;
	
	
	GenericAttributeList();
	virtual ~GenericAttributeList();
	int getAttributeNumber();
	STRING getAttributeValue(STRING name);
	STRING getAttributeDescription(STRING name);
	bool setAttributeValue(STRING name, STRING value);
	bool setAttributeDescription(STRING name, STRING description);
	bool deleteAttibute(STRING name);
	STRING* getAttributeNameList();
	int getLastError();
private:
	int lastError;
	GenericList* attributeList;
	GenericAttribute* getAttribute(STRING name);
};

#endif /*GENERICATTRIBUTELIST_H_*/

BACK

Personal tools