/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
static bool CreateCustomNamedInitCalled = false;
-BaseHandle* CreateCustomNamedInit(void)
+
+
+BaseHandle* CreateCustomNamedInit(const char* const typeName )
{
CreateCustomNamedInitCalled = true;
bool setPropertyCalled = false;
bool getPropertyCalled = false;
int intPropertyValue = 0;
-void SetProperty( BaseObject* object, Property::Index* index, Property::Value* value )
+
+void SetProperty( BaseObject* object, const char* const propertyName , Property::Value* value )
{
value->Get( intPropertyValue );
setPropertyCalled = true;
}
-Property::Value* GetProperty( BaseObject* object, Property::Index* index )
+
+Property::Value* GetProperty( BaseObject* object, const char* const propertyName )
{
getPropertyCalled = true;
Property::Value* x = new Property::Value( 10 );
TestApplication application;
- CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit, true );
+ CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit );
- GetImplementation(Dali::TypeRegistry::Get()).CallInitFunctions();
+ Dali::TypeInfo info = Dali::TypeRegistry::Get().GetTypeInfo( "CSharpControl" );
+
+ info.CreateInstance();
DALI_TEST_EQUALS( CreateCustomNamedInitCalled, true, TEST_LOCATION );
{
TestApplication application;
+
CreateCustomNamedInitCalled = false;
- CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit, false);
+ CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit );
GetImplementation(Dali::TypeRegistry::Get()).CallInitFunctions();
{
TestApplication application;
- CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit, true );
+ CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit );
// should cause an assert because we're registering same type twice
try
{
- CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit, true );
+ CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit );
tet_result( TET_FAIL );
}
catch ( DaliException& e )
{
- DALI_TEST_ASSERT( e, "Duplicate type name for Type Registation", TEST_LOCATION );
+ DALI_TEST_ASSERT( e, "Duplicate type name in Type Registration", TEST_LOCATION );
}
END_TEST;
TestApplication application;
CreateCustomNamedInitCalled = false;
- CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit, false);
+ CSharpTypeRegistry::RegisterType( "CSharpControl", typeid( Dali::Actor), &CreateCustomNamedInit );
TypeInfo info = Dali::TypeRegistry::Get().GetTypeInfo( "CSharpControl");
-
-
BaseHandle handle = info.CreateInstance();
DALI_TEST_EQUALS( CreateCustomNamedInitCalled, true, TEST_LOCATION );
{
TestApplication application;
- CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit, true );
+ CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit );
bool registered = CSharpTypeRegistry::RegisterProperty( "DateControl",
TestApplication application;
// register the same property twice
- CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit, true );
+ CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit );
bool registered = CSharpTypeRegistry::RegisterProperty( "DateControl",
TestApplication application;
// register the same property twice
- CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit, true );
+ CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit );;
Property::Index index(100001);
TestApplication application;
// register the same property twice
- CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit, true );
+ CSharpTypeRegistry::RegisterType( "DateControl", typeid( Dali::Actor), &CreateCustomNamedInit );
Property::Index index(100001);