Fix code to not include std set directly
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / active-constraint-impl.h
index 44a6c8d..0378dee 100644 (file)
 //
 
 // EXTERNAL INCLUDES
-#include <set>
 #include <boost/function.hpp>
 
 // INTERNAL INCLUDES
+#include <dali/public-api/common/set-wrapper.h>
 #include <dali/internal/common/event-to-update.h>
 #include <dali/internal/common/message.h>
 #include <dali/internal/event/common/proxy-object.h>
@@ -106,11 +106,20 @@ public:
     clone->SetRemoveTime(mRemoveTime);
     clone->SetAlphaFunction(mAlphaFunction);
     clone->SetRemoveAction(mRemoveAction);
+    clone->SetTag( mTag );
 
     return clone;
   }
 
   /**
+   * @copydoc ActiveConstraintBase::OnCustomWeightSet()
+   */
+  virtual void OnCustomWeightSet( ProxyObject& weightObject )
+  {
+    ObserveProxy( weightObject );
+  }
+
+  /**
    * @copydoc ActiveConstraintBase::OnFirstApply()
    */
   virtual void OnFirstApply( ProxyObject& parent )
@@ -298,7 +307,8 @@ private:
       SceneGraph::ConstraintBase* sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty,
                                                                                      propertyOwners,
                                                                                      func,
-                                                                                     mInterpolatorFunction );
+                                                                                     mInterpolatorFunction,
+                                                                                     mCustomWeight );
       DALI_ASSERT_DEBUG( NULL != sceneGraphConstraint );
       sceneGraphConstraint->SetInitialWeight( mOffstageWeight );
       sceneGraphConstraint->SetRemoveAction( mRemoveAction );
@@ -484,11 +494,20 @@ public:
     clone->SetRemoveTime(mRemoveTime);
     clone->SetAlphaFunction(mAlphaFunction);
     clone->SetRemoveAction(mRemoveAction);
+    clone->SetTag( mTag );
 
     return clone;
   }
 
   /**
+   * @copydoc ActiveConstraintBase::OnCustomWeightSet()
+   */
+  virtual void OnCustomWeightSet( ProxyObject& weightObject )
+  {
+    ObserveProxy( weightObject );
+  }
+
+  /**
    * @copydoc ActiveConstraintBase::OnFirstApply()
    */
   virtual void OnFirstApply( ProxyObject& parent )
@@ -686,7 +705,8 @@ private:
         sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty,
                                                            propertyOwners,
                                                            func,
-                                                           mInterpolatorFunction );
+                                                           mInterpolatorFunction,
+                                                           mCustomWeight );
       }
       else
       {
@@ -699,17 +719,17 @@ private:
           if ( 0 == componentIndex )
           {
             typedef SceneGraph::Constraint< float, PropertyComponentAccessorX<Vector3> > SceneGraphConstraint;
-            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction );
+            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction, mCustomWeight );
           }
           else if ( 1 == componentIndex )
           {
             typedef SceneGraph::Constraint< float, PropertyComponentAccessorY<Vector3> > SceneGraphConstraint;
-            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction );
+            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction, mCustomWeight );
           }
           else if ( 2 == componentIndex )
           {
             typedef SceneGraph::Constraint< float, PropertyComponentAccessorZ<Vector3> > SceneGraphConstraint;
-            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction );
+            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction, mCustomWeight );
           }
         }
         else if ( PropertyTypes::Get< Vector4 >() == targetProperty->GetType() )
@@ -719,22 +739,22 @@ private:
           if ( 0 == componentIndex )
           {
             typedef SceneGraph::Constraint< float, PropertyComponentAccessorX<Vector4> > SceneGraphConstraint;
-            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction );
+            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction, mCustomWeight );
           }
           else if ( 1 == componentIndex )
           {
             typedef SceneGraph::Constraint< float, PropertyComponentAccessorY<Vector4> > SceneGraphConstraint;
-            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction );
+            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction, mCustomWeight );
           }
           else if ( 2 == componentIndex )
           {
             typedef SceneGraph::Constraint< float, PropertyComponentAccessorZ<Vector4> > SceneGraphConstraint;
-            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction );
+            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction, mCustomWeight );
           }
           else if ( 3 == componentIndex )
           {
             typedef SceneGraph::Constraint< float, PropertyComponentAccessorW<Vector4> > SceneGraphConstraint;
-            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction );
+            sceneGraphConstraint = SceneGraphConstraint::New( *targetProperty, propertyOwners, func, mInterpolatorFunction, mCustomWeight );
           }
         }
       }