Merge changes I84e1ce43,I76b93d51 into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / event / common / object-impl-helper.h
index 8b5032b..595baee 100644 (file)
@@ -77,7 +77,7 @@ struct ObjectImplHelper
   {
     indices.Reserve( DEFAULT_PROPERTY_COUNT );
 
-    for( unsigned int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
+    for( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
     {
       indices.PushBack( DEFAULT_OBJECT_PROPERTY_START_INDEX + i );
     }
@@ -99,12 +99,8 @@ struct ObjectImplHelper
   {
     Property::Index index = Property::INVALID_INDEX;
 
-    //@todo MESH_REWORK - Are we assuming that the index into the array is the
-    // same as the enumerated property? if enumIndex in the table was no longer
-    // debug only, wouldn't need to make this assumption.
-
     // Look for name in default properties
-    for( unsigned int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
+    for( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
     {
       const Internal::PropertyDetails* property = &DEFAULT_PROPERTY_DETAILS[ i ];
       if( 0 == strcmp( name.c_str(), property->name ) ) // dont want to convert rhs to string
@@ -179,7 +175,8 @@ struct ObjectImplHelper
       DALI_ASSERT_ALWAYS( animatable && "Property index is invalid" );
       property = animatable->GetSceneGraphProperty();
     }
-    else if ( index >= DEFAULT_PROPERTY_MAX_COUNT )
+    else if ( ( index > CHILD_PROPERTY_REGISTRATION_START_INDEX ) && // Child properties are also stored as custom properties
+              ( index <= PROPERTY_CUSTOM_MAX_INDEX ) )
     {
       CustomPropertyMetadata* custom = (object->*findCustomPropertyMethod)( index );
       DALI_ASSERT_ALWAYS( custom && "Property index is invalid" );
@@ -196,7 +193,7 @@ struct ObjectImplHelper
   {
     const SceneGraph::PropertyOwner* sceneObject = object->GetSceneObject();
 
-    switch ( entry.type )
+    switch ( entry.GetType() )
     {
       case Property::BOOLEAN:
       {
@@ -299,18 +296,10 @@ struct ObjectImplHelper
 
       default:
       {
-        DALI_ASSERT_ALWAYS( false && "Property type enumeration out of bounds" ); // should not come here
-        break;
+        // ignore non-scene-graph types
       }
     }
   }
-
-  int GetPropertyComponentIndex( Property::Index index ) const
-  {
-    // TODO: MESH_REWORK
-    DALI_ASSERT_ALWAYS( false && "TODO: MESH_REWORK" );
-    return 0;
-  }
 };