Optimize type-info-impl and type-registry-impl
[platform/core/uifw/dali-core.git] / dali / public-api / object / base-object.cpp
index f86cd81..362bde2 100644 (file)
@@ -55,7 +55,7 @@ void BaseObject::UnregisterObject()
   }
 }
 
-bool BaseObject::DoAction(const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool BaseObject::DoAction(const std::string& actionName, const Property::Map& attributes)
 {
   Dali::Internal::TypeRegistry* registry = Dali::Internal::TypeRegistry::Get();
 
@@ -73,26 +73,27 @@ const std::string& BaseObject::GetTypeName() const
 
   if( registry )
   {
-    Dali::TypeInfo typeInfo = registry->GetTypeInfo(this);
+    Internal::TypeRegistry::TypeInfoPointer typeInfo = registry->GetTypeInfo(this);
     if( typeInfo )
     {
-      return typeInfo.GetName();
+      return typeInfo->GetName();
     }
   }
 
   // Return an empty string if type-name not found.
   DALI_LOG_WARNING( "TypeName Not Found\n" );
-  return String::EMPTY;
+  static std::string empty;
+  return empty;
 }
 
 bool BaseObject::GetTypeInfo(Dali::TypeInfo& typeInfo) const
 {
   Dali::Internal::TypeRegistry* registry = Dali::Internal::TypeRegistry::Get();
 
-  Dali::TypeInfo info = registry->GetTypeInfo(this);
+  Internal::TypeRegistry::TypeInfoPointer info = registry->GetTypeInfo(this);
   if(info)
   {
-    typeInfo = info;
+    typeInfo = Dali::TypeInfo( info.Get() );
     return true;
   }
   else