From: Igor Olshevskyi Date: Tue, 25 Apr 2017 12:24:53 +0000 (+0300) Subject: Update UCL library X-Git-Tag: submit/tizen/20170630.111746~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d25862b10af34cebe17b0a838ac7b5fd5b45b379;p=profile%2Fwearable%2Fapps%2Fnative%2Fcall-ui.git Update UCL library Change-Id: I160479f55ef886cd3b12e4ddaf76957311ca68a4 --- diff --git a/ucl/inc/ucl/appfw/IInstance.h b/ucl/inc/ucl/appfw/IInstance.h index dc94d90..bf09205 100644 --- a/ucl/inc/ucl/appfw/IInstance.h +++ b/ucl/inc/ucl/appfw/IInstance.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_APPFW_I_INSTANCE_H__ #define __UCL_APPFW_I_INSTANCE_H__ diff --git a/ucl/inc/ucl/appfw/IInstanceAppControlExt.h b/ucl/inc/ucl/appfw/IInstanceAppControlExt.h index da05a7f..6799a84 100644 --- a/ucl/inc/ucl/appfw/IInstanceAppControlExt.h +++ b/ucl/inc/ucl/appfw/IInstanceAppControlExt.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_APPFW_I_INSTANCE_APP_CONTROL_EXT_H__ #define __UCL_APPFW_I_INSTANCE_APP_CONTROL_EXT_H__ diff --git a/ucl/inc/ucl/appfw/IInstanceContext.h b/ucl/inc/ucl/appfw/IInstanceContext.h index 59765eb..b06c177 100644 --- a/ucl/inc/ucl/appfw/IInstanceContext.h +++ b/ucl/inc/ucl/appfw/IInstanceContext.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_APPFW_I_INSTANCE_CONTEXT_H__ #define __UCL_APPFW_I_INSTANCE_CONTEXT_H__ diff --git a/ucl/inc/ucl/appfw/InstanceManagerBase.h b/ucl/inc/ucl/appfw/InstanceManagerBase.h index af161bd..0fdde8c 100644 --- a/ucl/inc/ucl/appfw/InstanceManagerBase.h +++ b/ucl/inc/ucl/appfw/InstanceManagerBase.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_APPFW_INSTANCE_MANAGER_BASE_H__ #define __UCL_APPFW_INSTANCE_MANAGER_BASE_H__ diff --git a/ucl/inc/ucl/appfw/SysEventProvider.h b/ucl/inc/ucl/appfw/SysEventProvider.h index 8223ffe..68539b3 100644 --- a/ucl/inc/ucl/appfw/SysEventProvider.h +++ b/ucl/inc/ucl/appfw/SysEventProvider.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_APPFW_SYS_EVENT_PROVIDER_H__ #define __UCL_APPFW_SYS_EVENT_PROVIDER_H__ diff --git a/ucl/inc/ucl/appfw/SysEventProvider.hpp b/ucl/inc/ucl/appfw/SysEventProvider.hpp index 8d6708f..867e62f 100644 --- a/ucl/inc/ucl/appfw/SysEventProvider.hpp +++ b/ucl/inc/ucl/appfw/SysEventProvider.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline void SysEventProvider::addEventHandler(SysEventHandler handler) diff --git a/ucl/inc/ucl/appfw/UIApp.h b/ucl/inc/ucl/appfw/UIApp.h index 417fc35..f482ce4 100644 --- a/ucl/inc/ucl/appfw/UIApp.h +++ b/ucl/inc/ucl/appfw/UIApp.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_APPFW_UI_APP_H__ #define __UCL_APPFW_UI_APP_H__ diff --git a/ucl/inc/ucl/appfw/types.h b/ucl/inc/ucl/appfw/types.h index 17f5b6e..bb7c740 100644 --- a/ucl/inc/ucl/appfw/types.h +++ b/ucl/inc/ucl/appfw/types.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_APPFW_TYPES_H__ #define __UCL_APPFW_TYPES_H__ diff --git a/ucl/inc/ucl/config.h b/ucl/inc/ucl/config.h index 7b42544..cd36042 100644 --- a/ucl/inc/ucl/config.h +++ b/ucl/inc/ucl/config.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_CONFIG_H__ #define __UCL_CONFIG_H__ diff --git a/ucl/inc/ucl/gui/EdjeWidget.h b/ucl/inc/ucl/gui/EdjeWidget.h index d89747d..8d20b50 100644 --- a/ucl/inc/ucl/gui/EdjeWidget.h +++ b/ucl/inc/ucl/gui/EdjeWidget.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_EDJE_WIDGET_H__ #define __UCL_GUI_EDJE_WIDGET_H__ @@ -10,20 +26,21 @@ namespace ucl { class EdjeWidget : public ElmWidget { public: void setText(const TString &value); - void setText(EdjePart part, const TString &value); + void setText(const TString &value, EdjePart part); TString getText() const; TString getText(EdjePart part) const; void setContent(Evas_Object *content); - void setContent(EdjePart part, Evas_Object *content); + void setContent(Evas_Object *content, EdjePart part); Evas_Object *unsetContent(); Evas_Object *unsetContent(EdjePart part); Evas_Object *getContent() const; Evas_Object *getContent(EdjePart part) const; - void emitSignal(EdjeSignal signal, EdjeSignalSrc source); + void emit(EdjeSignal signal, EdjeSignalSrc source = + EdjeSignalSrc("")); protected: EdjeWidget(RefCountObjBase *rc, Evas_Object *eo, bool isOwner = false); diff --git a/ucl/inc/ucl/gui/EdjeWidget.hpp b/ucl/inc/ucl/gui/EdjeWidget.hpp index 7105fcc..5197f59 100644 --- a/ucl/inc/ucl/gui/EdjeWidget.hpp +++ b/ucl/inc/ucl/gui/EdjeWidget.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline EdjeWidget::EdjeWidget(RefCountObjBase *const rc, @@ -21,8 +37,8 @@ namespace ucl { elm_object_content_set(getEo(), content); } - inline void EdjeWidget::setContent(const EdjePart part, - Evas_Object *const content) + inline void EdjeWidget::setContent(Evas_Object *const content, + const EdjePart part) { elm_object_part_content_set(getEo(), part.name, content); } @@ -47,7 +63,7 @@ namespace ucl { return elm_object_part_content_get(getEo(), part.name); } - inline void EdjeWidget::emitSignal(const EdjeSignal signal, + inline void EdjeWidget::emit(const EdjeSignal signal, const EdjeSignalSrc source) { elm_object_signal_emit(getEo(), signal.name, source.name); diff --git a/ucl/inc/ucl/gui/ElmWidget.h b/ucl/inc/ucl/gui/ElmWidget.h index b0df1ad..9c03011 100644 --- a/ucl/inc/ucl/gui/ElmWidget.h +++ b/ucl/inc/ucl/gui/ElmWidget.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_ELM_WIDGET_H__ #define __UCL_GUI_ELM_WIDGET_H__ diff --git a/ucl/inc/ucl/gui/ElmWidget.hpp b/ucl/inc/ucl/gui/ElmWidget.hpp index 814b258..8d0e1ab 100644 --- a/ucl/inc/ucl/gui/ElmWidget.hpp +++ b/ucl/inc/ucl/gui/ElmWidget.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline void ElmWidget::setEnabled(const bool value) diff --git a/ucl/inc/ucl/gui/Layout.h b/ucl/inc/ucl/gui/Layout.h index 80f3f26..0df33ab 100644 --- a/ucl/inc/ucl/gui/Layout.h +++ b/ucl/inc/ucl/gui/Layout.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_LAYOUT_H__ #define __UCL_GUI_LAYOUT_H__ @@ -33,7 +49,7 @@ namespace ucl { bool setTheme(const LayoutTheme &theme); bool setEdjeFile(const std::string &filePath, EdjeGroup group); - Variant getEdjeData(EdjeDataKey key); + Variant getData(EdjeDataKey key); }; } diff --git a/ucl/inc/ucl/gui/Layout.hpp b/ucl/inc/ucl/gui/Layout.hpp index 3516b4a..e3df1db 100644 --- a/ucl/inc/ucl/gui/Layout.hpp +++ b/ucl/inc/ucl/gui/Layout.hpp @@ -1,10 +1,26 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { // Layout::Builder // inline Layout::Builder::Builder() : m_isOwner(false), - m_needBindToEo(true) + m_needBindToEo(false) { } @@ -53,7 +69,7 @@ namespace ucl { return elm_layout_file_set(getEo(), filePath.c_str(), group.name); } - inline Variant Layout::getEdjeData(EdjeDataKey key) + inline Variant Layout::getData(EdjeDataKey key) { return elm_layout_data_get(getEo(), key); } diff --git a/ucl/inc/ucl/gui/NaviItem.h b/ucl/inc/ucl/gui/NaviItem.h index 6b3bd6a..1161847 100644 --- a/ucl/inc/ucl/gui/NaviItem.h +++ b/ucl/inc/ucl/gui/NaviItem.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_NAVI_ITEM_H__ #define __UCL_GUI_NAVI_ITEM_H__ diff --git a/ucl/inc/ucl/gui/NaviItem.hpp b/ucl/inc/ucl/gui/NaviItem.hpp index ef60d29..6b33fe4 100644 --- a/ucl/inc/ucl/gui/NaviItem.hpp +++ b/ucl/inc/ucl/gui/NaviItem.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline void NaviItem::setPopHandler(const PopHandler &handler) const diff --git a/ucl/inc/ucl/gui/Naviframe.h b/ucl/inc/ucl/gui/Naviframe.h index b516813..73c1d51 100644 --- a/ucl/inc/ucl/gui/Naviframe.h +++ b/ucl/inc/ucl/gui/Naviframe.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_NAVIFRAME_H__ #define __UCL_GUI_NAVIFRAME_H__ @@ -19,18 +35,14 @@ namespace ucl { public: Builder(); Builder &setStyle(ElmStyle value); - Builder &setIsOwner(bool value); Builder &setNeedBindToEo(bool value); NaviframeSRef build(Widget &parent) const; private: ElmStyle m_style; - bool m_isOwner; bool m_needBindToEo; }; public: - using StyledWidget::StyledWidget; - bool isInTransition() const; void setAutoBackBtn(bool value); @@ -44,26 +56,28 @@ namespace ucl { Evas_Object *pop(); - NaviItem push(const TString &title, Evas_Object *backBtn, - Evas_Object *moreBtn, Evas_Object *content, ElmStyle style); - NaviItem push(const TString &title, Evas_Object *content); - NaviItem push(Evas_Object *content); + NaviItem push(const TString &title, + Evas_Object *backBtn, Evas_Object *moreBtn, + Evas_Object *content, ElmStyle style = nullptr); + NaviItem push(const TString &title, + Evas_Object *content, ElmStyle style = nullptr); + NaviItem push(Evas_Object *content, ElmStyle style = nullptr); NaviItem insertAfter(NaviItem after, const TString &title, Evas_Object *backBtn, Evas_Object *moreBtn, - Evas_Object *content, ElmStyle style); + Evas_Object *content, ElmStyle style = nullptr); NaviItem insertAfter(NaviItem after, const TString &title, - Evas_Object *content); + Evas_Object *content, ElmStyle style = nullptr); NaviItem insertAfter(NaviItem after, - Evas_Object *content); + Evas_Object *content, ElmStyle style = nullptr); NaviItem insertBefore(NaviItem before, const TString &title, Evas_Object *backBtn, Evas_Object *moreBtn, - Evas_Object *content, ElmStyle style); + Evas_Object *content, ElmStyle style = nullptr); NaviItem insertBefore(NaviItem before, const TString &title, - Evas_Object *content); + Evas_Object *content, ElmStyle style = nullptr); NaviItem insertBefore(NaviItem before, - Evas_Object *content); + Evas_Object *content, ElmStyle style = nullptr); NaviItem getTopItem()const; NaviItem getBottomItem() const; diff --git a/ucl/inc/ucl/gui/Naviframe.hpp b/ucl/inc/ucl/gui/Naviframe.hpp index e6d68bf..4c56f4a 100644 --- a/ucl/inc/ucl/gui/Naviframe.hpp +++ b/ucl/inc/ucl/gui/Naviframe.hpp @@ -1,9 +1,24 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { // Naviframe::Builder // inline Naviframe::Builder::Builder() : - m_isOwner(false), m_needBindToEo(true) { } @@ -15,12 +30,6 @@ namespace ucl { return *this; } - inline Naviframe::Builder &Naviframe::Builder::setIsOwner(const bool value) - { - m_isOwner = value; - return *this; - } - inline Naviframe::Builder &Naviframe::Builder::setNeedBindToEo( const bool value) { @@ -68,7 +77,7 @@ namespace ucl { inline Evas_Object *Naviframe::pop() { auto result = elm_naviframe_item_pop(getEo()); - if (isValid(getBottomItem())) { + if (getBottomItem()) { startTransition(); } return result; @@ -88,14 +97,15 @@ namespace ucl { } inline NaviItem Naviframe::push(const TString &title, - Evas_Object *const content) + Evas_Object *const content, const ElmStyle style) { - return push(title, nullptr, nullptr, content, nullptr); + return push(title, nullptr, nullptr, content, style); } - inline NaviItem Naviframe::push(Evas_Object *const content) + inline NaviItem Naviframe::push( + Evas_Object *const content, const ElmStyle style) { - return push(nullptr, nullptr, nullptr, content, nullptr); + return push(nullptr, nullptr, nullptr, content, style); } inline NaviItem Naviframe::insertAfter(NaviItem after, @@ -110,15 +120,16 @@ namespace ucl { } inline NaviItem Naviframe::insertAfter(NaviItem after, - const TString &title, Evas_Object *const content) + const TString &title, + Evas_Object *const content, const ElmStyle style) { - return insertAfter(after, title, nullptr, nullptr, content, nullptr); + return insertAfter(after, title, nullptr, nullptr, content, style); } inline NaviItem Naviframe::insertAfter(NaviItem after, - Evas_Object *const content) + Evas_Object *const content, const ElmStyle style) { - return insertAfter(after, nullptr, nullptr, nullptr, content, nullptr); + return insertAfter(after, nullptr, nullptr, nullptr, content, style); } inline NaviItem Naviframe::insertBefore(NaviItem before, @@ -133,15 +144,16 @@ namespace ucl { } inline NaviItem Naviframe::insertBefore(NaviItem before, - const TString &title, Evas_Object *const content) + const TString &title, + Evas_Object *const content, const ElmStyle style) { - return insertAfter(before, title, nullptr, nullptr, content, nullptr); + return insertAfter(before, title, nullptr, nullptr, content, style); } inline NaviItem Naviframe::insertBefore(NaviItem before, - Evas_Object *const content) + Evas_Object *const content, const ElmStyle style) { - return insertAfter(before, nullptr, nullptr, nullptr, content, nullptr); + return insertAfter(before, nullptr, nullptr, nullptr, content, style); } inline NaviItem Naviframe::getTopItem()const diff --git a/ucl/inc/ucl/gui/StyledWidget.h b/ucl/inc/ucl/gui/StyledWidget.h index 4b8a74c..ad995c1 100644 --- a/ucl/inc/ucl/gui/StyledWidget.h +++ b/ucl/inc/ucl/gui/StyledWidget.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_STYLED_WIDGET_H__ #define __UCL_GUI_STYLED_WIDGET_H__ diff --git a/ucl/inc/ucl/gui/StyledWidget.hpp b/ucl/inc/ucl/gui/StyledWidget.hpp index 033b2aa..cb32329 100644 --- a/ucl/inc/ucl/gui/StyledWidget.hpp +++ b/ucl/inc/ucl/gui/StyledWidget.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline StyledWidget::StyledWidget( diff --git a/ucl/inc/ucl/gui/Widget.h b/ucl/inc/ucl/gui/Widget.h index d197f80..9f74259 100644 --- a/ucl/inc/ucl/gui/Widget.h +++ b/ucl/inc/ucl/gui/Widget.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_WIDGET_H__ #define __UCL_GUI_WIDGET_H__ @@ -43,7 +59,7 @@ namespace ucl { void delEventHandler(WidgetEvent event, WidgetEventHandler handler); void delEventHandler(SmartEvent event, WidgetEventHandler handler); - void callSmartEvent(SmartEvent event, void *eventInfo = nullptr); + void callEvent(SmartEvent event, void *eventInfo = nullptr); void markForDeletion(); @@ -137,6 +153,9 @@ namespace ucl { void expand(Widget &widget); void fill(Widget &widget); void expandAndFill(Widget &widget); + + bool operator==(const Widget &lhs, const Widget &rhs); + bool operator!=(const Widget &lhs, const Widget &rhs); } #include "Widget.hpp" diff --git a/ucl/inc/ucl/gui/Widget.hpp b/ucl/inc/ucl/gui/Widget.hpp index 301dbf9..95da66a 100644 --- a/ucl/inc/ucl/gui/Widget.hpp +++ b/ucl/inc/ucl/gui/Widget.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { namespace { namespace impl { constexpr auto WIDGET_DATA_NAME = "__WIDGET_DATA_NAME__"; @@ -58,7 +74,7 @@ namespace ucl { return evas_object_data_get(getEo(), key.name); } - inline void Widget::callSmartEvent(SmartEvent event, void *eventInfo) + inline void Widget::callEvent(SmartEvent event, void *eventInfo) { evas_object_smart_callback_call(getEo(), event, eventInfo); } @@ -245,4 +261,14 @@ namespace ucl { expand(widget); fill(widget); } + + inline bool operator==(const Widget &lhs, const Widget &rhs) + { + return (lhs.getEo() == rhs.getEo()); + } + + inline bool operator!=(const Widget &lhs, const Widget &rhs) + { + return (lhs.getEo() != rhs.getEo()); + } } diff --git a/ucl/inc/ucl/gui/WidgetItem.h b/ucl/inc/ucl/gui/WidgetItem.h index 16a2751..edef5e9 100644 --- a/ucl/inc/ucl/gui/WidgetItem.h +++ b/ucl/inc/ucl/gui/WidgetItem.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_WIDGET_ITEM_H__ #define __UCL_GUI_WIDGET_ITEM_H__ @@ -14,6 +30,7 @@ namespace ucl { Elm_Object_Item *getIt() const; operator Elm_Object_Item *() const; + operator bool() const; Evas_Object *getWidget() const; @@ -27,21 +44,24 @@ namespace ucl { void setEnabled(bool value) const; bool isEnabled() const; + void setStyle(ElmStyle style) const; + void setText(const TString &value) const; - void setText(EdjePart part, const TString &value) const; + void setText(const TString &value, EdjePart part) const; TString getText() const; TString getText(EdjePart part) const; void setContent(Evas_Object *content) const; - void setContent(EdjePart part, Evas_Object *content) const; + void setContent(Evas_Object *content, EdjePart part) const; Evas_Object *unsetContent() const; Evas_Object *unsetContent(EdjePart part) const; Evas_Object *getContent() const; Evas_Object *getContent(EdjePart part) const; - void emitSignal(EdjeSignal signal, EdjeSignalSrc source) const; + void emit(EdjeSignal signal,EdjeSignalSrc source = + EdjeSignalSrc("")) const; private: Elm_Object_Item *m_it; @@ -52,8 +72,6 @@ namespace ucl { void enable(WidgetItem item); void disable(WidgetItem item); - bool isValid(WidgetItem item); - bool operator==(WidgetItem lhs, WidgetItem rhs); bool operator!=(WidgetItem lhs, WidgetItem rhs); } diff --git a/ucl/inc/ucl/gui/WidgetItem.hpp b/ucl/inc/ucl/gui/WidgetItem.hpp index ef2badc..9880816 100644 --- a/ucl/inc/ucl/gui/WidgetItem.hpp +++ b/ucl/inc/ucl/gui/WidgetItem.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { constexpr WidgetItem::WidgetItem() : @@ -25,6 +41,11 @@ namespace ucl { return m_it; } + inline WidgetItem::operator bool() const + { + return !!m_it; + } + inline Evas_Object *WidgetItem::getWidget() const { return elm_object_item_widget_get(getIt()); @@ -61,6 +82,11 @@ namespace ucl { return (elm_object_item_disabled_get(getIt()) ? false : true); } + inline void WidgetItem::setStyle(const ElmStyle style) const + { + elm_object_item_style_set(getIt(), style.name); + } + inline TString WidgetItem::getText() const { return elm_object_item_text_get(getIt()); @@ -76,8 +102,8 @@ namespace ucl { elm_object_item_content_set(getIt(), content); } - inline void WidgetItem::setContent(const EdjePart part, - Evas_Object *const content) const + inline void WidgetItem::setContent(Evas_Object *const content, + const EdjePart part) const { elm_object_item_part_content_set(getIt(), part.name, content); } @@ -102,7 +128,7 @@ namespace ucl { return elm_object_item_part_content_get(getIt(), part.name); } - inline void WidgetItem::emitSignal(const EdjeSignal signal, + inline void WidgetItem::emit(const EdjeSignal signal, const EdjeSignalSrc source) const { elm_object_item_signal_emit(getIt(), signal.name, source.name); @@ -120,11 +146,6 @@ namespace ucl { item.setEnabled(false); } - inline bool isValid(const WidgetItem item) - { - return !!item.getIt(); - } - inline bool operator==(const WidgetItem lhs, const WidgetItem rhs) { return (lhs.getIt() == rhs.getIt()); diff --git a/ucl/inc/ucl/gui/Window.h b/ucl/inc/ucl/gui/Window.h index d26dfaf..8e526b4 100644 --- a/ucl/inc/ucl/gui/Window.h +++ b/ucl/inc/ucl/gui/Window.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_WINDOW_H__ #define __UCL_GUI_WINDOW_H__ @@ -50,6 +66,8 @@ namespace ucl { StyledWidget &getConformant(); const StyledWidget &getConformant() const; + void getScreenSize(int *w, int *h) const; + void setTitle(const std::string &title); std::string getTitle() const; diff --git a/ucl/inc/ucl/gui/Window.hpp b/ucl/inc/ucl/gui/Window.hpp index eece848..3d4c959 100644 --- a/ucl/inc/ucl/gui/Window.hpp +++ b/ucl/inc/ucl/gui/Window.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include namespace ucl { @@ -85,6 +101,11 @@ namespace ucl { return m_conform; } + inline void Window::getScreenSize(int *const w, int *const h) const + { + elm_win_screen_size_get(getEo(), nullptr, nullptr, w, h); + } + inline void Window::setTitle(const std::string &title) { elm_win_title_set(getEo(), title.c_str()); @@ -92,7 +113,7 @@ namespace ucl { inline std::string Window::getTitle() const { - return elm_win_title_get(getEo()); + return nz(elm_win_title_get(getEo())); } inline void Window::setIndicatorVisible(bool value) diff --git a/ucl/inc/ucl/gui/helpers.h b/ucl/inc/ucl/gui/helpers.h index 68c9ff6..f598c17 100644 --- a/ucl/inc/ucl/gui/helpers.h +++ b/ucl/inc/ucl/gui/helpers.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_HELPERS_H__ #define __UCL_GUI_HELPERS_H__ diff --git a/ucl/inc/ucl/gui/helpers.hpp b/ucl/inc/ucl/gui/helpers.hpp index abe3cf6..29df283 100644 --- a/ucl/inc/ucl/gui/helpers.hpp +++ b/ucl/inc/ucl/gui/helpers.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline Widget *asWidget(Evas_Object *eo) diff --git a/ucl/inc/ucl/gui/stdTheme.h b/ucl/inc/ucl/gui/stdTheme.h index ad77e4a..13202cc 100644 --- a/ucl/inc/ucl/gui/stdTheme.h +++ b/ucl/inc/ucl/gui/stdTheme.h @@ -1,7 +1,24 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_STD_THEME_H__ #define __UCL_GUI_STD_THEME_H__ #include "stdTheme/common.h" #include "stdTheme/layout.h" +#include "stdTheme/naviframe.h" #endif // __UCL_GUI_STD_THEME_H__ diff --git a/ucl/inc/ucl/gui/stdTheme/common.h b/ucl/inc/ucl/gui/stdTheme/common.h index 5fbdb0b..7ec81b9 100644 --- a/ucl/inc/ucl/gui/stdTheme/common.h +++ b/ucl/inc/ucl/gui/stdTheme/common.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_STD_THEME_COMMON_H__ #define __UCL_GUI_STD_THEME_COMMON_H__ @@ -11,8 +27,12 @@ namespace ucl { // Parts // - constexpr EdjePart PART_TEXT {"elm.text"}; + constexpr EdjePart PART_TEXT {"elm.text"}; + constexpr EdjePart PART_TITLE {"elm.text.title"}; + constexpr EdjePart PART_CONTENT {"elm.swallow.content"}; + constexpr EdjePart PART_ICON {"elm.swallow.icon"}; + constexpr EdjePart PART_BUTTON {"elm.swallow.button"}; } #endif // __UCL_GUI_STD_THEME_COMMON_H__ diff --git a/ucl/inc/ucl/gui/stdTheme/layout.h b/ucl/inc/ucl/gui/stdTheme/layout.h index 6f4144e..79ff426 100644 --- a/ucl/inc/ucl/gui/stdTheme/layout.h +++ b/ucl/inc/ucl/gui/stdTheme/layout.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_STD_THEME_LAYOUT_H__ #define __UCL_GUI_STD_THEME_LAYOUT_H__ @@ -6,6 +22,9 @@ namespace ucl { constexpr LayoutTheme LAYOUT_DEFAULT {"layout", "application", "default"}; + + constexpr LayoutTheme LAYOUT_NO_CONTENTS + {"layout", "nocontents", "default"}; } #endif // __UCL_GUI_STD_THEME_LAYOUT_H__ diff --git a/ucl/inc/ucl/gui/stdTheme/naviframe.h b/ucl/inc/ucl/gui/stdTheme/naviframe.h new file mode 100644 index 0000000..fd99fdc --- /dev/null +++ b/ucl/inc/ucl/gui/stdTheme/naviframe.h @@ -0,0 +1,27 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __UCL_GUI_STD_THEME_NAVIFRAME_H__ +#define __UCL_GUI_STD_THEME_NAVIFRAME_H__ + +#include "common.h" + +namespace ucl { + + constexpr ElmStyle NAVIFRAME_EMPTY {"empty"}; +} + +#endif // __UCL_GUI_STD_THEME_NAVIFRAME_H__ diff --git a/ucl/inc/ucl/gui/types.h b/ucl/inc/ucl/gui/types.h index 697e39a..ed7d03f 100644 --- a/ucl/inc/ucl/gui/types.h +++ b/ucl/inc/ucl/gui/types.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_GUI_TYPES_H__ #define __UCL_GUI_TYPES_H__ diff --git a/ucl/inc/ucl/gui/types.hpp b/ucl/inc/ucl/gui/types.hpp index ed7ba8d..95521a2 100644 --- a/ucl/inc/ucl/gui/types.hpp +++ b/ucl/inc/ucl/gui/types.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/util/helpers.h" namespace ucl { diff --git a/ucl/inc/ucl/misc/Aspect.h b/ucl/inc/ucl/misc/Aspect.h index 4a0f782..9b40f98 100644 --- a/ucl/inc/ucl/misc/Aspect.h +++ b/ucl/inc/ucl/misc/Aspect.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_ASPECT_H__ #define __UCL_MISC_ASPECT_H__ diff --git a/ucl/inc/ucl/misc/Aspect.hpp b/ucl/inc/ucl/misc/Aspect.hpp index 18adcb2..03127ec 100644 --- a/ucl/inc/ucl/misc/Aspect.hpp +++ b/ucl/inc/ucl/misc/Aspect.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include "ucl/util/helpers.h" diff --git a/ucl/inc/ucl/misc/Event.h b/ucl/inc/ucl/misc/Event.h index 5ebc4f8..efa93ce 100644 --- a/ucl/inc/ucl/misc/Event.h +++ b/ucl/inc/ucl/misc/Event.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_EVENT_H__ #define __UCL_MISC_EVENT_H__ diff --git a/ucl/inc/ucl/misc/Event.hpp b/ucl/inc/ucl/misc/Event.hpp index 17c0a53..53e58a2 100644 --- a/ucl/inc/ucl/misc/Event.hpp +++ b/ucl/inc/ucl/misc/Event.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include namespace ucl { namespace { namespace impl { diff --git a/ucl/inc/ucl/misc/HashMap.h b/ucl/inc/ucl/misc/HashMap.h index ac6d455..e8c078c 100644 --- a/ucl/inc/ucl/misc/HashMap.h +++ b/ucl/inc/ucl/misc/HashMap.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_HASH_MAP_H__ #define __UCL_MISC_HASH_MAP_H__ diff --git a/ucl/inc/ucl/misc/HashMap.hpp b/ucl/inc/ucl/misc/HashMap.hpp index 8b64692..05a0652 100644 --- a/ucl/inc/ucl/misc/HashMap.hpp +++ b/ucl/inc/ucl/misc/HashMap.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/misc/RefCountAware.h b/ucl/inc/ucl/misc/RefCountAware.h index f037baa..7ec13cc 100644 --- a/ucl/inc/ucl/misc/RefCountAware.h +++ b/ucl/inc/ucl/misc/RefCountAware.h @@ -26,33 +26,13 @@ namespace ucl { class RefCountAware : public Polymorphic { public: - template - static SharedRef asShared(T *obj); - template - static WeakRef asWeak(T *obj); - - template - static SharedRef asShared(T &obj); - template - static WeakRef asWeak(T &obj); - bool isShared() const; template - SharedRef asShared(); - template - WeakRef asWeak(); + SharedRef asSharedThis(T *thisAlias) const; template - SharedRef asShared() const; - template - WeakRef asWeak() const; - - RefCountAwareSRef asShared(); - RefCountAwareWRef asWeak(); - - RefCountAwareSCRef asShared() const; - RefCountAwareWCRef asWeak() const; + WeakRef asWeakThis(T *thisAlias) const; protected: RefCountAware(RefCountObjBase *rc); @@ -65,14 +45,42 @@ namespace ucl { // Non-member functions // template - SharedRef asShared(T *obj); + SharedRef asShared(T &obj); template - WeakRef asWeak(T *obj); + SharedRef asShared(T *obj); - template - SharedRef asShared(T &obj); template WeakRef asWeak(T &obj); + template + WeakRef asWeak(T *obj); + + template ::value>::type> + SharedRef asShared(U &obj); + template ::value>::type> + SharedRef asShared(U *obj); + + template ::value>::type> + WeakRef asWeak(U &obj); + template ::value>::type> + WeakRef asWeak(U *obj); + + template ::value>::type> + SharedRef asShared(const U &obj); + template ::value>::type> + SharedRef asShared(const U *obj); + + template ::value>::type> + WeakRef asWeak(const U &obj); + template ::value>::type> + WeakRef asWeak(const U *obj); } #include "RefCountAware.hpp" diff --git a/ucl/inc/ucl/misc/RefCountAware.hpp b/ucl/inc/ucl/misc/RefCountAware.hpp index 7969289..ae51c0d 100644 --- a/ucl/inc/ucl/misc/RefCountAware.hpp +++ b/ucl/inc/ucl/misc/RefCountAware.hpp @@ -23,118 +23,108 @@ namespace ucl { { } - template - inline SharedRef RefCountAware::asShared(T *obj) - { - return (obj ? asShared(*obj) : SharedRef()); - } - - template - inline WeakRef RefCountAware::asWeak(T *obj) - { - return (obj ? asWeak(*obj) : WeakRef()); - } - - template - inline SharedRef RefCountAware::asShared(T &obj) - { - return obj.template asShared::type>(); - } - - template - inline WeakRef RefCountAware::asWeak(T &obj) - { - return obj.template asWeak::type>(); - } - inline bool RefCountAware::isShared() const { return !!m_rc; } template - inline SharedRef RefCountAware::asShared() + inline SharedRef RefCountAware::asSharedThis(T *const thisAlias) const { if (!isShared()) { UCL_ELOG("NOT SHARED: %s", typeid(*this).name()); return {}; } - return {m_rc, static_cast(this)}; + return {m_rc, thisAlias}; } template - inline WeakRef RefCountAware::asWeak() + inline WeakRef RefCountAware::asWeakThis(T *const thisAlias) const { if (!isShared()) { UCL_ELOG("NOT SHARED: %s", typeid(*this).name()); return {}; } - return {m_rc, static_cast(this)}; + return {m_rc, thisAlias}; } + // Non-member functions // + template - inline SharedRef RefCountAware::asShared() const + inline SharedRef asShared(T &obj) { - if (!isShared()) { - UCL_ELOG("NOT SHARED: %s", typeid(*this).name()); - return {}; - } - return {m_rc, static_cast(this)}; + return obj.template asSharedThis(&obj); } template - inline WeakRef RefCountAware::asWeak() const + inline SharedRef asShared(T *obj) { - if (!isShared()) { - UCL_ELOG("NOT SHARED: %s", typeid(*this).name()); - return {}; - } - return {m_rc, static_cast(this)}; + if (!obj) return {}; + return obj->template asSharedThis(obj); } - inline RefCountAwareSRef RefCountAware::asShared() + template + inline WeakRef asWeak(T &obj) { - return asShared(); + return obj.template asWeakThis(&obj); } - inline RefCountAwareWRef RefCountAware::asWeak() + template + inline WeakRef asWeak(T *obj) { - return asWeak(); + if (!obj) return {}; + return obj->template asWeakThis(obj); } - inline RefCountAwareSCRef RefCountAware::asShared() const + template + inline SharedRef asShared(U &obj) { - return asShared(); + return obj.template asSharedThis(&obj); } - inline RefCountAwareWCRef RefCountAware::asWeak() const + template + inline SharedRef asShared(U *obj) { - return asWeak(); + if (!obj) return {}; + return obj->template asSharedThis(obj); } - // Non-member functions // + template + inline WeakRef asWeak(U &obj) + { + return obj.template asWeakThis(&obj); + } - template - inline SharedRef asShared(T *obj) + template + inline WeakRef asWeak(U *obj) { - return RefCountAware::asShared(obj); + if (!obj) return {}; + return obj->template asWeakThis(obj); } - template - inline WeakRef asWeak(T *obj) + template + inline SharedRef asShared(const U &obj) { - return RefCountAware::asWeak(obj); + return obj.template asSharedThis(&obj); } - template - inline SharedRef asShared(T &obj) + template + inline SharedRef asShared(const U *obj) { - return RefCountAware::asShared(obj); + if (!obj) return {}; + return obj->template asSharedThis(obj); } - template - inline WeakRef asWeak(T &obj) + template + inline WeakRef asWeak(const U &obj) + { + return obj.template asWeakThis(&obj); + } + + template + inline WeakRef asWeak(const U *obj) { - return RefCountAware::asWeak(obj); + if (!obj) return {}; + return obj->template asWeakThis(obj); } } diff --git a/ucl/inc/ucl/misc/TString.h b/ucl/inc/ucl/misc/TString.h index 60e03c8..5ad240d 100644 --- a/ucl/inc/ucl/misc/TString.h +++ b/ucl/inc/ucl/misc/TString.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_T_STRING_H__ #define __UCL_MISC_T_STRING_H__ @@ -40,7 +56,7 @@ namespace ucl { const char *translate() const; template - TString format(ARGS ...args) const; + std::string format(ARGS ...args) const; private: const char *doTranslate(const char *strId) const; diff --git a/ucl/inc/ucl/misc/TString.hpp b/ucl/inc/ucl/misc/TString.hpp index 9806848..01c1327 100644 --- a/ucl/inc/ucl/misc/TString.hpp +++ b/ucl/inc/ucl/misc/TString.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include @@ -99,7 +115,7 @@ namespace ucl { } template - inline TString TString::format(ARGS ...args) const + inline std::string TString::format(ARGS ...args) const { constexpr auto STR_LEN_ADJUST = 1.7f; @@ -125,6 +141,6 @@ namespace ucl { strLen = n + 1; } - return {result, false}; + return result; } } diff --git a/ucl/inc/ucl/misc/Variant.h b/ucl/inc/ucl/misc/Variant.h index d8e2a37..a69866b 100644 --- a/ucl/inc/ucl/misc/Variant.h +++ b/ucl/inc/ucl/misc/Variant.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_VARIANT_H__ #define __UCL_MISC_VARIANT_H__ diff --git a/ucl/inc/ucl/misc/Variant.hpp b/ucl/inc/ucl/misc/Variant.hpp index 4c1dcbb..86ad92e 100644 --- a/ucl/inc/ucl/misc/Variant.hpp +++ b/ucl/inc/ucl/misc/Variant.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include namespace ucl { namespace { namespace impl { diff --git a/ucl/inc/ucl/misc/smartDelegation.h b/ucl/inc/ucl/misc/smartDelegation.h index 6f249a0..f921743 100644 --- a/ucl/inc/ucl/misc/smartDelegation.h +++ b/ucl/inc/ucl/misc/smartDelegation.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_SMART_DELEGATION_H__ #define __UCL_MISC_SMART_DELEGATION_H__ diff --git a/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.h b/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.h index b1792cf..0a5e976 100644 --- a/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.h +++ b/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_SMART_DELEGATION_WEAK_DELEGATE_H__ #define __UCL_MISC_SMART_DELEGATION_WEAK_DELEGATE_H__ diff --git a/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.hpp b/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.hpp index be7c1ac..e4b4b5d 100644 --- a/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.hpp +++ b/ucl/inc/ucl/misc/smartDelegation/WeakDelegate.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/misc/smartDelegation/macro.h b/ucl/inc/ucl/misc/smartDelegation/macro.h index 24ab614..5368eda 100644 --- a/ucl/inc/ucl/misc/smartDelegation/macro.h +++ b/ucl/inc/ucl/misc/smartDelegation/macro.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_SMART_DELEGATION_MACRO_H__ #define __UCL_MISC_SMART_DELEGATION_MACRO_H__ diff --git a/ucl/inc/ucl/misc/smartDelegation/shortMacro.h b/ucl/inc/ucl/misc/smartDelegation/shortMacro.h index 3893008..43c1ec3 100644 --- a/ucl/inc/ucl/misc/smartDelegation/shortMacro.h +++ b/ucl/inc/ucl/misc/smartDelegation/shortMacro.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_MISC_SMART_DELEGATION_SHORT_MACRO_H__ #define __UCL_MISC_SMART_DELEGATION_SHORT_MACRO_H__ diff --git a/ucl/inc/ucl/util/delegation.h b/ucl/inc/ucl/util/delegation.h index 198c20f..a624c08 100644 --- a/ucl/inc/ucl/util/delegation.h +++ b/ucl/inc/ucl/util/delegation.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_H__ #define __UCL_UTIL_DELEGATION_H__ diff --git a/ucl/inc/ucl/util/delegation/BaseDelegate.h b/ucl/inc/ucl/util/delegation/BaseDelegate.h index e4307f0..e49ce22 100644 --- a/ucl/inc/ucl/util/delegation/BaseDelegate.h +++ b/ucl/inc/ucl/util/delegation/BaseDelegate.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_BASE_DELEGATE_H__ #define __UCL_UTIL_DELEGATION_BASE_DELEGATE_H__ diff --git a/ucl/inc/ucl/util/delegation/BaseDelegate.hpp b/ucl/inc/ucl/util/delegation/BaseDelegate.hpp index 46cef7f..9fe4369 100644 --- a/ucl/inc/ucl/util/delegation/BaseDelegate.hpp +++ b/ucl/inc/ucl/util/delegation/BaseDelegate.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/util/delegation/BaseDelegate2.h b/ucl/inc/ucl/util/delegation/BaseDelegate2.h index ad3242e..ff3b635 100644 --- a/ucl/inc/ucl/util/delegation/BaseDelegate2.h +++ b/ucl/inc/ucl/util/delegation/BaseDelegate2.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_BASE_DELEGATE2_H__ #define __UCL_UTIL_DELEGATION_BASE_DELEGATE2_H__ diff --git a/ucl/inc/ucl/util/delegation/BaseDelegate2.hpp b/ucl/inc/ucl/util/delegation/BaseDelegate2.hpp index 28446de..6d8efa7 100644 --- a/ucl/inc/ucl/util/delegation/BaseDelegate2.hpp +++ b/ucl/inc/ucl/util/delegation/BaseDelegate2.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/util/delegation/Callback.h b/ucl/inc/ucl/util/delegation/Callback.h index 6b282d4..69724be 100644 --- a/ucl/inc/ucl/util/delegation/Callback.h +++ b/ucl/inc/ucl/util/delegation/Callback.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_CALLBACK_H__ #define __UCL_UTIL_DELEGATION_CALLBACK_H__ diff --git a/ucl/inc/ucl/util/delegation/Callback.hpp b/ucl/inc/ucl/util/delegation/Callback.hpp index 622729f..28d2145 100644 --- a/ucl/inc/ucl/util/delegation/Callback.hpp +++ b/ucl/inc/ucl/util/delegation/Callback.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/util/delegation/Delegate.h b/ucl/inc/ucl/util/delegation/Delegate.h index ad9a1fd..fd53a0a 100644 --- a/ucl/inc/ucl/util/delegation/Delegate.h +++ b/ucl/inc/ucl/util/delegation/Delegate.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_DELEGATE_H__ #define __UCL_UTIL_DELEGATION_DELEGATE_H__ diff --git a/ucl/inc/ucl/util/delegation/Delegate.hpp b/ucl/inc/ucl/util/delegation/Delegate.hpp index 680745d..5f7be3d 100644 --- a/ucl/inc/ucl/util/delegation/Delegate.hpp +++ b/ucl/inc/ucl/util/delegation/Delegate.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/util/delegation/Delegate2.h b/ucl/inc/ucl/util/delegation/Delegate2.h index 7669857..c49d31c 100644 --- a/ucl/inc/ucl/util/delegation/Delegate2.h +++ b/ucl/inc/ucl/util/delegation/Delegate2.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_DELEGATE2_H__ #define __UCL_UTIL_DELEGATION_DELEGATE2_H__ diff --git a/ucl/inc/ucl/util/delegation/Delegate2.hpp b/ucl/inc/ucl/util/delegation/Delegate2.hpp index 4128406..4d77860 100644 --- a/ucl/inc/ucl/util/delegation/Delegate2.hpp +++ b/ucl/inc/ucl/util/delegation/Delegate2.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/util/delegation/helpers.h b/ucl/inc/ucl/util/delegation/helpers.h index fdcc566..95e0481 100644 --- a/ucl/inc/ucl/util/delegation/helpers.h +++ b/ucl/inc/ucl/util/delegation/helpers.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_HELPERS_H__ #define __UCL_UTIL_DELEGATION_HELPERS_H__ diff --git a/ucl/inc/ucl/util/delegation/macro.h b/ucl/inc/ucl/util/delegation/macro.h index 4b1640f..62bf88f 100644 --- a/ucl/inc/ucl/util/delegation/macro.h +++ b/ucl/inc/ucl/util/delegation/macro.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_MACRO_H__ #define __UCL_UTIL_DELEGATION_MACRO_H__ diff --git a/ucl/inc/ucl/util/delegation/shortMacro.h b/ucl/inc/ucl/util/delegation/shortMacro.h index f9b6c06..3837977 100644 --- a/ucl/inc/ucl/util/delegation/shortMacro.h +++ b/ucl/inc/ucl/util/delegation/shortMacro.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_DELEGATION_SHORT_MACRO_H__ #define __UCL_UTIL_DELEGATION_SHORT_MACRO_H__ diff --git a/ucl/inc/ucl/util/helpers.h b/ucl/inc/ucl/util/helpers.h index 7c19f2a..87485b0 100644 --- a/ucl/inc/ucl/util/helpers.h +++ b/ucl/inc/ucl/util/helpers.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_HELPERS_H__ #define __UCL_UTIL_HELPERS_H__ @@ -29,6 +45,12 @@ namespace ucl { return value.isEmpty(); } + template + constexpr auto isEmpty(const T &value) -> decltype(isEmpty(*value)) + { + return (!value || isEmpty(*value)); + } + template constexpr bool isNotEmpty(T &&value); diff --git a/ucl/inc/ucl/util/helpers.hpp b/ucl/inc/ucl/util/helpers.hpp index 7c45c5f..a7606f8 100644 --- a/ucl/inc/ucl/util/helpers.hpp +++ b/ucl/inc/ucl/util/helpers.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { constexpr Eina_Bool toEina(const bool value) diff --git a/ucl/inc/ucl/util/logging.h b/ucl/inc/ucl/util/logging.h index c957f19..804a513 100644 --- a/ucl/inc/ucl/util/logging.h +++ b/ucl/inc/ucl/util/logging.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_LOGGING_H__ #define __UCL_UTIL_LOGGING_H__ diff --git a/ucl/inc/ucl/util/memory.h b/ucl/inc/ucl/util/memory.h index edc74ce..1fd8523 100644 --- a/ucl/inc/ucl/util/memory.h +++ b/ucl/inc/ucl/util/memory.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_H__ #define __UCL_UTIL_MEMORY_H__ diff --git a/ucl/inc/ucl/util/memory/BaseRef.h b/ucl/inc/ucl/util/memory/BaseRef.h index bfae1fb..0aa1b59 100644 --- a/ucl/inc/ucl/util/memory/BaseRef.h +++ b/ucl/inc/ucl/util/memory/BaseRef.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_BASE_REF_H__ #define __UCL_UTIL_MEMORY_BASE_REF_H__ @@ -18,6 +34,8 @@ namespace ucl { friend class WeakRef; public: + int getUseCount() const; + T *operator->() const noexcept; typename std::add_lvalue_reference::type operator*() const noexcept; diff --git a/ucl/inc/ucl/util/memory/BaseRef.hpp b/ucl/inc/ucl/util/memory/BaseRef.hpp index 047cc88..d587bc1 100644 --- a/ucl/inc/ucl/util/memory/BaseRef.hpp +++ b/ucl/inc/ucl/util/memory/BaseRef.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template @@ -34,6 +50,12 @@ namespace ucl { r.m_ptr = nullptr; } + template + inline int BaseRef::getUseCount() const + { + return (m_rc ? m_rc->getUseCount() : 0); + } + template inline T *BaseRef::operator->() const noexcept { diff --git a/ucl/inc/ucl/util/memory/RefCountObj.h b/ucl/inc/ucl/util/memory/RefCountObj.h index f067b0a..777f07e 100644 --- a/ucl/inc/ucl/util/memory/RefCountObj.h +++ b/ucl/inc/ucl/util/memory/RefCountObj.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_REF_COUNT_OBJ_H__ #define __UCL_UTIL_MEMORY_REF_COUNT_OBJ_H__ diff --git a/ucl/inc/ucl/util/memory/RefCountObj.hpp b/ucl/inc/ucl/util/memory/RefCountObj.hpp index d0cfa2a..3807bd3 100644 --- a/ucl/inc/ucl/util/memory/RefCountObj.hpp +++ b/ucl/inc/ucl/util/memory/RefCountObj.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/util/memory/RefCountObjBase.h b/ucl/inc/ucl/util/memory/RefCountObjBase.h index b5e4277..4e6edf0 100644 --- a/ucl/inc/ucl/util/memory/RefCountObjBase.h +++ b/ucl/inc/ucl/util/memory/RefCountObjBase.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_REF_COUNT_OBJ_BASE_H__ #define __UCL_UTIL_MEMORY_REF_COUNT_OBJ_BASE_H__ @@ -13,6 +29,7 @@ namespace ucl { void refWeak() noexcept; void unrefWeak() noexcept; + int getUseCount() const noexcept; bool isDisposed() const noexcept; protected: diff --git a/ucl/inc/ucl/util/memory/RefCountObjBase.hpp b/ucl/inc/ucl/util/memory/RefCountObjBase.hpp index 4edfa52..c4b5d42 100644 --- a/ucl/inc/ucl/util/memory/RefCountObjBase.hpp +++ b/ucl/inc/ucl/util/memory/RefCountObjBase.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline RefCountObjBase::RefCountObjBase() : @@ -41,6 +57,11 @@ namespace ucl { } } + inline int RefCountObjBase::getUseCount() const noexcept + { + return m_useRefs; + } + inline bool RefCountObjBase::isDisposed() const noexcept { return m_isDisposed; diff --git a/ucl/inc/ucl/util/memory/SharedRef.h b/ucl/inc/ucl/util/memory/SharedRef.h index 15b0d49..9e4793f 100644 --- a/ucl/inc/ucl/util/memory/SharedRef.h +++ b/ucl/inc/ucl/util/memory/SharedRef.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_SHARED_REF_H__ #define __UCL_UTIL_MEMORY_SHARED_REF_H__ diff --git a/ucl/inc/ucl/util/memory/SharedRef.hpp b/ucl/inc/ucl/util/memory/SharedRef.hpp index 29d8ad2..d6b4ee6 100644 --- a/ucl/inc/ucl/util/memory/SharedRef.hpp +++ b/ucl/inc/ucl/util/memory/SharedRef.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "RefCountObj.h" namespace ucl { diff --git a/ucl/inc/ucl/util/memory/WeakRef.h b/ucl/inc/ucl/util/memory/WeakRef.h index a755f2a..c8edef4 100644 --- a/ucl/inc/ucl/util/memory/WeakRef.h +++ b/ucl/inc/ucl/util/memory/WeakRef.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_WEAK_REF_H__ #define __UCL_UTIL_MEMORY_WEAK_REF_H__ diff --git a/ucl/inc/ucl/util/memory/WeakRef.hpp b/ucl/inc/ucl/util/memory/WeakRef.hpp index 3fcee28..7508815 100644 --- a/ucl/inc/ucl/util/memory/WeakRef.hpp +++ b/ucl/inc/ucl/util/memory/WeakRef.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { template diff --git a/ucl/inc/ucl/util/memory/helpers.h b/ucl/inc/ucl/util/memory/helpers.h index 96921b1..ad78591 100644 --- a/ucl/inc/ucl/util/memory/helpers.h +++ b/ucl/inc/ucl/util/memory/helpers.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_HELPERS_H__ #define __UCL_UTIL_MEMORY_HELPERS_H__ diff --git a/ucl/inc/ucl/util/memory/macro.h b/ucl/inc/ucl/util/memory/macro.h index a273096..6818ef9 100644 --- a/ucl/inc/ucl/util/memory/macro.h +++ b/ucl/inc/ucl/util/memory/macro.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_MEMORY_MACRO_H__ #define __UCL_UTIL_MEMORY_MACRO_H__ diff --git a/ucl/inc/ucl/util/shortLogs.h b/ucl/inc/ucl/util/shortLogs.h index 0e1edd4..02f8bbf 100644 --- a/ucl/inc/ucl/util/shortLogs.h +++ b/ucl/inc/ucl/util/shortLogs.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_SHORT_LOGS_H__ #define __UCL_UTIL_SHORT_LOGS_H__ diff --git a/ucl/inc/ucl/util/threading.h b/ucl/inc/ucl/util/threading.h index f8724f2..4595b1b 100644 --- a/ucl/inc/ucl/util/threading.h +++ b/ucl/inc/ucl/util/threading.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_THREADING_H__ #define __UCL_UTIL_THREADING_H__ diff --git a/ucl/inc/ucl/util/threading/CondVar.h b/ucl/inc/ucl/util/threading/CondVar.h index dc7c94d..58d16d3 100644 --- a/ucl/inc/ucl/util/threading/CondVar.h +++ b/ucl/inc/ucl/util/threading/CondVar.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_THREADING_COND_VAR_H__ #define __UCL_UTIL_THREADING_COND_VAR_H__ diff --git a/ucl/inc/ucl/util/threading/CondVar.hpp b/ucl/inc/ucl/util/threading/CondVar.hpp index eb7be06..09b0ae0 100644 --- a/ucl/inc/ucl/util/threading/CondVar.hpp +++ b/ucl/inc/ucl/util/threading/CondVar.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline CondVar::CondVar() : diff --git a/ucl/inc/ucl/util/threading/Mutex.h b/ucl/inc/ucl/util/threading/Mutex.h index 8e53e0a..a6280cc 100644 --- a/ucl/inc/ucl/util/threading/Mutex.h +++ b/ucl/inc/ucl/util/threading/Mutex.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_THREADING_MUTEX_H__ #define __UCL_UTIL_THREADING_MUTEX_H__ diff --git a/ucl/inc/ucl/util/threading/Mutex.hpp b/ucl/inc/ucl/util/threading/Mutex.hpp index 71e5baa..d152df3 100644 --- a/ucl/inc/ucl/util/threading/Mutex.hpp +++ b/ucl/inc/ucl/util/threading/Mutex.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline Mutex::Mutex() : diff --git a/ucl/inc/ucl/util/threading/MutexLock.h b/ucl/inc/ucl/util/threading/MutexLock.h index a982b0c..854d0b3 100644 --- a/ucl/inc/ucl/util/threading/MutexLock.h +++ b/ucl/inc/ucl/util/threading/MutexLock.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_THREADING_MUTEX_LOCK_H__ #define __UCL_UTIL_THREADING_MUTEX_LOCK_H__ diff --git a/ucl/inc/ucl/util/threading/MutexLock.hpp b/ucl/inc/ucl/util/threading/MutexLock.hpp index 251978e..a30d995 100644 --- a/ucl/inc/ucl/util/threading/MutexLock.hpp +++ b/ucl/inc/ucl/util/threading/MutexLock.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { inline MutexLock::MutexLock(Mutex &mutex) : diff --git a/ucl/inc/ucl/util/threading/Thread.h b/ucl/inc/ucl/util/threading/Thread.h index aa2cfba..0839921 100644 --- a/ucl/inc/ucl/util/threading/Thread.h +++ b/ucl/inc/ucl/util/threading/Thread.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_THREADING_THREAD_H__ #define __UCL_UTIL_THREADING_THREAD_H__ diff --git a/ucl/inc/ucl/util/threading/Thread.hpp b/ucl/inc/ucl/util/threading/Thread.hpp index 4e5255b..74259c1 100644 --- a/ucl/inc/ucl/util/threading/Thread.hpp +++ b/ucl/inc/ucl/util/threading/Thread.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/util/logging.h" namespace ucl { diff --git a/ucl/inc/ucl/util/types.h b/ucl/inc/ucl/util/types.h index e20ca41..70a33d3 100644 --- a/ucl/inc/ucl/util/types.h +++ b/ucl/inc/ucl/util/types.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_TYPES_H__ #define __UCL_UTIL_TYPES_H__ diff --git a/ucl/inc/ucl/util/types/Result.h b/ucl/inc/ucl/util/types/Result.h index 83ac56d..69815a7 100644 --- a/ucl/inc/ucl/util/types/Result.h +++ b/ucl/inc/ucl/util/types/Result.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_TYPES_RESULT_H__ #define __UCL_UTIL_TYPES_RESULT_H__ diff --git a/ucl/inc/ucl/util/types/Result.hpp b/ucl/inc/ucl/util/types/Result.hpp index 9c3fd38..c83db4c 100644 --- a/ucl/inc/ucl/util/types/Result.hpp +++ b/ucl/inc/ucl/util/types/Result.hpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + namespace ucl { constexpr bool isGood(const Result result) diff --git a/ucl/inc/ucl/util/types/baseTypes.h b/ucl/inc/ucl/util/types/baseTypes.h index f118bf4..5b280de 100644 --- a/ucl/inc/ucl/util/types/baseTypes.h +++ b/ucl/inc/ucl/util/types/baseTypes.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_TYPES_BASE_TYPES_H__ #define __UCL_UTIL_TYPES_BASE_TYPES_H__ diff --git a/ucl/inc/ucl/util/types/classTypes.h b/ucl/inc/ucl/util/types/classTypes.h index d264084..b340c34 100644 --- a/ucl/inc/ucl/util/types/classTypes.h +++ b/ucl/inc/ucl/util/types/classTypes.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_UTIL_TYPES_CLASS_TYPES_H__ #define __UCL_UTIL_TYPES_CLASS_TYPES_H__ diff --git a/ucl/src/appfw/InstanceManagerBase.cpp b/ucl/src/appfw/InstanceManagerBase.cpp index 8929394..a643b38 100644 --- a/ucl/src/appfw/InstanceManagerBase.cpp +++ b/ucl/src/appfw/InstanceManagerBase.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/appfw/InstanceManagerBase.h" #include "../common.h" diff --git a/ucl/src/appfw/SysEventProvider.cpp b/ucl/src/appfw/SysEventProvider.cpp index 459bdb1..3b8994e 100644 --- a/ucl/src/appfw/SysEventProvider.cpp +++ b/ucl/src/appfw/SysEventProvider.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/appfw/SysEventProvider.h" #include "../common.h" diff --git a/ucl/src/appfw/UIApp.cpp b/ucl/src/appfw/UIApp.cpp index 61b1e47..49c5e67 100644 --- a/ucl/src/appfw/UIApp.cpp +++ b/ucl/src/appfw/UIApp.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/appfw/UIApp.h" #include diff --git a/ucl/src/common.h b/ucl/src/common.h index 24857a2..f03d194 100644 --- a/ucl/src/common.h +++ b/ucl/src/common.h @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef __UCL_COMMON_H__ #define __UCL_COMMON_H__ diff --git a/ucl/src/gui/EdjeWidget.cpp b/ucl/src/gui/EdjeWidget.cpp index 57293db..8d67596 100644 --- a/ucl/src/gui/EdjeWidget.cpp +++ b/ucl/src/gui/EdjeWidget.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/gui/EdjeWidget.h" namespace ucl { @@ -18,7 +34,7 @@ namespace ucl { } } - void EdjeWidget::setText(const EdjePart part, const TString &value) + void EdjeWidget::setText(const TString &value, const EdjePart part) { if (value.isTranslatable()) { if (value.hasDomain()) { diff --git a/ucl/src/gui/ElmWidget.cpp b/ucl/src/gui/ElmWidget.cpp index 4451c16..cf99eb7 100644 --- a/ucl/src/gui/ElmWidget.cpp +++ b/ucl/src/gui/ElmWidget.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/gui/ElmWidget.h" #include "ucl/gui/Window.h" diff --git a/ucl/src/gui/Layout.cpp b/ucl/src/gui/Layout.cpp index bd43c37..070a8d6 100644 --- a/ucl/src/gui/Layout.cpp +++ b/ucl/src/gui/Layout.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/gui/Layout.h" #include "ucl/gui/stdTheme/layout.h" @@ -12,8 +28,7 @@ namespace ucl { { Evas_Object *const eo = elm_layout_add(parent); if (!eo) { - ELOG("elm_layout_add() failed!"); - return {}; + LOG_RETURN_VALUE(RES_FAIL, {}, "elm_layout_add() failed!"); } auto result = makeShared(eo, m_isOwner); @@ -22,10 +37,16 @@ namespace ucl { result->bindToEo(); } + bool isOk = true; + if (isNotEmpty(m_edjeFilePath) && isValid(m_edjeGroup)) { - result->setEdjeFile(m_edjeFilePath, m_edjeGroup); - } else { - result->setTheme(isValid(m_theme) ? m_theme : LAYOUT_DEFAULT); + isOk = result->setEdjeFile(m_edjeFilePath, m_edjeGroup); + } else if (isValid(m_theme)) { + isOk = result->setTheme(m_theme); + } + + if (!isOk) { + LOG_RETURN_VALUE(RES_FAIL, {}, "Layout init failed!"); } show(*result); diff --git a/ucl/src/gui/Naviframe.cpp b/ucl/src/gui/Naviframe.cpp index 0814cb5..1f8a589 100644 --- a/ucl/src/gui/Naviframe.cpp +++ b/ucl/src/gui/Naviframe.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/gui/Naviframe.h" #include "../common.h" @@ -14,7 +30,7 @@ namespace ucl { return {}; } - auto result = makeShared(eo, m_isOwner); + auto result = makeShared(eo); if (m_needBindToEo) { result->bindToEo(); @@ -43,7 +59,7 @@ namespace ucl { { if (!m_isInTransition) { m_isInTransition = true; - callSmartEvent(NAVI_TRANSITION_STARTED); + callEvent(NAVI_TRANSITION_STARTED); } } diff --git a/ucl/src/gui/Widget.cpp b/ucl/src/gui/Widget.cpp index 6f4b631..5012a6a 100644 --- a/ucl/src/gui/Widget.cpp +++ b/ucl/src/gui/Widget.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/gui/Widget.h" #include "../common.h" diff --git a/ucl/src/gui/WidgetItem.cpp b/ucl/src/gui/WidgetItem.cpp index 05ab85a..04d1fca 100644 --- a/ucl/src/gui/WidgetItem.cpp +++ b/ucl/src/gui/WidgetItem.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/gui/WidgetItem.h" namespace ucl { @@ -17,8 +33,8 @@ namespace ucl { } } - void WidgetItem::setText( - const EdjePart part, const TString &value) const + void WidgetItem::setText(const TString &value, + const EdjePart part) const { if (value.isTranslatable()) { if (value.hasDomain()) { diff --git a/ucl/src/gui/Window.cpp b/ucl/src/gui/Window.cpp index 23a99d2..e63a0e7 100644 --- a/ucl/src/gui/Window.cpp +++ b/ucl/src/gui/Window.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/gui/Window.h" #include "../common.h" diff --git a/ucl/src/misc/Variant.cpp b/ucl/src/misc/Variant.cpp index d6cebfa..6513076 100644 --- a/ucl/src/misc/Variant.cpp +++ b/ucl/src/misc/Variant.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/misc/Variant.h" #include "../common.h" diff --git a/ucl/src/util/logging.cpp b/ucl/src/util/logging.cpp index cd341a5..311f25b 100644 --- a/ucl/src/util/logging.cpp +++ b/ucl/src/util/logging.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/util/logging.h" #if (UCL_DEFINE_GET_UCL_RESULT_DATA) diff --git a/ucl/src/util/types/Result.cpp b/ucl/src/util/types/Result.cpp index 7e0464f..b42875e 100644 --- a/ucl/src/util/types/Result.cpp +++ b/ucl/src/util/types/Result.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "ucl/util/types/Result.h" #include "ucl/util/logging.h"