GenericAttribute.h

From Giona

(Difference between revisions)
 
(4 intermediate revisions not shown)
Line 3: Line 3:
#define GENERICATTRIBUTE_H_
#define GENERICATTRIBUTE_H_
-
 
+
#include <cstring>
 +
#include "gionaTypes.h"
 +
#include "Debug.h"
class GenericAttribute
class GenericAttribute
{
{
public:
public:
 +
 +
static const int ERROR_NO = 0;
 +
static const int ERROR_NULL_PARAMETER = 1;
 +
static const int ERROR_EMPTY_STRING = 2;
 +
GenericAttribute();
GenericAttribute();
virtual ~GenericAttribute();
virtual ~GenericAttribute();
-
void setName(STRING name);
+
bool setName(STRING name);
STRING getName();
STRING getName();
-
void setValue(STRING value);
+
bool setValue(STRING value);
STRING getValue();
STRING getValue();
-
void setDescription(STRING description);
+
bool setDescription(STRING description);
STRING getDescription();
STRING getDescription();
 +
 +
int getLastError();
private:
private:
Line 22: Line 31:
STRING value;
STRING value;
STRING description;
STRING description;
 +
int lastError;
};
};
#endif /*GENERICATTRIBUTE_H_*/
#endif /*GENERICATTRIBUTE_H_*/
 +
</pre>
</pre>
 +
 +
[[Il database Object Oriented Generico|BACK]]
 +
[[Category:Codice Sorgente]]

Current revision as of 16:56, 13 December 2007

#ifndef GENERICATTRIBUTE_H_
#define GENERICATTRIBUTE_H_

#include <cstring>
#include "gionaTypes.h"
#include "Debug.h"

class GenericAttribute
{
public:
	
	static const int ERROR_NO = 0;
	static const int ERROR_NULL_PARAMETER = 1;
	static const int ERROR_EMPTY_STRING = 2;
	
	GenericAttribute();
	virtual ~GenericAttribute();
	
	bool setName(STRING name);
	STRING getName();
	bool setValue(STRING value);
	STRING getValue();
	bool setDescription(STRING description);
	STRING getDescription();
	
	int getLastError();
	
private:
	STRING name;
	STRING value;
	STRING description;
	int lastError;
};

#endif /*GENERICATTRIBUTE_H_*/

BACK

Personal tools