From da86c06fdf52a44b5d114989abfd02eec11635b8 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 5 Jul 2016 20:12:05 +0900 Subject: [PATCH] remove explicit namespace usage. Removed explicit namespace usage in open headers. This won't make apps in trouble if they were using duplicated name classes among different libraries. Let apps choose those classes specifically by themseleves. Change-Id: I620b7183a93ee14e021ed6a1741a556bea83a89e --- src/examples/efl/cpp/main.h | 2 ++ src/include/efl/UiBaseOverlay.h | 2 +- src/include/efl/UiBaseView.h | 2 +- src/include/efl/UiBaseViewManager.h | 4 +--- src/include/efl/UiBaseViewmgr.h | 2 +- src/include/efl/mobile/UiApp.h | 2 +- src/include/efl/mobile/UiKeyListener.h | 2 +- src/include/efl/mobile/UiMenu.h | 2 +- src/include/efl/mobile/UiMobileViewManager.h | 2 +- src/include/efl/mobile/UiPopup.h | 2 +- src/include/efl/mobile/UiStandardView.h | 2 +- src/include/efl/mobile/UiView.h | 2 +- src/include/efl/mobile/UiViewmgr.h | 2 +- src/include/interface/UiIfaceViewManager.h | 8 +------- src/lib/efl/UiBaseKeyListener.cpp | 3 +++ src/lib/efl/UiBaseOverlay.cpp | 3 +++ src/lib/efl/UiBaseView.cpp | 2 ++ src/lib/efl/UiBaseViewmgr.cpp | 3 ++- src/lib/efl/mobile/UiApp.cpp | 3 +++ src/lib/efl/mobile/UiKeyListener.cpp | 3 +++ src/lib/efl/mobile/UiMenu.cpp | 3 +++ src/lib/efl/mobile/UiPopup.cpp | 3 +++ src/lib/efl/mobile/UiStandardView.cpp | 3 +++ src/lib/efl/mobile/UiView.cpp | 3 +++ src/lib/efl/mobile/UiViewmgr.cpp | 3 +++ src/lib/interface/UiIfaceApp.cpp | 2 ++ src/lib/interface/UiIfaceOverlay.cpp | 1 + src/lib/interface/UiIfaceView.cpp | 1 + src/lib/interface/UiIfaceViewmgr.cpp | 1 + 29 files changed, 51 insertions(+), 22 deletions(-) diff --git a/src/examples/efl/cpp/main.h b/src/examples/efl/cpp/main.h index 814b83c..fd553b1 100644 --- a/src/examples/efl/cpp/main.h +++ b/src/examples/efl/cpp/main.h @@ -31,6 +31,8 @@ #define PACKAGE "ui-viewmgr" #endif +using namespace efl_viewmanager; + Evas_Object *createLandscapeContent(Evas_Object *parent, const char *text, Evas_Smart_Cb _prevBtnClickedCb, Evas_Smart_Cb _nextBtnClickedCb); Evas_Object *createContent(Evas_Object *parent, const char *text, Evas_Smart_Cb _prevBtnClickedCb, Evas_Smart_Cb _nexBtnClickedCb); Evas_Object *createScrollingContent(Evas_Object *parent); diff --git a/src/include/efl/UiBaseOverlay.h b/src/include/efl/UiBaseOverlay.h index 9538e93..ce8a413 100644 --- a/src/include/efl/UiBaseOverlay.h +++ b/src/include/efl/UiBaseOverlay.h @@ -32,7 +32,7 @@ class UiBaseView; * UiBaseView. UiBaseOverlay is nothing more than UiIfaceOverlay in behavior perspective. It just comes out with renaming class for adapting with * other EFL base classes. */ -class UiBaseOverlay: public UiIfaceOverlay +class UiBaseOverlay: public ui_viewmanager::UiIfaceOverlay { protected: /** diff --git a/src/include/efl/UiBaseView.h b/src/include/efl/UiBaseView.h index 545ba81..72ddf85 100644 --- a/src/include/efl/UiBaseView.h +++ b/src/include/efl/UiBaseView.h @@ -28,7 +28,7 @@ namespace efl_viewmanager * @brief This is a base class of EFL view. Typically, this view extends UiIfaceView and implements basic behaviors for EFL view in all profiles. * A view must have one Evas_Object content instance which represents a view for a current screen. */ -class UiBaseView: public UiIfaceView +class UiBaseView: public ui_viewmanager::UiIfaceView { public: /** diff --git a/src/include/efl/UiBaseViewManager.h b/src/include/efl/UiBaseViewManager.h index 5f68d9a..cc28255 100644 --- a/src/include/efl/UiBaseViewManager.h +++ b/src/include/efl/UiBaseViewManager.h @@ -28,8 +28,6 @@ #include "UiBaseViewmgr.h" #include "UiBaseView.h" -#define UI_BASE_VIEWMGR dynamic_cast(UiIfaceViewmgr::getInstance()) - -using namespace efl_viewmanager; +#define UI_BASE_VIEWMGR dynamic_cast(ui_viewmanager::UiIfaceViewmgr::getInstance()) #endif /* UI_BASE_VIEWMANAGER_H */ diff --git a/src/include/efl/UiBaseViewmgr.h b/src/include/efl/UiBaseViewmgr.h index 37ebbe7..8b89e44 100644 --- a/src/include/efl/UiBaseViewmgr.h +++ b/src/include/efl/UiBaseViewmgr.h @@ -35,7 +35,7 @@ class UiBaseView; * * @warning viewmgr will remove its window, conformant and default layout when it's destroyed. */ -class UiBaseViewmgr: public UiIfaceViewmgr +class UiBaseViewmgr: public ui_viewmanager::UiIfaceViewmgr { public: /** diff --git a/src/include/efl/mobile/UiApp.h b/src/include/efl/mobile/UiApp.h index da0b436..ab8febd 100644 --- a/src/include/efl/mobile/UiApp.h +++ b/src/include/efl/mobile/UiApp.h @@ -33,7 +33,7 @@ class UiViewmgr; * interfaces such as low_baterry(), low_meomory(), lang_changed(), region_changed() and so on. UiIfaceApp create an unique UiViewmgr instance * internally, and manage its life. */ -class UiApp : public UiIfaceApp +class UiApp : public ui_viewmanager::UiIfaceApp { public: /** diff --git a/src/include/efl/mobile/UiKeyListener.h b/src/include/efl/mobile/UiKeyListener.h index 306a4ce..d77faeb 100644 --- a/src/include/efl/mobile/UiKeyListener.h +++ b/src/include/efl/mobile/UiKeyListener.h @@ -29,7 +29,7 @@ class UiViewmgr; * @brief This class extends to UiBaseKeyListener to support an additional HW Menu key for mobile profile. Basically, HW Menu key will be propagated to * the top view and UiView::on_menu() will be triggered. */ -class UiKeyListener : public UiBaseKeyListener +class UiKeyListener : public efl_viewmanager::UiBaseKeyListener { public: /** diff --git a/src/include/efl/mobile/UiMenu.h b/src/include/efl/mobile/UiMenu.h index d2e7703..99d9f3f 100644 --- a/src/include/efl/mobile/UiMenu.h +++ b/src/include/efl/mobile/UiMenu.h @@ -33,7 +33,7 @@ class UiView; * * @warning UiMenu and its content, Elm_Ctxpopup will be deleted by its owned UiView on the proper time. So you can just leave its instance to it. */ -class UiMenu: public UiBaseOverlay +class UiMenu: public efl_viewmanager::UiBaseOverlay { public: /** diff --git a/src/include/efl/mobile/UiMobileViewManager.h b/src/include/efl/mobile/UiMobileViewManager.h index 627cc7d..a4e895c 100644 --- a/src/include/efl/mobile/UiMobileViewManager.h +++ b/src/include/efl/mobile/UiMobileViewManager.h @@ -26,6 +26,6 @@ #include "UiPopup.h" #include "UiApp.h" -#define UI_VIEWMGR (UiApp::getInstance()->getViewmgr()) +#define UI_VIEWMGR (efl_viewmanager::UiApp::getInstance()->getViewmgr()) #endif /* UI_MOBILE_VIEWMANAGER_H */ diff --git a/src/include/efl/mobile/UiPopup.h b/src/include/efl/mobile/UiPopup.h index ddeefd4..def3424 100644 --- a/src/include/efl/mobile/UiPopup.h +++ b/src/include/efl/mobile/UiPopup.h @@ -35,7 +35,7 @@ class UiView; * * @warning UiPopup and its content, Elm_Popup will be deleted by its owned UiView on the proper time. So you can just leave its instance to it. */ -class UiPopup : public UiBaseOverlay +class UiPopup : public efl_viewmanager::UiBaseOverlay { public: /** diff --git a/src/include/efl/mobile/UiStandardView.h b/src/include/efl/mobile/UiStandardView.h index be171bc..3bcee51 100644 --- a/src/include/efl/mobile/UiStandardView.h +++ b/src/include/efl/mobile/UiStandardView.h @@ -33,7 +33,7 @@ namespace efl_viewmanager * to the system profile, when this view is pushed into a UiViewmgr, it will internally create a software back key that triggers popping the view. * */ -class UiStandardView: public UiView +class UiStandardView: public efl_viewmanager::UiView { public: /** diff --git a/src/include/efl/mobile/UiView.h b/src/include/efl/mobile/UiView.h index 06cbcb6..5091d77 100644 --- a/src/include/efl/mobile/UiView.h +++ b/src/include/efl/mobile/UiView.h @@ -33,7 +33,7 @@ class UiKeyListener; * Basically, UiView implements basics for running together with overlays such as UiMenu and UiPopup. You can use this UiView as an empty ui form * view. */ -class UiView: public UiBaseView +class UiView: public efl_viewmanager::UiBaseView { public: /** diff --git a/src/include/efl/mobile/UiViewmgr.h b/src/include/efl/mobile/UiViewmgr.h index 6b9012a..fcb5a9f 100644 --- a/src/include/efl/mobile/UiViewmgr.h +++ b/src/include/efl/mobile/UiViewmgr.h @@ -32,7 +32,7 @@ class UiApp; * EFL view manager in mobile profile. UiViewmgr is nothing more than UiBaseViewmgr in behavior perspective. It just comes out with renaming class * for adapting with other EFL mobile classes. */ -class UiViewmgr: public UiBaseViewmgr +class UiViewmgr: public efl_viewmanager::UiBaseViewmgr { protected: //Don't allow to create UiViewmgr instance diff --git a/src/include/interface/UiIfaceViewManager.h b/src/include/interface/UiIfaceViewManager.h index 2e30386..f3b28ff 100644 --- a/src/include/interface/UiIfaceViewManager.h +++ b/src/include/interface/UiIfaceViewManager.h @@ -18,6 +18,7 @@ #define _UI_IFACE_VIEWMANAGER_H_ #include +#include #define UI_EFL 1 @@ -52,10 +53,6 @@ #endif #endif - - - -#include #include "UiIfaceTypes.h" #include "UiIfaceRotatable.h" #include "UiIfaceOverlay.h" @@ -63,7 +60,4 @@ #include "UiIfaceViewmgr.h" #include "UiIfaceApp.h" -using namespace ui_viewmanager; - - #endif /* UI_IFACE_VIEWMANAGER_H */ diff --git a/src/lib/efl/UiBaseKeyListener.cpp b/src/lib/efl/UiBaseKeyListener.cpp index 01a9106..374553d 100644 --- a/src/lib/efl/UiBaseKeyListener.cpp +++ b/src/lib/efl/UiBaseKeyListener.cpp @@ -16,6 +16,9 @@ */ #include "../../include/efl/UiBaseViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + /***********************************************************************************************/ /* Internal class Implementation */ /***********************************************************************************************/ diff --git a/src/lib/efl/UiBaseOverlay.cpp b/src/lib/efl/UiBaseOverlay.cpp index 1465af6..f3840eb 100644 --- a/src/lib/efl/UiBaseOverlay.cpp +++ b/src/lib/efl/UiBaseOverlay.cpp @@ -16,6 +16,9 @@ */ #include "../../include/efl/UiBaseViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + UiBaseOverlay::UiBaseOverlay(UiBaseView *view) : UiIfaceOverlay(view) { diff --git a/src/lib/efl/UiBaseView.cpp b/src/lib/efl/UiBaseView.cpp index daf0666..c661bd0 100644 --- a/src/lib/efl/UiBaseView.cpp +++ b/src/lib/efl/UiBaseView.cpp @@ -16,6 +16,8 @@ */ #include "../../include/efl/UiBaseViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; /***********************************************************************************************/ /* Internal class Implementation */ diff --git a/src/lib/efl/UiBaseViewmgr.cpp b/src/lib/efl/UiBaseViewmgr.cpp index 6585512..eea2048 100644 --- a/src/lib/efl/UiBaseViewmgr.cpp +++ b/src/lib/efl/UiBaseViewmgr.cpp @@ -14,11 +14,12 @@ * limitations under the License. * */ - #include #include #include "../../include/efl/UiBaseViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; using namespace std; /***********************************************************************************************/ diff --git a/src/lib/efl/mobile/UiApp.cpp b/src/lib/efl/mobile/UiApp.cpp index d352bc0..66688fe 100644 --- a/src/lib/efl/mobile/UiApp.cpp +++ b/src/lib/efl/mobile/UiApp.cpp @@ -16,6 +16,9 @@ */ #include "../../../include/efl/mobile/UiMobileViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + /***********************************************************************************************/ /* Internal class Implementation */ /***********************************************************************************************/ diff --git a/src/lib/efl/mobile/UiKeyListener.cpp b/src/lib/efl/mobile/UiKeyListener.cpp index 9a80c69..3be92d1 100644 --- a/src/lib/efl/mobile/UiKeyListener.cpp +++ b/src/lib/efl/mobile/UiKeyListener.cpp @@ -16,6 +16,9 @@ */ #include "../../../include/efl/mobile/UiMobileViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + static const char *KEY_MENU = "XF86Menu"; static const char *KEY_MENU2 = "XF86Send"; diff --git a/src/lib/efl/mobile/UiMenu.cpp b/src/lib/efl/mobile/UiMenu.cpp index dc48da2..60f73b1 100644 --- a/src/lib/efl/mobile/UiMenu.cpp +++ b/src/lib/efl/mobile/UiMenu.cpp @@ -16,6 +16,9 @@ */ #include "../../../include/efl/mobile/UiMobileViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + static void _ctxpopupDismissedCb(void *data, Evas_Object *obj, void *event_info) { evas_object_hide(obj); diff --git a/src/lib/efl/mobile/UiPopup.cpp b/src/lib/efl/mobile/UiPopup.cpp index 9d9ce46..b878f0e 100644 --- a/src/lib/efl/mobile/UiPopup.cpp +++ b/src/lib/efl/mobile/UiPopup.cpp @@ -16,6 +16,9 @@ */ #include "../../../include/efl/mobile/UiMobileViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + static bool _updatePopup(UiPopup *popup) { Elm_Win *win = popup->getBase(); diff --git a/src/lib/efl/mobile/UiStandardView.cpp b/src/lib/efl/mobile/UiStandardView.cpp index 2c28b2d..b37c080 100644 --- a/src/lib/efl/mobile/UiStandardView.cpp +++ b/src/lib/efl/mobile/UiStandardView.cpp @@ -16,6 +16,9 @@ */ #include "../../../include/efl/mobile/UiMobileViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + /***********************************************************************************************/ /* Internal class Implementation */ /***********************************************************************************************/ diff --git a/src/lib/efl/mobile/UiView.cpp b/src/lib/efl/mobile/UiView.cpp index 38813ea..ee74d31 100644 --- a/src/lib/efl/mobile/UiView.cpp +++ b/src/lib/efl/mobile/UiView.cpp @@ -17,6 +17,9 @@ #include #include "../../../include/efl/mobile/UiMobileViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + /***********************************************************************************************/ /* Internal class Implementation */ /***********************************************************************************************/ diff --git a/src/lib/efl/mobile/UiViewmgr.cpp b/src/lib/efl/mobile/UiViewmgr.cpp index 4c90722..1756fce 100644 --- a/src/lib/efl/mobile/UiViewmgr.cpp +++ b/src/lib/efl/mobile/UiViewmgr.cpp @@ -16,6 +16,9 @@ */ #include "../../../include/efl/mobile/UiMobileViewManager.h" +using namespace ui_viewmanager; +using namespace efl_viewmanager; + /***********************************************************************************************/ /* Internal class Implementation */ /***********************************************************************************************/ diff --git a/src/lib/interface/UiIfaceApp.cpp b/src/lib/interface/UiIfaceApp.cpp index 642c568..441532f 100644 --- a/src/lib/interface/UiIfaceApp.cpp +++ b/src/lib/interface/UiIfaceApp.cpp @@ -17,6 +17,8 @@ #include #include "../../include/interface/UiIfaceViewManager.h" +using namespace ui_viewmanager; + /***********************************************************************************************/ /* Internal class Implementation */ /***********************************************************************************************/ diff --git a/src/lib/interface/UiIfaceOverlay.cpp b/src/lib/interface/UiIfaceOverlay.cpp index 4b4abf5..9b547ed 100644 --- a/src/lib/interface/UiIfaceOverlay.cpp +++ b/src/lib/interface/UiIfaceOverlay.cpp @@ -17,6 +17,7 @@ #include "../../include/interface/UiIfaceViewManager.h" +using namespace ui_viewmanager; /***********************************************************************************************/ /* Internal class Implementation */ diff --git a/src/lib/interface/UiIfaceView.cpp b/src/lib/interface/UiIfaceView.cpp index a5fb65f..b973ae6 100644 --- a/src/lib/interface/UiIfaceView.cpp +++ b/src/lib/interface/UiIfaceView.cpp @@ -19,6 +19,7 @@ #include +using namespace ui_viewmanager; using namespace std; /***********************************************************************************************/ diff --git a/src/lib/interface/UiIfaceViewmgr.cpp b/src/lib/interface/UiIfaceViewmgr.cpp index c500f70..f7d0f15 100644 --- a/src/lib/interface/UiIfaceViewmgr.cpp +++ b/src/lib/interface/UiIfaceViewmgr.cpp @@ -20,6 +20,7 @@ #include "../../include/interface/UiIfaceViewManager.h" +using namespace ui_viewmanager; using namespace std; /***********************************************************************************************/ -- 2.34.1