From: David Steele Date: Fri, 2 Feb 2018 16:01:55 +0000 (+0000) Subject: Automatically register Singleton Processors with Core X-Git-Tag: dali_1.3.20~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e2b27f1d7ce8903ff41aa18618fde44493829ef;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Automatically register Singleton Processors with Core Signed-off-by: David Steele Change-Id: Ieebab5f50bd1cbd658991721a8ff7af7ea898987 --- diff --git a/dali/internal/system/common/singleton-service-impl.cpp b/dali/internal/system/common/singleton-service-impl.cpp index 57ff83c..afc5740 100644 --- a/dali/internal/system/common/singleton-service-impl.cpp +++ b/dali/internal/system/common/singleton-service-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 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. @@ -20,6 +20,9 @@ // EXTERNAL INCLUDES #include +#include +#include +#include // INTERNAL INCLUDES #if defined(DEBUG_ENABLED) @@ -75,6 +78,15 @@ void SingletonService::Register( const std::type_info& info, BaseHandle singleto { DALI_LOG_SINGLETON_SERVICE( Debug::General, "Singleton Added: %s\n", info.name() ); mSingletonContainer.push_back( SingletonPair( info.name(), singleton ) ); + + Integration::Processor* processor = dynamic_cast( &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 ); + } } } @@ -123,4 +135,3 @@ SingletonService::~SingletonService() } // namespace Internal } // namespace Dali -