[4.0] Changed Update to reset only target properties each frame
[platform/core/uifw/dali-core.git] / dali / internal / update / animation / scene-graph-constraint-base.cpp
index 85bf625..7c39de9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -32,11 +32,12 @@ namespace SceneGraph
   unsigned int ConstraintBase::mTotalInstanceCount   = 0;
 #endif
 
-ConstraintBase::ConstraintBase( PropertyOwnerContainer& ownerSet )
-: mRemoveAction( Dali::Constraint::DEFAULT_REMOVE_ACTION ),
+ConstraintBase::ConstraintBase( PropertyOwnerContainer& ownerSet, RemoveAction removeAction )
+: mRemoveAction( removeAction ),
   mFirstApply( true ),
   mDisconnected( true ),
-  mObservedOwners( ownerSet )
+  mObservedOwners( ownerSet ),
+  mLifecycleObserver( nullptr )
 {
 #ifdef DEBUG_ENABLED
   ++mCurrentInstanceCount;
@@ -51,16 +52,16 @@ ConstraintBase::~ConstraintBase()
     StopObservation();
   }
 
+  if( mLifecycleObserver != nullptr )
+  {
+    mLifecycleObserver->ObjectDestroyed();
+  }
+
 #ifdef DEBUG_ENABLED
   --mCurrentInstanceCount;
 #endif
 }
 
-void ConstraintBase::ResetDefaultProperties( BufferIndex updateBufferIndex )
-{
-  DALI_ASSERT_DEBUG( false );
-}
-
 unsigned int ConstraintBase::GetCurrentInstanceCount()
 {
 #ifdef DEBUG_ENABLED