diff --git a/jni/appl/Buffer/BufferManager.cpp b/jni/appl/Buffer/BufferManager.cpp index 92dd073..b9fd443 100644 --- a/jni/appl/Buffer/BufferManager.cpp +++ b/jni/appl/Buffer/BufferManager.cpp @@ -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 /** diff --git a/jni/appl/Colorize/ColorizeManager.cpp b/jni/appl/Colorize/ColorizeManager.cpp index bbd62a9..b215c56 100644 --- a/jni/appl/Colorize/ColorizeManager.cpp +++ b/jni/appl/Colorize/ColorizeManager.cpp @@ -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) { diff --git a/jni/appl/Gui/BufferView.cpp b/jni/appl/Gui/BufferView.cpp index fbb06f3..5b50871 100644 --- a/jni/appl/Gui/BufferView.cpp +++ b/jni/appl/Gui/BufferView.cpp @@ -35,8 +35,6 @@ #define __class__ "BufferView" -extern const char * const TYPE_EOBJECT_EDN_BUFFER_VIEW = "BufferView"; - BufferView::BufferView(void) { SetCanHaveFocus(true); @@ -52,39 +50,6 @@ BufferView::~BufferView(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 BufferView::CheckObjectType(const char * const objectType) -{ - if (NULL == objectType) { - EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_BUFFER_VIEW << "\" != NULL(pointer) "); - return false; - } - if (objectType == TYPE_EOBJECT_EDN_BUFFER_VIEW) { - return true; - } else { - if(true == ewol::List::CheckObjectType(objectType)) { - return true; - } - EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_BUFFER_VIEW << "\" != \"" << 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 - * @param[in] objectType type description - * @return true if the object is compatible, otherwise false - */ -const char * const BufferView::GetObjectType(void) -{ - return TYPE_EOBJECT_EDN_BUFFER_VIEW; -} /** * @brief Receive a message from an other EObject with a specific eventId and data diff --git a/jni/appl/Gui/BufferView.h b/jni/appl/Gui/BufferView.h index 566a57c..c8f18b6 100644 --- a/jni/appl/Gui/BufferView.h +++ b/jni/appl/Gui/BufferView.h @@ -31,29 +31,19 @@ #include #include -//!< EObject name : -extern const char * const TYPE_EOBJECT_EDN_BUFFER_VIEW; - class BufferView : public ewol::List { public: // Constructeur BufferView(void); ~BufferView(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); /** * @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 * @param[in] objectType type description * @return true if the object is compatible, otherwise false */ - const char * const GetObjectType(void); + const char * const GetObjectType(void) { return "ApplBufferView"; }; /** * @brief Receive a message from an other EObject with a specific eventId and data * @param[in] CallerObject Pointer on the EObject that information came from @@ -75,7 +65,6 @@ class BufferView : public ewol::List int32_t m_selectedID; }; -#define EDN_CAST_BUFFER_VIEW(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_BUFFER_VIEW,BufferView,curentPointer) #endif diff --git a/jni/appl/Gui/CodeView.cpp b/jni/appl/Gui/CodeView.cpp index 94e9f09..956e6d5 100644 --- a/jni/appl/Gui/CodeView.cpp +++ b/jni/appl/Gui/CodeView.cpp @@ -42,8 +42,6 @@ #define __class__ "CodeView" -extern const char * const TYPE_EOBJECT_EDN_CODE_VIEW = "CodeView"; - CodeView::CodeView(void) { m_label = "CodeView is disable ..."; @@ -103,41 +101,6 @@ void CodeView::UpdateNumberOfLineReference(int32_t bufferID) } -/** - * @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 CodeView::CheckObjectType(const char * const objectType) -{ - if (NULL == objectType) { - APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_CODE_VIEW << "\" != NULL(pointer) "); - return false; - } - if (objectType == TYPE_EOBJECT_EDN_CODE_VIEW) { - return true; - } else { - if(true == ewol::WidgetScrooled::CheckObjectType(objectType)) { - return true; - } - APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_CODE_VIEW << "\" != \"" << 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 - * @param[in] objectType type description - * @return true if the object is compatible, otherwise false - */ -const char * const CodeView::GetObjectType(void) -{ - return TYPE_EOBJECT_EDN_CODE_VIEW; -} - - bool CodeView::CalculateMinSize(void) { m_minSize.x = 50; diff --git a/jni/appl/Gui/CodeView.h b/jni/appl/Gui/CodeView.h index 047c107..bb120d2 100644 --- a/jni/appl/Gui/CodeView.h +++ b/jni/appl/Gui/CodeView.h @@ -34,28 +34,18 @@ #include #include -//!< EObject name : -extern const char * const TYPE_EOBJECT_EDN_CODE_VIEW; - class CodeView :public ewol::WidgetScrooled { public: CodeView(void); virtual ~CodeView(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); /** * @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 * @param[in] objectType type description * @return true if the object is compatible, otherwise false */ - const char * const GetObjectType(void); + const char * const GetObjectType(void) { return "ApplCodeView"; }; virtual bool CalculateMinSize(void); private: etk::UString m_label; @@ -116,7 +106,5 @@ class CodeView :public ewol::WidgetScrooled virtual void OnDraw(ewol::DrawProperty& displayProp); }; -#define EDN_CAST_CODE_VIEW(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_CODE_VIEW,CodeView,curentPointer) - #endif diff --git a/jni/appl/Gui/MainWindows.cpp b/jni/appl/Gui/MainWindows.cpp index 952c4c1..a7dfc34 100644 --- a/jni/appl/Gui/MainWindows.cpp +++ b/jni/appl/Gui/MainWindows.cpp @@ -116,8 +116,6 @@ class ParameterAboutGui : public ewol::SizerVert #undef __class__ #define __class__ "MainWindows" -extern const char * const TYPE_EOBJECT_EDN_MAIN_WINDOWS = __class__; - MainWindows::MainWindows(void) { APPL_DEBUG("CREATE WINDOWS ... "); @@ -231,40 +229,6 @@ MainWindows::~MainWindows(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 MainWindows::CheckObjectType(const char * const objectType) -{ - if (NULL == objectType) { - APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_MAIN_WINDOWS << "\" != NULL(pointer) "); - return false; - } - if (objectType == TYPE_EOBJECT_EDN_MAIN_WINDOWS) { - return true; - } else { - if(true == ewol::Windows::CheckObjectType(objectType)) { - return true; - } - APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_MAIN_WINDOWS << "\" != \"" << 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 - * @param[in] objectType type description - * @return true if the object is compatible, otherwise false - */ -const char * const MainWindows::GetObjectType(void) -{ - return TYPE_EOBJECT_EDN_MAIN_WINDOWS; -} - const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected"; const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected"; @@ -297,14 +261,8 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev PopUpWidgetPush(tmpWidget); tmpWidget->RegisterOnEvent(this, ewolEventFileChooserValidate, ednEventPopUpFileSelected); } else if (eventId == ednEventPopUpFileSelected) { - // get widget: - ewol::FileChooser * tmpWidget = EWOL_CAST_WIDGET_FILE_CHOOSER(CallerObject); - if (NULL == tmpWidget) { - APPL_ERROR("impossible to get pop_upWidget " << CallerObject); - return; - } // get the filename : - etk::UString tmpData = tmpWidget->GetCompleateFileName(); + etk::UString tmpData = data; APPL_DEBUG("Request opening the file : " << tmpData); SendMultiCast(ednMsgOpenFile, tmpData); } else if (eventId == ednMsgGuiSaveAs) { @@ -343,14 +301,8 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev } } } else if (eventId == ednEventPopUpFileSaveAs) { - // get widget: - ewol::FileChooser * tmpWidget = EWOL_CAST_WIDGET_FILE_CHOOSER(CallerObject); - if (NULL == tmpWidget) { - APPL_ERROR("impossible to get pop_upWidget " << CallerObject); - return; - } // get the filename : - etk::UString tmpData = tmpWidget->GetCompleateFileName(); + etk::UString tmpData = data; APPL_DEBUG("Request Saving As file : " << tmpData); BufferManager::Get(m_currentSavingAsIdBuffer)->SetFileName(tmpData); diff --git a/jni/appl/Gui/MainWindows.h b/jni/appl/Gui/MainWindows.h index 9366198..718e9d5 100644 --- a/jni/appl/Gui/MainWindows.h +++ b/jni/appl/Gui/MainWindows.h @@ -33,8 +33,6 @@ #include #include -extern const char * const TYPE_EOBJECT_EDN_MAIN_WINDOWS; - class MainWindows : public ewol::Windows { private: @@ -44,20 +42,13 @@ class MainWindows : public ewol::Windows // Constructeur MainWindows(void); ~MainWindows(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); /** * @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 * @param[in] objectType type description * @return true if the object is compatible, otherwise false */ - const char * const GetObjectType(void); + const char * const GetObjectType(void) { return "MainWindows"; }; /** * @brief Receive a message from an other EObject with a specific eventId and data * @param[in] CallerObject Pointer on the EObject that information came from diff --git a/jni/appl/Gui/Search.cpp b/jni/appl/Gui/Search.cpp index b3872e9..c10da13 100644 --- a/jni/appl/Gui/Search.cpp +++ b/jni/appl/Gui/Search.cpp @@ -37,9 +37,6 @@ #undef __class__ #define __class__ "Search" -extern const char * const TYPE_EOBJECT_APPL_SEARCH = __class__; - - const char* const l_eventSearchEntry = "appl-search-entry"; const char* const l_eventSearchEntryEnter = "appl-search-entry-enter"; const char* const l_eventReplaceEntry = "appl-replace-entry"; @@ -154,39 +151,6 @@ Search::~Search(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 Search::CheckObjectType(const char * const objectType) -{ - if (NULL == objectType) { - APPL_ERROR("check error : \"" << TYPE_EOBJECT_APPL_SEARCH << "\" != NULL(pointer) "); - return false; - } - if (objectType == TYPE_EOBJECT_APPL_SEARCH) { - return true; - } else { - if(true == ewol::SizerHori::CheckObjectType(objectType)) { - return true; - } - APPL_ERROR("check error : \"" << TYPE_EOBJECT_APPL_SEARCH << "\" != \"" << 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 - * @param[in] objectType type description - * @return true if the object is compatible, otherwise false - */ -const char * const Search::GetObjectType(void) -{ - return TYPE_EOBJECT_APPL_SEARCH; -} /** * @brief Receive a message from an other EObject with a specific eventId and data diff --git a/jni/appl/Gui/Search.h b/jni/appl/Gui/Search.h index ce833b0..a24e31e 100644 --- a/jni/appl/Gui/Search.h +++ b/jni/appl/Gui/Search.h @@ -30,28 +30,19 @@ #include #include -extern const char * const TYPE_EOBJECT_APPL_SEARCH; - class Search : public ewol::SizerHori { public: // Constructeur Search(void); ~Search(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); /** * @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 * @param[in] objectType type description * @return true if the object is compatible, otherwise false */ - const char * const GetObjectType(void); + const char * const GetObjectType(void) { return "ApplSearch"; }; /** * @brief Receive a message from an other EObject with a specific eventId and data * @param[in] CallerObject Pointer on the EObject that information came from @@ -73,8 +64,6 @@ class Search : public ewol::SizerHori ewol::Entry * m_replaceEntry; }; -#define EDN_CAST_APPL_SEARCH(curentPointer) EWOL_CAST(TYPE_EOBJECT_APPL_SEARCH,Search,curentPointer) - #endif diff --git a/jni/appl/Highlight/HighlightManager.cpp b/jni/appl/Highlight/HighlightManager.cpp index d500fa0..e8eff76 100644 --- a/jni/appl/Highlight/HighlightManager.cpp +++ b/jni/appl/Highlight/HighlightManager.cpp @@ -32,10 +32,6 @@ #undef __class__ #define __class__ "HighlightManager" - -//!< EObject name : -extern const char * const TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER = "HighlightManager"; - class localClassHighlightManager: public ewol::EObject { private: @@ -58,29 +54,6 @@ class localClassHighlightManager: public ewol::EObject listHighlight.Clear(); }; - /** - * @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) { - APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER << "\" != NULL(pointer) "); - return false; - } - if (objectType == TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER) { - return true; - } else { - if(true == ewol::EObject::CheckObjectType(objectType)) { - return true; - } - APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_HIGHLIGHT_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 @@ -89,7 +62,7 @@ class localClassHighlightManager: public ewol::EObject */ const char * const GetObjectType(void) { - return TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER; + return "ApplHighlightManager"; } /**