/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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.
#include <dali/internal/event/common/stage-impl.h>
#include <dali/internal/event/common/type-registry-impl.h>
-using namespace std;
-
namespace Dali
{
void BaseObject::RegisterObject()
{
- if( Internal::Stage::IsInstalled() )
+ Internal::Stage* stage = Internal::Stage::GetCurrent();
+ if( stage )
{
- Internal::Stage::GetCurrent()->GetObjectRegistry().RegisterObject( this );
+ stage->RegisterObject( this );
}
}
void BaseObject::UnregisterObject()
{
// Guard to allow handle destruction after Core has been destroyed
- if( Internal::Stage::IsInstalled() )
+ Internal::Stage* stage = Internal::Stage::GetCurrent();
+ if( stage )
{
- Internal::Stage::GetCurrent()->GetObjectRegistry().UnregisterObject( this );
+ stage->UnregisterObject( this );
}
}
-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();
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