Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-core.git] / dali / internal / update / common / scene-graph-property-notification.cpp
index 2396fda..82464fc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -15,7 +15,7 @@
  *
  */
 
-#include <dali/internal/event/common/proxy-object.h>
+#include <dali/internal/event/common/object-impl.h>
 #include <dali/internal/event/animation/property-constraint.h>
 #include <dali/internal/event/animation/property-input-accessor.h>
 #include <dali/internal/event/animation/property-input-indexer.h>
@@ -24,8 +24,6 @@
 #include <dali/internal/update/common/scene-graph-property-notification.h>
 #include <dali/internal/update/common/property-condition-functions.h>
 
-using namespace std;
-
 namespace Dali
 {
 
@@ -35,7 +33,7 @@ namespace Internal
 namespace SceneGraph
 {
 
-PropertyNotification* PropertyNotification::New(ProxyObject& proxy,
+PropertyNotification* PropertyNotification::New(Object& object,
                                                 Property::Index propertyIndex,
                                                 Property::Type propertyType,
                                                 int componentIndex,
@@ -43,18 +41,18 @@ PropertyNotification* PropertyNotification::New(ProxyObject& proxy,
                                                 RawArgumentContainer& arguments,
                                                 NotifyMode notifyMode)
 {
-  return new PropertyNotification( proxy, propertyIndex, propertyType, componentIndex, condition, arguments, notifyMode );
+  return new PropertyNotification( object, propertyIndex, propertyType, componentIndex, condition, arguments, notifyMode );
 }
 
 
-PropertyNotification::PropertyNotification(ProxyObject& proxy,
+PropertyNotification::PropertyNotification(Object& object,
                                            Property::Index propertyIndex,
                                            Property::Type propertyType,
                                            int componentIndex,
                                            ConditionType condition,
                                            RawArgumentContainer& arguments,
                                            NotifyMode notifyMode)
-: mProxy(&proxy),
+: mObject(&object),
   mPropertyIndex(propertyIndex),
   mPropertyType(propertyType),
   mProperty(NULL),
@@ -62,7 +60,8 @@ PropertyNotification::PropertyNotification(ProxyObject& proxy,
   mConditionType(condition),
   mArguments(arguments),
   mValid(false),
-  mNotifyMode( Dali::PropertyNotification::Disabled )
+  mNotifyMode( Dali::PropertyNotification::Disabled ),
+  mConditionFunction(NULL)
 {
   SetNotifyMode(notifyMode);
 
@@ -105,8 +104,8 @@ PropertyNotification::PropertyNotification(ProxyObject& proxy,
     }
   }
 
-  mProperty = mProxy->GetSceneObjectInputProperty( mPropertyIndex );
-  int internalComponentIndex = mProxy->GetPropertyComponentIndex(mPropertyIndex);
+  mProperty = mObject->GetSceneObjectInputProperty( mPropertyIndex );
+  int internalComponentIndex = mObject->GetPropertyComponentIndex(mPropertyIndex);
   if( internalComponentIndex != Property::INVALID_COMPONENT_INDEX )
   {
     // override the one passed in
@@ -136,8 +135,8 @@ bool PropertyNotification::Check( BufferIndex bufferIndex )
   if ( Property::INVALID_COMPONENT_INDEX != mComponentIndex )
   {
     // Evaluate Condition
-    const PropertyInputComponentAccessor component( mProperty, mComponentIndex );
-    const PropertyInputIndexer< PropertyInputComponentAccessor > input( bufferIndex, &component );
+    const PropertyInputAccessor component( mProperty, mComponentIndex );
+    const PropertyInputIndexer< PropertyInputAccessor > input( bufferIndex, &component );
     currentValid = mConditionFunction(input, mArguments);
   }
   else