/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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/devel-api/adaptor-framework/singleton-service.h>
+#include <toolkit-singleton-service.h>
-#include <dali/public-api/common/dali-common.h>
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
#include <dali/public-api/object/base-object.h>
#include <dali/devel-api/common/map-wrapper.h>
#include <dali/public-api/signals/dali-signal.h>
if( singleton )
{
mSingletonContainer.insert( SingletonPair( info.name(), singleton ) );
+
+ Integration::Processor* processor = dynamic_cast<Integration::Processor*>( &singleton.GetBaseObject() );
+ if( processor )
+ {
+ Integration::Core& core = mTestApplication->GetCore();
+ core.RegisterProcessor( *processor );
+ }
}
}
return object;
}
+ void SetApplication( Dali::TestApplication& testApplication )
+ {
+ mTestApplication = &testApplication;
+ }
+
private:
/**
typedef SingletonContainer::const_iterator SingletonConstIter;
SingletonContainer mSingletonContainer; ///< The container to look up singleton by its type name
+ TestApplication* mTestApplication;
};
} // namespace Adaptor
}
} // namespace Dali
+
+
+namespace Test
+{
+
+void SetApplication( Dali::SingletonService singletonService, TestApplication& testApplication )
+{
+ GetImplementation( singletonService ).SetApplication( testApplication );
+}
+
+} // Test