simplify the EObject class

This commit is contained in:
2012-07-24 17:48:18 +02:00
parent 53c34d0894
commit 64be551b35
11 changed files with 9 additions and 292 deletions

View File

@@ -31,38 +31,12 @@
#define PFX "ColorizeManager "
//!< EObject name :
extern const char * const TYPE_EOBJECT_EDN_COLORIZE_MANAGER = "ColorizeManager";
class classColorManager: public ewol::EObject
{
public:
// Constructeur
classColorManager(void);
~classColorManager(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_COLORIZE_MANAGER << "\" != NULL(pointer) ");
return false;
}
if (objectType == TYPE_EOBJECT_EDN_COLORIZE_MANAGER) {
return true;
} else {
if(true == ewol::EObject::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_COLORIZE_MANAGER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
@@ -72,7 +46,7 @@ class classColorManager: public ewol::EObject
*/
const char * const GetObjectType(void)
{
return TYPE_EOBJECT_EDN_COLORIZE_MANAGER;
return "ApplColorManager";
}
/**
* @brief Receive a message from an other EObject with a specific eventId and data
@@ -99,8 +73,6 @@ class classColorManager: public ewol::EObject
color_ts basicColors[COLOR_NUMBER_MAX];
};
#define EDN_CAST_COLORIZE_MANAGER(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_COLORIZE_MANAGER,classColorManager,curentPointer)
classColorManager::classColorManager(void)
{