static Dali::SingletonService New();
static Dali::SingletonService Get();
void Register( const std::type_info& info, BaseHandle singleton );
+ void UnregisterAll();
BaseHandle GetSingleton( const std::type_info& info ) const;
private:
}
}
+void SingletonService::UnregisterAll()
+{
+ mSingletonContainer.clear();
+}
+
BaseHandle SingletonService::GetSingleton( const std::type_info& info ) const
{
BaseHandle object;
{
}
+SingletonService SingletonService::New()
+{
+ return Internal::Adaptor::SingletonService::New();
+}
+
SingletonService SingletonService::Get()
{
return Internal::Adaptor::SingletonService::Get();
GetImplementation( *this ).Register( info, singleton );
}
+void SingletonService::UnregisterAll()
+{
+ GetImplementation( *this ).UnregisterAll();
+}
+
BaseHandle SingletonService::GetSingleton( const std::type_info& info ) const
{
return GetImplementation( *this ).GetSingleton( info );
{
public:
SingletonService();
+ static Dali::SingletonService New();
static SingletonService Get();
~SingletonService();
void Register( const std::type_info& info, BaseHandle singleton );
+ void UnregisterAll();
BaseHandle GetSingleton( const std::type_info& info ) const;
public: // Not intended for application developers