/*
- * 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.
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/core.h>
+#include <dali/integration-api/adaptor.h>
+#include <dali/internal/adaptor/common/adaptor-impl.h>
// INTERNAL INCLUDES
#if defined(DEBUG_ENABLED)
#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, args...) DALI_LOG_INFO(gSingletonServiceLogFilter, level, format, ## args )
-
+#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, args...)
+#define DALI_LOG_SINGLETON_SERVICE(level, format, ...)
#endif
{
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 );
+ }
}
}
} // namespace Internal
} // namespace Dali
-