From 3090d906d50810247f3e32cf5b2e208b9cbfa821 Mon Sep 17 00:00:00 2001 From: Dae Young Ryu Date: Tue, 10 Sep 2013 18:16:08 +0900 Subject: [PATCH] updated dynamic property logic Change-Id: I38b81e4bde54f8a953fec78ce0e3a34c4666b1de Signed-off-by: Dae Young Ryu --- src/ui/animations/FUiAnim_DynamicProperty.cpp | 56 +++++-- src/ui/animations/FUiAnim_DynamicProperty.h | 13 +- src/ui/animations/FUiAnim_GeometryInfo.cpp | 217 ++++++++++++++------------ src/ui/inc/FUiAnim_MeshImpl.h | 4 +- 4 files changed, 171 insertions(+), 119 deletions(-) diff --git a/src/ui/animations/FUiAnim_DynamicProperty.cpp b/src/ui/animations/FUiAnim_DynamicProperty.cpp index c78aaef..6c42a33 100644 --- a/src/ui/animations/FUiAnim_DynamicProperty.cpp +++ b/src/ui/animations/FUiAnim_DynamicProperty.cpp @@ -31,6 +31,18 @@ using namespace Tizen::Base; using namespace Tizen::Base::Collection; +//#define PRINT(FMT__,...) print(FMT__, __VA_ARGS__) +//#define PRINT(...) SysLog(NID_UI_ANIM, __VA_ARGS__) +#define PRINT(...) + +//static void PRINT(const char* format ,...) +//{ +// va_list arg; +// va_start(arg,format); +// vfprintf(stderr,format, arg); +// va_end(arg); +//} + namespace Tizen { namespace Ui { namespace Animations { @@ -89,16 +101,29 @@ _DynamicKeyString::_DynamicKeyString(const wchar_t* pKeyString) }while(pToken); } + bool -_DynamicKeyString::Equals(const Tizen::Base::String& comparekey) const +_DynamicKeyString::Compare(const Tizen::Base::String& comparekey, int at) const { const wchar_t* pSrc = __name.GetPointer(); const wchar_t* pDst = comparekey.GetPointer(); + int srcLen = __name.GetLength(); + int dstLen = comparekey.GetLength(); + + if(srcLen <= at) + { + return false; + } - for(int i = 0, j = 0; pSrc[i]!=0 && pDst[j]!=0;i++,j++) + for(int i = at, j = at ; i < srcLen && j < dstLen ; i++, j++) { if(pSrc[i] == '#') { + if(pDst[j] != '#') + { + return false; + } + for( ;pSrc[i] != 0;i++) { if(pSrc[i] == '.') @@ -114,12 +139,17 @@ _DynamicKeyString::Equals(const Tizen::Base::String& comparekey) const break; } } + if(pSrc[i] != pDst[j]) + { return false; + } + } return true; } + const Tizen::Base::String _DynamicKeyString::GetSubString(int index) const { @@ -131,28 +161,25 @@ _DynamicKeyString::GetSubString(int index) const } - - static wchar_t __valueString[1024]; -_DyanamicPropertyString::_DyanamicPropertyString(_DynamicKeyString& keyString, const Tizen::Base::String& property) +_DyanamicPropertyString::_DyanamicPropertyString(_DynamicKeyString& keyString, const Tizen::Base::String& property, int at) :__keyString(keyString) { - __isAvailable = __keyString.Equals(property); + __isAvailable = __keyString.Compare(property,at); static ComparerT comparer; static StringHashCodeProvider strHashCodeProvider; - __map.Construct(16, 0.75, strHashCodeProvider, comparer); - if(__isAvailable == true) { + __map.Construct(16, 0.75, strHashCodeProvider, comparer); int count = __keyString.GetSubStringCount(); int subIndex = 0; const wchar_t* pDst = property.GetPointer(); - for(int j = 0 ; pDst[j]!=0 ; j++) + for(int j = at ; pDst[j]!=0 ; j++) { if(pDst[j] == '#') { @@ -191,9 +218,10 @@ _DyanamicPropertyString::_DyanamicPropertyString(_DynamicKeyString& keyString, c Tizen::Base::String _DyanamicPropertyString::GetValue(const Tizen::Base::String& key) const { + String value; if(!__isAvailable) { - return null; + return value; } bool out = false; @@ -201,11 +229,9 @@ _DyanamicPropertyString::GetValue(const Tizen::Base::String& key) const __map.ContainsKey(key,out); if(out != true) { - return null; + return value; } - String value; - __map.GetValue(key, value); return value; @@ -223,7 +249,7 @@ _DyanamicPropertyString::GetValueToInteger(const Tizen::Base::String& key, long& { if(!__isAvailable) { - return null; + return E_INVALID_STATE; } bool out = false; @@ -231,7 +257,7 @@ _DyanamicPropertyString::GetValueToInteger(const Tizen::Base::String& key, long& __map.ContainsKey(key,out); if(out != true) { - return null; + return E_KEY_NOT_FOUND; } String valueStr; diff --git a/src/ui/animations/FUiAnim_DynamicProperty.h b/src/ui/animations/FUiAnim_DynamicProperty.h index c42c8e7..32bb5e4 100644 --- a/src/ui/animations/FUiAnim_DynamicProperty.h +++ b/src/ui/animations/FUiAnim_DynamicProperty.h @@ -35,7 +35,7 @@ namespace Tizen { namespace Ui { namespace Animations { -//keyString rule : '.' = token , '#' = name +//keyString rule : '.' = token , '#' = name or value class _DynamicKeyString : public Tizen::Base::Object { @@ -54,9 +54,12 @@ public: } const Tizen::Base::String GetSubString(int index) const; - virtual bool Equals(const Tizen::Base::String& comparekey)const; + bool Compare(const Tizen::Base::String& comparekey, int at = 0) const; private: + _DynamicKeyString(const _DynamicKeyString& rhs); + const _DynamicKeyString& operator = (const _DynamicKeyString& rhs); +private: Tizen::Base::String __name; Tizen::Base::Collection::ArrayListT __subStrings; }; @@ -65,7 +68,8 @@ private: class _DyanamicPropertyString: public Tizen::Base::Object { public: - explicit _DyanamicPropertyString(_DynamicKeyString& keyString, const Tizen::Base::String& property); + explicit _DyanamicPropertyString(_DynamicKeyString& keyString, const Tizen::Base::String& property, int at = 0); + Tizen::Base::String GetValue(const Tizen::Base::String& key) const; result GetValueToInteger(const Tizen::Base::String& key, long& value) const; @@ -73,6 +77,9 @@ public: { return __isAvailable; } +private: + _DyanamicPropertyString(const _DyanamicPropertyString& rhs); + const _DyanamicPropertyString& operator = (const _DyanamicPropertyString& rhs); private: _DynamicKeyString& __keyString; diff --git a/src/ui/animations/FUiAnim_GeometryInfo.cpp b/src/ui/animations/FUiAnim_GeometryInfo.cpp index 984faf3..8b92002 100644 --- a/src/ui/animations/FUiAnim_GeometryInfo.cpp +++ b/src/ui/animations/FUiAnim_GeometryInfo.cpp @@ -35,15 +35,15 @@ //#define PRINT(FMT__,...) print(FMT__, __VA_ARGS__) //#define PRINT(...) SysLog(NID_UI_ANIM, __VA_ARGS__) -//#define PRINT(...) +#define PRINT(...) -void PRINT(const char* format ,...) -{ - va_list arg; - va_start(arg,format); - vfprintf(stderr,format, arg); - va_end(arg); -} +//static void PRINT(const char* format ,...) +//{ +// va_list arg; +// va_start(arg,format); +// vfprintf(stderr,format, arg); +// va_end(arg); +//} using namespace Tizen::Base; @@ -159,15 +159,18 @@ _GeometryInfo::GetShaderProgram(void) { return __pShaderProgram; } + result _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& value) { //TODO : implementation int index = 0; + int prefixLength = 0; + _DynamicKeyString* pKeyString = null; + static const String mesh(L"mesh"); static const String material(L"material"); static const String light(L"light"); - _DynamicKeyString* pKeyString = null; PRINT("property:%ls\n",property.GetPointer()); @@ -180,15 +183,17 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v return E_OBJ_NOT_FOUND; } + prefixLength = mesh.GetLength(); - bool check = pVeMeshPropVertex->Equals(property); + + bool check = pVeMeshPropVertex->Compare(property, prefixLength); PRINT("property check :%ls : %d -> %ls\n",property.GetPointer(), check,pVeMeshPropVertex->GetKeyString().GetPointer()); - if(pVeMeshPropVertexCount->Equals(property)) + if(pVeMeshPropVertexCount->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } - else if(pVeMeshPropVertex->Equals(property)) + else if(pVeMeshPropVertex->Compare(property, prefixLength)) { pKeyString = pVeMeshPropVertex; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -207,7 +212,7 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v return E_SUCCESS; } } - else if(pVeMeshPropColor->Equals(property)) + else if(pVeMeshPropColor->Compare(property, prefixLength)) { pKeyString = pVeMeshPropColor; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -226,7 +231,7 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v } return E_INVALID_ARG; } - else if(pVeMeshPropTextureCoord->Equals(property)) + else if(pVeMeshPropTextureCoord->Compare(property, prefixLength)) { pKeyString = pVeMeshPropTextureCoord; @@ -246,7 +251,7 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v } return E_INVALID_ARG; } - else if(pVeMeshPropNormal->Equals(property)) + else if(pVeMeshPropNormal->Compare(property, prefixLength)) { pKeyString = pVeMeshPropNormal; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -266,7 +271,7 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v } } - else if(pVeMeshPropVertexIndex->Equals(property)) + else if(pVeMeshPropVertexIndex->Compare(property, prefixLength)) { pKeyString = pVeMeshPropVertexIndex; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -285,11 +290,11 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v return E_SUCCESS; } } - else if(pVeMeshPropBoneCount->Equals(property)) + else if(pVeMeshPropBoneCount->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } - else if(pVeMeshPropBone->Equals(property)) + else if(pVeMeshPropBone->Compare(property, prefixLength)) { pKeyString = pVeMeshPropBone; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -304,11 +309,11 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeMeshPropBoneIndex->Equals(property)) + else if(pVeMeshPropBoneIndex->Compare(property, prefixLength)) { pKeyString = pVeMeshPropBoneIndex; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -323,11 +328,11 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeMeshPropBoneWeight->Equals(property)) + else if(pVeMeshPropBoneWeight->Compare(property, prefixLength)) { pKeyString = pVeMeshPropBoneWeight; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -342,7 +347,7 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } @@ -353,24 +358,25 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v } else if(property.IndexOf(material, 0, index) == E_SUCCESS) { + prefixLength = material.GetLength(); - if(pVeMaterialDiffuse->Equals(property)) + if(pVeMaterialDiffuse->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } - else if(pVeMaterialSpecular->Equals(property)) + else if(pVeMaterialSpecular->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } - else if(pVeMaterialAmbient->Equals(property)) + else if(pVeMaterialAmbient->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } - else if(pVeMaterialEmissive->Equals(property)) + else if(pVeMaterialEmissive->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } - else if(pVeMaterialShiness->Equals(property)) + else if(pVeMaterialShiness->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } @@ -381,12 +387,13 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v } else if(property.IndexOf(light, 0, index) == E_SUCCESS) { + prefixLength = light.GetLength(); - if(pVeLightCount->Equals(property)) + if(pVeLightCount->Compare(property, prefixLength)) { PRINT("SetProperty:%ls\n",property.GetPointer()); } - else if(pVeLightType->Equals(property)) + else if(pVeLightType->Compare(property, prefixLength)) { pKeyString = pVeLightType; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -401,12 +408,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightDiffuse->Equals(property)) + else if(pVeLightDiffuse->Compare(property, prefixLength)) { pKeyString = pVeLightDiffuse; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -421,12 +428,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightSpecular->Equals(property)) + else if(pVeLightSpecular->Compare(property, prefixLength)) { pKeyString = pVeLightSpecular; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -441,12 +448,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightAmbient->Equals(property)) + else if(pVeLightAmbient->Compare(property, prefixLength)) { pKeyString = pVeLightAmbient; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -461,12 +468,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightPosition->Equals(property)) + else if(pVeLightPosition->Compare(property, prefixLength)) { pKeyString = pVeLightPosition; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -481,12 +488,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightDirection->Equals(property)) + else if(pVeLightDirection->Compare(property, prefixLength)) { pKeyString = pVeLightDirection; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -501,12 +508,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightExponent->Equals(property)) + else if(pVeLightExponent->Compare(property, prefixLength)) { pKeyString = pVeLightExponent; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -521,12 +528,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightCutOff->Equals(property)) + else if(pVeLightCutOff->Compare(property, prefixLength)) { pKeyString = pVeLightCutOff; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -541,12 +548,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightConstantAttenuation->Equals(property)) + else if(pVeLightConstantAttenuation->Compare(property, prefixLength)) { pKeyString = pVeLightConstantAttenuation; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -561,12 +568,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightLinearAttenuation->Equals(property)) + else if(pVeLightLinearAttenuation->Compare(property, prefixLength)) { pKeyString = pVeLightLinearAttenuation; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -581,12 +588,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } - else if(pVeLightQuadraticAttenuation->Equals(property)) + else if(pVeLightQuadraticAttenuation->Compare(property, prefixLength)) { pKeyString = pVeLightQuadraticAttenuation; PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -601,12 +608,12 @@ _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& v if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT return E_SUCCESS; } } } - return E_OUT_OF_RANGE; + return E_INVALID_ARG; } Variant @@ -614,10 +621,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const { //TODO : implementation int index = 0; + int prefixLength = 0; + _DynamicKeyString* pKeyString = null; + static const String mesh(L"mesh"); static const String material(L"material"); static const String light(L"light"); - _DynamicKeyString* pKeyString = null; PRINT("property:%ls\n",property.GetPointer()); @@ -629,12 +638,13 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const { goto ERROR_RETURN; } + prefixLength = mesh.GetLength(); - if(pVeMeshPropVertexCount->Equals(property)) + if(pVeMeshPropVertexCount->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); } - else if(pVeMeshPropVertex->Equals(property)) + else if(pVeMeshPropVertex->Compare(property, prefixLength)) { pKeyString = pVeMeshPropVertexCount; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -643,23 +653,22 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const _DyanamicPropertyString prop(*pKeyString, property); if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - return __pMesh->GetVertex(index); + return Variant(__pMesh->GetVertex(index)); } } - else if(pVeMeshPropColor->Equals(property)) + else if(pVeMeshPropColor->Compare(property, prefixLength)) { pKeyString = pVeMeshPropColor; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); - long index = -1; _DyanamicPropertyString prop(*pKeyString, property); if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - return __pMesh->GetColor(index); + return Variant(__pMesh->GetColor(index)); } } - else if(pVeMeshPropTextureCoord->Equals(property)) + else if(pVeMeshPropTextureCoord->Compare(property, prefixLength)) { pKeyString = pVeMeshPropTextureCoord; @@ -669,10 +678,10 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const _DyanamicPropertyString prop(*pKeyString, property); if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - return __pMesh->GetTextureCoord(index); + return Variant(__pMesh->GetTextureCoord(index)); } } - else if(pVeMeshPropNormal->Equals(property)) + else if(pVeMeshPropNormal->Compare(property, prefixLength)) { pKeyString = pVeMeshPropNormal; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -682,11 +691,11 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const _DyanamicPropertyString prop(*pKeyString, property); if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - return __pMesh->GetNormal(index); + return Variant(__pMesh->GetNormal(index)); } } - else if(pVeMeshPropVertexIndex->Equals(property)) + else if(pVeMeshPropVertexIndex->Compare(property, prefixLength)) { pKeyString = pVeMeshPropVertexIndex; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -695,14 +704,14 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const _DyanamicPropertyString prop(*pKeyString, property); if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - return __pMesh->GetIndex(index); + return Variant(__pMesh->GetIndex(index)); } } - else if(pVeMeshPropBoneCount->Equals(property)) + else if(pVeMeshPropBoneCount->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); } - else if(pVeMeshPropBone->Equals(property)) + else if(pVeMeshPropBone->Compare(property, prefixLength)) { pKeyString = pVeMeshPropBone; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -712,11 +721,11 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeMeshPropBoneIndex->Equals(property)) + else if(pVeMeshPropBoneIndex->Compare(property, prefixLength)) { pKeyString = pVeMeshPropBoneIndex; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -726,11 +735,11 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeMeshPropBoneWeight->Equals(property)) + else if(pVeMeshPropBoneWeight->Compare(property, prefixLength)) { pKeyString = pVeMeshPropBoneWeight; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -740,43 +749,51 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } } else if(property.IndexOf(material, 0, index) == E_SUCCESS) { + prefixLength = material.GetLength(); - if(pVeMaterialDiffuse->Equals(property)) + if(pVeMaterialDiffuse->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); + //TODO: IMPLEMENT } - else if(pVeMaterialSpecular->Equals(property)) + else if(pVeMaterialSpecular->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); + //TODO: IMPLEMENT } - else if(pVeMaterialAmbient->Equals(property)) + else if(pVeMaterialAmbient->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); + //TODO: IMPLEMENT } - else if(pVeMaterialEmissive->Equals(property)) + else if(pVeMaterialEmissive->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); + //TODO: IMPLEMENT } - else if(pVeMaterialShiness->Equals(property)) + else if(pVeMaterialShiness->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); + //TODO: IMPLEMENT } } else if(property.IndexOf(light, 0, index) == E_SUCCESS) { + prefixLength = light.GetLength(); - if(pVeLightCount->Equals(property)) + if(pVeLightCount->Compare(property, prefixLength)) { PRINT("GetProperty:%ls\n",property.GetPointer()); + //TODO: IMPLEMENT } - else if(pVeLightType->Equals(property)) + else if(pVeLightType->Compare(property, prefixLength)) { pKeyString = pVeLightType; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -786,12 +803,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightDiffuse->Equals(property)) + else if(pVeLightDiffuse->Compare(property, prefixLength)) { pKeyString = pVeLightDiffuse; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -801,12 +818,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightSpecular->Equals(property)) + else if(pVeLightSpecular->Compare(property, prefixLength)) { pKeyString = pVeLightSpecular; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -816,12 +833,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightAmbient->Equals(property)) + else if(pVeLightAmbient->Compare(property, prefixLength)) { pKeyString = pVeLightAmbient; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -831,12 +848,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightPosition->Equals(property)) + else if(pVeLightPosition->Compare(property, prefixLength)) { pKeyString = pVeLightPosition; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -846,12 +863,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightDirection->Equals(property)) + else if(pVeLightDirection->Compare(property, prefixLength)) { pKeyString = pVeLightDirection; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -861,12 +878,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightExponent->Equals(property)) + else if(pVeLightExponent->Compare(property, prefixLength)) { pKeyString = pVeLightExponent; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -876,12 +893,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightCutOff->Equals(property)) + else if(pVeLightCutOff->Compare(property, prefixLength)) { pKeyString = pVeLightCutOff; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -891,12 +908,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightConstantAttenuation->Equals(property)) + else if(pVeLightConstantAttenuation->Compare(property, prefixLength)) { pKeyString = pVeLightConstantAttenuation; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -906,12 +923,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightLinearAttenuation->Equals(property)) + else if(pVeLightLinearAttenuation->Compare(property, prefixLength)) { pKeyString = pVeLightLinearAttenuation; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -921,12 +938,12 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } - else if(pVeLightQuadraticAttenuation->Equals(property)) + else if(pVeLightQuadraticAttenuation->Compare(property, prefixLength)) { pKeyString = pVeLightQuadraticAttenuation; PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer()); @@ -936,7 +953,7 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS) { - //__pMesh->SetBone(index, value.ToFloatPoint3()); + //TODO: IMPLEMENT goto ERROR_RETURN; } } diff --git a/src/ui/inc/FUiAnim_MeshImpl.h b/src/ui/inc/FUiAnim_MeshImpl.h index cf99f91..21d9c26 100644 --- a/src/ui/inc/FUiAnim_MeshImpl.h +++ b/src/ui/inc/FUiAnim_MeshImpl.h @@ -37,7 +37,9 @@ public: } int GetRefCount(){return __ref;} - +private: + RefObject(RefObject& ); + RefObject& operator =(RefObject& ); protected: ~RefObject(){} virtual void OnDestructing(){} -- 2.7.4