lifecycleController = LifecycleController::Get();
DALI_TEST_CHECK( !lifecycleController );
+ TestApplication app;
Application application = Application::New();
lifecycleController = LifecycleController::Get();
int UtcDaliLifecycleControllerSignalInit(void)
{
+ TestApplication app;
Application application = Application::New();
DALI_TEST_CHECK( !g_OnInitCalled );
int UtcDaliLifecycleControllerSignalTerminate(void)
{
+ TestApplication app;
Application application = Application::New();
DALI_TEST_CHECK( !g_OnTerminateCalled );
int UtcDaliLifecycleControllerSignalPause(void)
{
+ TestApplication app;
Application application = Application::New();
DALI_TEST_CHECK( !g_OnPauseCalled );
int UtcDaliLifecycleControllerSignalResume(void)
{
+ TestApplication app;
Application application = Application::New();
DALI_TEST_CHECK( !g_OnResumeCalled );
int UtcDaliLifecycleControllerSignalReset(void)
{
+ TestApplication app;
Application application = Application::New();
DALI_TEST_CHECK( !g_OnResetCalled );
int UtcDaliLifecycleControllerSignalResize(void)
{
+ TestApplication app;
Application application = Application::New();
DALI_TEST_CHECK( !g_OnResizeCalled );
int UtcDaliLifecycleControllerSignalLanguageChanged(void)
{
+ TestApplication app;
Application application = Application::New();
DALI_TEST_CHECK( !g_OnLanguageChangedCalled );
utc-Dali-Key.cpp
utc-Dali-NativeImageSource.cpp
utc-Dali-PixelBuffer.cpp
- utc-Dali-SingletonService.cpp
utc-Dali-Timer.cpp
utc-Dali-TtsPlayer.cpp
utc-Dali-Window.cpp
+++ /dev/null
-/*
- * Copyright (c) 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <stdlib.h>
-#include <iostream>
-#include <dali.h>
-#include <dali-test-suite-utils.h>
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
-
-using namespace Dali;
-
-namespace
-{
-
-class TestHandle : public BaseHandle
-{
-public:
- TestHandle() {}
- TestHandle( BaseObject* object ) : BaseHandle( object ) {}
-};
-
-class TestObject : public BaseObject
-{
-};
-
-} // unnamed namespace
-
-void utc_dali_singleton_service_startup(void)
-{
- test_return_value = TET_UNDEF;
-}
-
-void utc_dali_singleton_service_cleanup(void)
-{
- test_return_value = TET_PASS;
-}
-
-int UtcDaliSingletonServiceGet(void)
-{
- // Attempt to retrieve SingletonService before creating application
- SingletonService singletonService;
- singletonService = SingletonService::Get();
- DALI_TEST_CHECK( !singletonService );
-
- // Create Application class, should be able to retrieve SingletonService now
- Application application = Application::New();
- singletonService = SingletonService::Get();
- DALI_TEST_CHECK( singletonService );
-
- END_TEST;
-}
-
-int UtcDaliSingletonServiceRegisterAndGetSingleton(void)
-{
- Application application = Application::New();
- SingletonService singletonService( SingletonService::Get() );
-
- // Attempt to register an empty handle
- TestHandle handle;
- singletonService.Register( typeid( handle ), handle );
- DALI_TEST_CHECK( !singletonService.GetSingleton( typeid( handle ) ) );
-
- // Create an actor instance and retrieve, should be valid this time
- handle = TestHandle( new TestObject );
- singletonService.Register( typeid( handle ), handle );
- DALI_TEST_CHECK( singletonService.GetSingleton( typeid( handle ) ) );
-
- END_TEST;
-}
+++ /dev/null
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
-namespace Dali
-{
-
-SingletonService::SingletonService()
-{
-}
-
-SingletonService SingletonService::New()
-{
- return Internal::Adaptor::SingletonService::New();
-}
-
-SingletonService SingletonService::Get()
-{
- return Internal::Adaptor::SingletonService::Get();
-}
-
-SingletonService::~SingletonService()
-{
-}
-
-void SingletonService::Register( const std::type_info& info, BaseHandle singleton )
-{
- 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 );
-}
-
-SingletonService::SingletonService( Internal::Adaptor::SingletonService* singletonService )
-: BaseHandle( singletonService )
-{
-}
-
-} // namespace Dali
+++ /dev/null
-#ifndef DALI_SINGELTON_SERVICE_H
-#define DALI_SINGELTON_SERVICE_H
-
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <typeinfo>
-#include <dali/public-api/object/base-handle.h>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/dali-adaptor-common.h>
-
-namespace Dali
-{
-
-namespace Internal DALI_INTERNAL
-{
-namespace Adaptor
-{
-class SingletonService;
-}
-}
-
-/**
- * @brief Allows the registration of a class as a singleton
- *
- * @note This class is created by the Application class and is destroyed when the Application class is destroyed.
- *
- * @see Application
- */
-class DALI_ADAPTOR_API SingletonService : public BaseHandle
-{
-public:
-
- /**
- * @brief Create an uninitialized handle.
- *
- * This can be initialized by calling SingletonService::Get().
- */
- SingletonService();
-
- /**
- * Create a SingletonService.
- * This should only be called once by the Application class.
- * @return A newly created SingletonService.
- */
- static Dali::SingletonService New();
-
- /**
- * @brief Retrieves a handle to the SingletonService.
- *
- * @return A handle to the SingletonService if it is available. This will be an empty handle if
- * the service is not available.
- */
- static SingletonService Get();
-
- /**
- * @brief Destructor
- *
- * This is non-virtual since derived Handle types must not contain data or virtual methods.
- */
- ~SingletonService();
-
- /**
- * @brief Registers the singleton of Dali handle with its type info.
- *
- * The singleton will be kept alive for the lifetime of the service.
- *
- * @note This is not intended for application developers.
- * @param[in] info The type info of the Dali handle generated by the compiler.
- * @param[in] singleton The Dali handle to be registered
- */
- void Register( const std::type_info& info, BaseHandle singleton );
-
- /**
- * @brief Unregisters all singletons.
- *
- * @note This is not intended for application developers.
- */
- void UnregisterAll();
-
- /**
- * @brief Gets the singleton for the given type.
- *
- * @note This is not intended for application developers.
- * @param[in] info The type info of the given type.
- * @return the Dali handle if it is registered as a singleton or an uninitialized handle.
- */
- BaseHandle GetSingleton( const std::type_info& info ) const;
-
-public: // Not intended for application developers
-
- /**
- * @brief This constructor is used by SingletonService::Get().
- * @param[in] singletonService A pointer to the internal singleton-service object.
- */
- explicit DALI_INTERNAL SingletonService( Internal::Adaptor::SingletonService* singletonService );
-};
-
-} // namespace Dali
-
-#endif // DALI_SINGELTON_SERVICE_H
${adaptor_devel_api_dir}/adaptor-framework/physical-keyboard.cpp
${adaptor_devel_api_dir}/adaptor-framework/key-devel.cpp
${adaptor_devel_api_dir}/adaptor-framework/pixel-buffer.cpp
- ${adaptor_devel_api_dir}/adaptor-framework/singleton-service.cpp
${adaptor_devel_api_dir}/adaptor-framework/sound-player.cpp
${adaptor_devel_api_dir}/adaptor-framework/style-monitor.cpp
${adaptor_devel_api_dir}/adaptor-framework/tilt-sensor.cpp
${adaptor_devel_api_dir}/adaptor-framework/orientation.h
${adaptor_devel_api_dir}/adaptor-framework/performance-logger.h
${adaptor_devel_api_dir}/adaptor-framework/pixel-buffer.h
- ${adaptor_devel_api_dir}/adaptor-framework/singleton-service.h
${adaptor_devel_api_dir}/adaptor-framework/sound-player.h
${adaptor_devel_api_dir}/adaptor-framework/style-monitor.h
${adaptor_devel_api_dir}/adaptor-framework/tilt-sensor.h
// EXTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
#include <vconf.h>
#include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/system/common/system-settings.h>
namespace Dali
#include <vconf.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/system/common/system-settings.h>
#ifndef WAYLAND
#include <vconf.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/system/common/system-settings.h>
#ifndef WAYLAND
#include <vconf.h>
#include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/system/common/system-settings.h>
namespace Dali
#include <vconf.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/system/common/system-settings.h>
#ifndef WAYLAND
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/style-monitor.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/system/common/command-line-options.h>
#include <dali/internal/adaptor/common/framework.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/adaptor/common/lifecycle-controller-impl.h>
#include <dali/internal/window-system/common/window-impl.h>
#include <dali/internal/window-system/common/window-render-surface.h>
mFramework( nullptr ),
mContextLossConfiguration( Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS ),
mCommandLineOptions( nullptr ),
- mSingletonService( SingletonService::New() ),
mAdaptorBuilder( nullptr ),
mAdaptor( nullptr ),
mMainWindow(),
Application::~Application()
{
- mSingletonService.UnregisterAll();
+ SingletonService service = SingletonService::Get();
+ // Note this can be false i.e. if Application has never created a Core instance
+ if( service )
+ {
+ service.UnregisterAll();
+ }
mMainWindow.Reset();
delete mAdaptor;
// INTERNAL INCLUDES
#include <dali/public-api/adaptor-framework/application.h>
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/internal/adaptor/common/framework.h>
#include <dali/internal/system/common/environment-options.h>
Dali::Configuration::ContextLoss mContextLossConfiguration;
CommandLineOptions* mCommandLineOptions;
- Dali::SingletonService mSingletonService;
Dali::Internal::Adaptor::AdaptorBuilder* mAdaptorBuilder; ///< The adaptor builder
Dali::Adaptor* mAdaptor;
// INTERNAL INCLUDES
#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
// EXTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
#include <dali/internal/clipboard/common/clipboard-impl.h>
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
#include <dali/public-api/object/any.h>
#include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
#include <unistd.h>
#include <Eldbus.h>
#endif // DALI_ELDBUS_AVAILABLE
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
#define CBHM_DBUS_OBJPATH "/org/tizen/cbhm/dbus"
#ifndef CBHM_DBUS_INTERFACE
#define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus"
// INTERNAL INCLUDES
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/window-system/ubuntu-x11/window-interface-ecore-x.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/internal/clipboard/common/clipboard-event-notifier-impl.h>
namespace //unnamed namespace
// EXTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
#include <dali/devel-api/adaptor-framework/file-loader.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
namespace Dali
{
#include <dali/internal/input/common/input-method-context-impl.h>
#include <dali/internal/input/common/input-method-context-factory.h>
#include <dali/internal/system/common/locale-utils.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
// CLASS HEADER
#include <dali/internal/input/common/physical-keyboard-impl.h>
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/adaptor-framework/key.h>
#include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali/integration-api/adaptor-framework/scene-holder.h>
#include <dali/internal/input/common/key-impl.h>
#include <dali/internal/system/common/locale-utils.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/window-system/common/window-render-surface.h>
#define TOKEN_STRING(x) #x
// EXTERNAL INCLUDES
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali/internal/input/tizen-wayland/ecore-virtual-keyboard.h>
#include <dali/internal/input/ubuntu-x11/dali-ecore-input.h>
#include <dali/internal/system/common/locale-utils.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/system/linux/dali-ecore.h>
namespace Dali
// EXTERNAL INCLUDES\r
#include <dali/public-api/events/key-event.h>\r
#include <dali/public-api/object/type-registry.h>\r
+#include <dali/devel-api/common/singleton-service.h>\r
#include <dali/integration-api/debug.h>\r
\r
// INTERNAL INCLUDES\r
#include <dali/internal/input/common/key-impl.h>\r
#include <dali/internal/input/common/virtual-keyboard-impl.h>\r
#include <dali/internal/system/common/locale-utils.h>\r
-#include <dali/internal/system/common/singleton-service-impl.h>\r
\r
namespace Dali\r
{\r
#include <dali/internal/sensor/common/tilt-sensor-factory.h>
#include <dali/internal/sensor/common/tilt-sensor-impl.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
} // Internal
-} // Dali
\ No newline at end of file
+} // Dali
// EXTERNAL INCLUDES
#include <cmath>
#include <dali/public-api/object/type-registry.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
namespace // unnamed namespace
{
const char* const SIGNAL_TILTED = "tilted";
// EXTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace // unnamed namespace
{
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/file-loader.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/system/common/singleton-service-impl.h>
namespace Dali
{
#include <dlfcn.h>
#include <dali/integration-api/debug.h>
#include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
+++ /dev/null
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali/internal/system/common/singleton-service-impl.h>
-
-// EXTERNAL INCLUDES
-#include <dali/integration-api/core.h>
-#include <dali/integration-api/debug.h>
-#include <dali/integration-api/processor-interface.h>
-
-// INTERNAL INCLUDES
-#include <dali/integration-api/adaptor-framework/adaptor.h>
-#include <dali/internal/adaptor/common/adaptor-impl.h>
-
-#if defined(DEBUG_ENABLED)
-#include <dali/internal/system/common/logging.h>
-Debug::Filter* gSingletonServiceLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_SINGLETON_SERVICE" );
-
-// Need to define own macro as the log function is not installed when this object is created so no logging is shown with DALI_LOG_INFO at construction and destruction
-#define DALI_LOG_SINGLETON_SERVICE_DIRECT(level, message) \
- if(gSingletonServiceLogFilter && gSingletonServiceLogFilter->IsEnabledFor(level)) { std::string string(message); Dali::TizenPlatform::LogMessage( Debug::DebugInfo, string ); }
-
-#define DALI_LOG_SINGLETON_SERVICE(level, format, ...) DALI_LOG_INFO(gSingletonServiceLogFilter, level, format, ## __VA_ARGS__ )
-#else
-
-#define DALI_LOG_SINGLETON_SERVICE_DIRECT(level, message)
-#define DALI_LOG_SINGLETON_SERVICE(level, format, ...)
-
-#endif
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-thread_local SingletonService * gSingletonService = 0;
-} // unnamed namespace
-
-Dali::SingletonService SingletonService::New()
-{
- Dali::SingletonService singletonService( new SingletonService );
- return singletonService;
-}
-
-Dali::SingletonService SingletonService::Get()
-{
- Dali::SingletonService singletonService;
- if ( gSingletonService )
- {
- singletonService = Dali::SingletonService( gSingletonService );
- }
- return singletonService;
-}
-
-void SingletonService::Register( const std::type_info& info, BaseHandle singleton )
-{
- if( singleton )
- {
- DALI_LOG_SINGLETON_SERVICE( Debug::General, "Singleton Added: %s\n", info.name() );
- mSingletonContainer.push_back( SingletonPair( info.name(), singleton ) );
-
- Integration::Processor* processor = dynamic_cast<Integration::Processor*>( &singleton.GetBaseObject() );
- if( processor )
- {
- Dali::Adaptor& adaptor = Dali::Adaptor::Get();
- Dali::Internal::Adaptor::Adaptor& adaptorImpl = Adaptor::GetImplementation( adaptor );
- Integration::Core& core = adaptorImpl.GetCore();
- core.RegisterProcessor( *processor );
- }
- }
-}
-
-void SingletonService::UnregisterAll( )
-{
- mSingletonContainer.clear();
-}
-
-BaseHandle SingletonService::GetSingleton( const std::type_info& info ) const
-{
- BaseHandle object;
-
- const SingletonContainer::const_iterator end = mSingletonContainer.end();
- for( SingletonContainer::const_iterator iter = mSingletonContainer.begin(); iter != end; ++iter )
- {
- // comparing the addresses as these are allocated statically per library
- if( ( *iter ).first == info.name() )
- {
- object = ( *iter ).second;
- }
- }
-
- return object;
-}
-
-SingletonService::SingletonService()
-: mSingletonContainer()
-{
- // Can only have one instance of SingletonService
- DALI_ASSERT_ALWAYS( !gSingletonService && "Only one instance of SingletonService is allowed");
-
- gSingletonService = this;
-
- DALI_LOG_SINGLETON_SERVICE_DIRECT( Debug::Concise, "SingletonService Created\n" );
-}
-
-SingletonService::~SingletonService()
-{
- gSingletonService = 0;
-
- DALI_LOG_SINGLETON_SERVICE_DIRECT( Debug::Concise, "SingletonService Destroyed\n" );
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
+++ /dev/null
-#ifndef DALI_INTERNAL_SINGLETON_SERVICE_H
-#define DALI_INTERNAL_SINGLETON_SERVICE_H
-
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/common/vector-wrapper.h>
-
-// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-class SingletonService : public Dali::BaseObject
-{
-public:
-
- /**
- * Create a SingletonService.
- * This should only be called once by the Application class.
- * @return A newly created SingletonService.
- */
- static Dali::SingletonService New();
-
- /**
- * @copydoc Dali::SingletonService::Get()
- */
- static Dali::SingletonService Get();
-
- /**
- * @copydoc Dali::SingletonService::Register()
- */
- void Register( const std::type_info& info, BaseHandle singleton );
-
- /**
- * @copydoc Dali::SingletonService::UnregisterAll()
- */
- void UnregisterAll();
-
- /**
- * @copydoc Dali::SingletonService::GetSingleton()
- */
- BaseHandle GetSingleton( const std::type_info& info ) const;
-
-private:
-
- /**
- * Private Constructor
- * @see SingletonService::New()
- */
- SingletonService();
-
- /**
- * Virtual Destructor
- */
- virtual ~SingletonService();
-
- // Undefined
- SingletonService( const SingletonService& );
- SingletonService& operator=( SingletonService& );
-
-private:
-
- // using the address of the type name string as compiler will allocate these once per library
- // and we don't support un/re-loading of dali libraries while singleton service is alive
- typedef std::pair< const char*, BaseHandle> SingletonPair;
- typedef std::vector< SingletonPair > SingletonContainer;
- typedef SingletonContainer::const_iterator SingletonConstIter;
-
- SingletonContainer mSingletonContainer; ///< The container to look up singleton by its type name
-};
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::Adaptor::SingletonService& GetImplementation(Dali::SingletonService& player)
-{
- DALI_ASSERT_ALWAYS( player && "SingletonService handle is empty" );
-
- BaseObject& handle = player.GetBaseObject();
-
- return static_cast<Internal::Adaptor::SingletonService&>(handle);
-}
-
-inline const Internal::Adaptor::SingletonService& GetImplementation(const Dali::SingletonService& player)
-{
- DALI_ASSERT_ALWAYS( player && "SingletonService handle is empty" );
-
- const BaseObject& handle = player.GetBaseObject();
-
- return static_cast<const Internal::Adaptor::SingletonService&>(handle);
-}
-
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SINGLETON_SERVICE_H
// EXTERNAL INCLUDES
#include <dali/public-api/object/type-registry.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
${adaptor_system_dir}/common/performance-logger-impl.cpp
${adaptor_system_dir}/common/performance-marker.cpp
${adaptor_system_dir}/common/performance-server.cpp
- ${adaptor_system_dir}/common/singleton-service-impl.cpp
${adaptor_system_dir}/common/sound-player-impl.cpp
${adaptor_system_dir}/common/stat-context.cpp
${adaptor_system_dir}/common/stat-context-manager.cpp
// CLASS HEADER
#include <dali/internal/text/text-abstraction/bidirectional-support-impl.h>
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
// EXTERNAL INCLUDES
#include <memory.h>
#include <fribidi/fribidi.h>
#include <dali/integration-api/debug.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace Dali
{
#endif
// INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
+#include <dali/devel-api/common/singleton-service.h>
#include <dali/internal/text/text-abstraction/font-client-plugin-impl.h>
#include <dali/devel-api/text-abstraction/glyph-info.h>
// CLASS HEADER
#include <dali/internal/text/text-abstraction/segmentation-impl.h>
-// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
-
// EXTERNAL INCLUDES
+#include <dali/devel-api/common/singleton-service.h>
#include <third-party/libunibreak/linebreak.h>
#include <third-party/libunibreak/wordbreak.h>
#include <dali/internal/text/text-abstraction/shaping-impl.h>
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/devel-api/text-abstraction/font-client.h>
#include <dali/devel-api/text-abstraction/glyph-info.h>
#include <dali/integration-api/debug.h>
// EXTERNAL INCLUDES
#include <harfbuzz/hb.h>
#include <harfbuzz/hb-ft.h>
+#include <dali/devel-api/common/singleton-service.h>
namespace
{
// CLASS HEADER
#include <dali/internal/text/text-abstraction/text-renderer-impl.h>
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/singleton-service.h>
+
// INTERNAL INCLUDES
-#include <dali/internal/system/common/singleton-service-impl.h>
#include <dali/internal/text/text-abstraction/cairo-renderer.h>
namespace Dali