GenericObject.h
From Giona
(Difference between revisions)
Line 11: | Line 11: | ||
#include "GenericList.h" | #include "GenericList.h" | ||
#include "GenericAttribute.h" | #include "GenericAttribute.h" | ||
+ | #include "GenericAttributeList.h" | ||
class GenericObject | class GenericObject | ||
{ | { | ||
public: | public: | ||
- | static const int ERROR_NO | + | static const int ERROR_NO = 0; |
- | static const int ERROR_NULL_PARAMETER | + | static const int ERROR_NULL_PARAMETER = 1; |
- | static const int ERROR_EMPTY_STRING | + | static const int ERROR_EMPTY_STRING = 2; |
- | static const int | + | static const int ERROR_GENERIC_ATTRIBUTE_LIST_ERROR = 3; |
GenericObject(); | GenericObject(); | ||
Line 32: | Line 33: | ||
bool setAttributeValue(STRING name, STRING value); | bool setAttributeValue(STRING name, STRING value); | ||
bool setAttributeDescription(STRING name, STRING description); | bool setAttributeDescription(STRING name, STRING description); | ||
+ | bool deleteAttibute(STRING name); | ||
STRING* getAttributeNameList(); | STRING* getAttributeNameList(); | ||
Line 37: | Line 39: | ||
STRING name; | STRING name; | ||
STRING description; | STRING description; | ||
- | + | GenericAttributeList * attributeList; | |
int lastError; | int lastError; | ||
- | |||
}; | }; | ||
+ | #endif /*GENERICOBJECT_H_*/ | ||
#endif /*GENERICOBJECT_H_*/ | #endif /*GENERICOBJECT_H_*/ | ||
Current revision as of 16:27, 19 December 2007
#ifndef GENERICOBJECT_H_ #define GENERICOBJECT_H_ #include <cstdlib> #include <cstring> #include "gionaTypes.h" #include "Debug.h" #include "GenericListNode.h" #include "GenericList.h" #include "GenericAttribute.h" #include "GenericAttributeList.h" class GenericObject { 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_GENERIC_ATTRIBUTE_LIST_ERROR = 3; GenericObject(); virtual ~GenericObject(); int getLastError(); int getAttributeNumber(); bool setName(STRING name); STRING getName(); bool setDescription(STRING description); STRING getDescription(); 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(); private: STRING name; STRING description; GenericAttributeList * attributeList; int lastError; }; #endif /*GENERICOBJECT_H_*/ #endif /*GENERICOBJECT_H_*/