+ return uniqueTypeName;
+}
+
+void TypeRegistry::Register( const std::string& uniqueTypeName, const std::type_info& baseTypeInfo,
+ Dali::CSharpTypeInfo::CreateFunction createInstance )
+{
+ std::string baseTypeName = DemangleClassName( baseTypeInfo.name() );
+
+ // check for duplicates using uniqueTypeName
+ for( auto&& iter : mRegistryLut )
+ {
+ if( iter->GetName() == uniqueTypeName )
+ {
+ DALI_LOG_WARNING( "Duplicate name in TypeRegistry for '%s'\n", + uniqueTypeName.c_str() );
+ DALI_ASSERT_ALWAYS( !"Duplicate type name in Type Registration" );
+ return; // never actually happening due to the assert
+ }
+ }
+
+ mRegistryLut.push_back( TypeRegistry::TypeInfoPointer( new Internal::TypeInfo( uniqueTypeName, baseTypeName, createInstance ) ) );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "Type Registration %s(%s)\n", uniqueTypeName.c_str(), baseTypeName.c_str() );