change Object::OnPropertySet() interface signature. 27/242427/3
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Thu, 27 Aug 2020 01:18:32 +0000 (10:18 +0900)
committerRichard Huang <r.huang@samsung.com>
Thu, 3 Sep 2020 14:22:16 +0000 (14:22 +0000)
the old interface was taking Property::Value object by value which
was making a deep copy (2 allocation). so changed the interface to
take it as a const& object.

Change-Id: I6cd67f6900ea61ea47154f9345a9ffe8f949f816

automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.cpp
automated-tests/src/dali/dali-test-suite-utils/test-custom-actor.h
automated-tests/src/dali/utc-Dali-CustomActor.cpp
dali/internal/event/actors/custom-actor-internal.h
dali/internal/event/common/object-impl.h
dali/public-api/actors/custom-actor-impl.cpp
dali/public-api/actors/custom-actor-impl.h

index 5723f7f..0c52508 100644 (file)
@@ -322,7 +322,7 @@ void TestCustomActor::OnChildRemove(Actor& child)
 {
   AddToCallStacks("OnChildRemove");
 }
-void TestCustomActor::OnPropertySet( Property::Index index, Property::Value propertyValue )
+void TestCustomActor::OnPropertySet( Property::Index index, const Property::Value& propertyValue )
 {
   AddToCallStacks("OnPropertySet");
 }
index 907072f..51a8054 100644 (file)
@@ -135,7 +135,7 @@ public:
   void OnSceneDisconnection() override;
   void OnChildAdd(Dali::Actor& child) override;
   void OnChildRemove(Dali::Actor& child) override;
-  void OnPropertySet( Dali::Property::Index index, Dali::Property::Value propertyValue ) override;
+  void OnPropertySet( Dali::Property::Index index, const Dali::Property::Value& propertyValue ) override;
   void OnSizeSet(const Dali::Vector3& targetSize) override;
   void OnSizeAnimation(Dali::Animation& animation, const Dali::Vector3& targetSize) override;
   bool OnHoverEvent(const Dali::HoverEvent& event) override;
index bce0c34..1d60612 100644 (file)
@@ -1408,7 +1408,7 @@ struct UnregisteredCustomActor : public Dali::CustomActorImpl
   { }
   virtual void OnChildRemove(Actor& child)
   { }
-  virtual void OnPropertySet( Property::Index index, Property::Value propertyValue )
+  virtual void OnPropertySet( Property::Index index, const Property::Value& propertyValue )
   { }
   virtual void OnSizeSet(const Vector3& targetSize)
   { }
index c2a42be..5e5856c 100644 (file)
@@ -111,7 +111,7 @@ private:
   /**
    * @copydoc Internal::Actor::OnPropertySet
    */
-  virtual void OnPropertySet( Property::Index index, Property::Value propertyValue )
+  virtual void OnPropertySet( Property::Index index, const Property::Value& propertyValue )
   {
     mImpl->OnPropertySet(index, propertyValue);
   }
index 8bdc264..a7bac60 100644 (file)
@@ -392,7 +392,7 @@ protected:
    * @param [in] index The index of the property.
    * @param [in] propertyValue The value of the property.
    */
-  virtual void OnPropertySet( Property::Index index, Property::Value propertyValue ) {}
+  virtual void OnPropertySet( Property::Index index, const Property::Value& propertyValue ) {}
 
   /**
    * Retrieves the TypeInfo for this object. Only retrieves it from the type-registry once and then stores a pointer
index 5170eba..4fdcbf1 100644 (file)
@@ -30,7 +30,7 @@ CustomActor CustomActorImpl::Self() const
   return CustomActor(mOwner);
 }
 
-void CustomActorImpl::OnPropertySet( Property::Index index, Property::Value propertyValue )
+void CustomActorImpl::OnPropertySet( Property::Index index, const Property::Value& propertyValue )
 {
 }
 
index 4714bc2..fed8c1f 100644 (file)
@@ -155,7 +155,7 @@ public:
    * @param[in] index The Property index that was set
    * @param[in] propertyValue The value to set
    */
-  virtual void OnPropertySet( Property::Index index, Property::Value propertyValue );
+  virtual void OnPropertySet( Property::Index index, const Property::Value& propertyValue );
 
   /**
    * @brief Called when the owning actor's size is set e.g. using Actor::SetSize().