Merge "Follow the include-order coding conventions" into tizen
[platform/core/uifw/dali-core.git] / dali / internal / event / render-tasks / render-task-impl.cpp
index 71e441b..7b7539a 100644 (file)
@@ -20,6 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/object/type-registry.h>
 #include <dali/internal/common/event-to-update.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/camera-actor-impl.h>
@@ -49,6 +50,14 @@ namespace Internal
 namespace // For internal properties
 {
 
+// Signals
+
+const char* const SIGNAL_FINISHED = "finished";
+
+TypeRegistration mType( typeid( Dali::RenderTask ), typeid( Dali::BaseHandle ), NULL );
+
+SignalConnectorType signalConnector1( mType, SIGNAL_FINISHED, &RenderTask::DoConnectSignal );
+
 const char* DEFAULT_PROPERTY_NAMES[] =
 {
   "viewport-position",
@@ -543,21 +552,14 @@ void RenderTask::SetDefaultProperty( Property::Index index, const Property::Valu
       SetClearColor( property.Get<Vector4>() );
       break;
     }
-
     default:
     {
-      DALI_ASSERT_ALWAYS(false && "RenderTask property index out of range"); // should not come here
+      // nothing to do
       break;
     }
   }
 }
 
-void RenderTask::SetCustomProperty( Property::Index /*index*/, const CustomProperty& /*entry*/, const Property::Value& /*value*/ )
-{
-  // TODO: support them, it doesn't hurt.
-  DALI_ASSERT_ALWAYS( 0 && "RenderTask does not support custom properties");
-}
-
 Property::Value RenderTask::GetDefaultProperty(Property::Index index) const
 {
   Property::Value value;
@@ -591,12 +593,6 @@ Property::Value RenderTask::GetDefaultProperty(Property::Index index) const
   return value;
 }
 
-void RenderTask::InstallSceneObjectProperty( SceneGraph::PropertyBase& newProperty, const std::string& name, unsigned int index )
-{
-  // TODO: support them, it doesn't hurt.
-  DALI_ASSERT_ALWAYS( 0 && "RenderTask does not support custom properties" );
-}
-
 const SceneGraph::PropertyOwner* RenderTask::GetSceneObject() const
 {
   return mSceneObject;
@@ -680,16 +676,16 @@ void RenderTask::EmitSignalFinish()
 {
   DALI_LOG_INFO(gLogRender, Debug::General, "RenderTask::EmitSignalFinish(this:%p)\n", this);
 
-  if( !mSignalFinishedV2.Empty() )
+  if( !mSignalFinished.Empty() )
   {
     Dali::RenderTask handle( this );
-    mSignalFinishedV2.Emit(handle );
+    mSignalFinished.Emit(handle );
   }
 }
 
-Dali::RenderTask::RenderTaskSignalV2& RenderTask::FinishedSignal()
+Dali::RenderTask::RenderTaskSignalType& RenderTask::FinishedSignal()
 {
-  return mSignalFinishedV2;
+  return mSignalFinished;
 }
 
 bool RenderTask::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
@@ -697,7 +693,7 @@ bool RenderTask::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface
   bool connected( true );
   RenderTask* renderTask = dynamic_cast<RenderTask*>(object);
 
-  if ( Dali::RenderTask::SIGNAL_FINISHED == signalName )
+  if ( 0 == strcmp( signalName.c_str(), SIGNAL_FINISHED ) )
   {
     renderTask->FinishedSignal().Connect( tracker, functor );
   }
@@ -768,17 +764,17 @@ void RenderTask::Connector::SetActor( Actor* actor )
   }
 }
 
-void RenderTask::Connector::SceneObjectAdded( ProxyObject& proxy )
+void RenderTask::Connector::SceneObjectAdded( Object& object )
 {
   UpdateRenderTask();
 }
 
-void RenderTask::Connector::SceneObjectRemoved( ProxyObject& proxy )
+void RenderTask::Connector::SceneObjectRemoved( Object& object )
 {
   UpdateRenderTask();
 }
 
-void RenderTask::Connector::ProxyDestroyed( ProxyObject& proxy )
+void RenderTask::Connector::ObjectDestroyed( Object& object )
 {
   mActor = NULL;