From ae6e547cffbc399568e3a3f74bf50ccf4740d1b7 Mon Sep 17 00:00:00 2001 From: Dae Young Ryu Date: Mon, 7 Oct 2013 17:08:26 +0900 Subject: [PATCH] for ui-core build Change-Id: I725f48ed5ea1f9fb8b0a25df3c20c8d83f0cfc5c Signed-off-by: Dae Young Ryu --- src/ui-core/readme.txt | 12 ++ src/ui-core/src/CMakeLists.txt | 7 +- .../src/base/FBaseStringHashCodeProvider.cpp | 47 ++++++++ .../src/base/inc/FBaseStringHashCodeProvider.h | 130 +++++++++++++++++++++ src/ui/animations/FUiAnimShader.cpp | 2 +- 5 files changed, 195 insertions(+), 3 deletions(-) create mode 100644 src/ui-core/readme.txt create mode 100644 src/ui-core/src/base/FBaseStringHashCodeProvider.cpp create mode 100644 src/ui-core/src/base/inc/FBaseStringHashCodeProvider.h diff --git a/src/ui-core/readme.txt b/src/ui-core/readme.txt new file mode 100644 index 0000000..36afae6 --- /dev/null +++ b/src/ui-core/readme.txt @@ -0,0 +1,12 @@ + + +1. make folder : _cmake +..../ui-core/_cmake + +2. move to _cmake folder +3. run cmake : cmake -D LINUX=1 .. +..../ui-core/_cmake/cmake -D LINUX=1 .. +4 run make : +..../ui-core/_cmake/make + + diff --git a/src/ui-core/src/CMakeLists.txt b/src/ui-core/src/CMakeLists.txt index 998ba0e..7c92e74 100644 --- a/src/ui-core/src/CMakeLists.txt +++ b/src/ui-core/src/CMakeLists.txt @@ -135,7 +135,9 @@ SET(${this_target}_SOURCE_FILES ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_GlRenderManager.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_GlShaderProgram.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_GlVisualElementSurfaceImpl.cpp + ${UIFW_DIRECTORY}/src/ui/animations/FUiAnimShaderProgram.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_ShaderProgramImpl.cpp + ${UIFW_DIRECTORY}/src/ui/animations/FUiAnimShader.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_ShaderImpl.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_INativeNode.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnimIVisualElementAnimationStatusEventListener.cpp @@ -191,8 +193,9 @@ SET(${this_target}_SOURCE_FILES ${UIFW_DIRECTORY}/src/ui/animations/math/FUiAnim_MathVector4.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_GlDefaultShaderProgram.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_DynamicProperty.cpp - ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_CustomShader.cpp - ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_BoundingVolume.cpp +# ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_CustomShader.cpp + ${UIFW_DIRECTORY}/src/ui/animations/FUiAnimBoundingVolume.cpp + ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_BoundingVolumeImpl.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_MeshImpl.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnim_Ray.cpp ${UIFW_DIRECTORY}/src/ui/animations/FUiAnimLight.cpp diff --git a/src/ui-core/src/base/FBaseStringHashCodeProvider.cpp b/src/ui-core/src/base/FBaseStringHashCodeProvider.cpp new file mode 100644 index 0000000..58b9868 --- /dev/null +++ b/src/ui-core/src/base/FBaseStringHashCodeProvider.cpp @@ -0,0 +1,47 @@ +// +// Copyright (c) 2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// 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. +// + +/** + * @file FBaseStringHashCodeProvider.cpp + * @brief This is the implementation file for StringHashCodeProvider class. + */ +#include +#include + +namespace Tizen { namespace Base +{ + +StringHashCodeProvider::StringHashCodeProvider(void) +{ +} + +StringHashCodeProvider::~StringHashCodeProvider(void) +{ +} + +int +StringHashCodeProvider::GetHashCode(const Tizen::Base::String& str) const +{ + return str.GetHashCode(); +} + +int +StringHashCodeProvider::GetHashCode(const Tizen::Base::Object& obj) const +{ + return obj.GetHashCode(); +} + +}} //Tizen::Base diff --git a/src/ui-core/src/base/inc/FBaseStringHashCodeProvider.h b/src/ui-core/src/base/inc/FBaseStringHashCodeProvider.h new file mode 100644 index 0000000..9e98d1e --- /dev/null +++ b/src/ui-core/src/base/inc/FBaseStringHashCodeProvider.h @@ -0,0 +1,130 @@ +// +// Copyright (c) 2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// 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. +// + +/** + * @file FBaseStringHashCodeProvider.h + * @brief This is the header file for the %StringHashCodeProvider class. + * + * This header file contains the declarations of the %StringHashCodeProvider class. + */ +#ifndef _FBASE_STRING_HASH_CODE_PROVIDER_H_ +#define _FBASE_STRING_HASH_CODE_PROVIDER_H_ + +#include +#include +#include + +namespace Tizen { namespace Base +{ +/** + * @class StringHashCodeProvider + * @brief This class provides the hash code of an instance of type %String. + * + * @since 2.1 + * + * The %StringHashCodeProvider class provides the hash code of an instance of type String. + * + * The following example demonstrates how to use the %StringHashCodeProvider class. + * + * @code + * + * #include + * + * using namespace Tizen::Base; + * using namespace Tizen::Base::Collection; + * + * void + * MyClass::StringHashCodeProviderSample(void) + * { + * HashMapT map; + * + * ComparerT comparer; + * StringHashCodeProvider strHashCodeProvider; + * + * map.Construct(0, 0, strHashCodeProvider, comparer); + * + * map.Add(String(L"Zero"), 0); + * map.Add(String(L"One"), 1); + * map.Add(String(L"Two"), 2); + * + * ... + * } + * @endcode + */ +class _OSP_EXPORT_ StringHashCodeProvider + : public virtual Tizen::Base::Collection::IHashCodeProvider + , public virtual Tizen::Base::Collection::IHashCodeProviderT + , public Tizen::Base::Object +{ +public: + using Object::GetHashCode; + + /** + * This is the default constructor for this class. + * + * @since 2.1 + */ + StringHashCodeProvider(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.1 + */ + virtual ~StringHashCodeProvider(void); + + /** + * Gets the hash code of an instance of type String. + * + * @since 2.1 + * + * @return The hash code of an instance of type String + * @param[in] str The String instance whose hash code is requested + * @remarks The hash algorithm is usually specific to a type. + * Two equal instances must return the same hash value. + * For better performance, the used hash function must generate a random distribution for all inputs. + */ + virtual int GetHashCode(const Tizen::Base::String& str) const; + + /** + * Gets the hash code of the specified object. + * + * @since 2.1 + * + * @return The hash code of the specified object + * @param[in] obj The Object whose hash code is requested + * @remarks The hash algorithm is usually specific to a type. + * Two equal instances must return the same hash value. + * For better performance, the used hash function must generate a random distribution for all inputs. + */ + virtual int GetHashCode(const Tizen::Base::Object& obj) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + StringHashCodeProvider(const StringHashCodeProvider& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + StringHashCodeProvider& operator =(const StringHashCodeProvider& rhs); + +}; // StringHashCodeProvider + +}} // Tizen::Base + +#endif // _FBASE_STRING_HASH_CODE_PROVIDER_H_ diff --git a/src/ui/animations/FUiAnimShader.cpp b/src/ui/animations/FUiAnimShader.cpp index 3dae77c..96c54da 100644 --- a/src/ui/animations/FUiAnimShader.cpp +++ b/src/ui/animations/FUiAnimShader.cpp @@ -23,7 +23,7 @@ */ #include - +#include #include #include "FUiAnim_ShaderImpl.h" -- 2.7.4