simplify the EObject class
This commit is contained in:
@@ -33,39 +33,12 @@
|
||||
#undef __class__
|
||||
#define __class__ "classBufferManager"
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_BUFFER_MANAGER = "BufferManager";
|
||||
|
||||
class classBufferManager: public ewol::EObject
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
classBufferManager(void);
|
||||
~classBufferManager(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_BUFFER_MANAGER << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_EDN_BUFFER_MANAGER) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::EObject::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_BUFFER_MANAGER << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the current Object type of the EObject
|
||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
||||
@@ -74,7 +47,7 @@ class classBufferManager: public ewol::EObject
|
||||
*/
|
||||
const char * const GetObjectType(void)
|
||||
{
|
||||
return TYPE_EOBJECT_EDN_BUFFER_MANAGER;
|
||||
return "ApplBufferManager";
|
||||
}
|
||||
public:
|
||||
/**
|
||||
@@ -114,8 +87,6 @@ class classBufferManager: public ewol::EObject
|
||||
Buffer * BufferNotExiste; //!< When an error arrive in get buffer we return the Error buffer (not writable)
|
||||
};
|
||||
|
||||
#define EDN_CAST_BUFFER_MANAGER(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_BUFFER_MANAGER,classBufferManager,curentPointer)
|
||||
|
||||
|
||||
// Constructeur
|
||||
/**
|
||||
|
Reference in New Issue
Block a user