GenericAttributeList.h

From Giona

(Difference between revisions)
 
Line 1: Line 1:
 +
<pre>
 +
#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_*/
 +
 +
</pre>
[[Il database Object Oriented Generico|BACK]]
[[Il database Object Oriented Generico|BACK]]
[[Category:Codice Sorgente]]
[[Category:Codice Sorgente]]

Current revision as of 16:25, 19 December 2007

#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