Merge "Synchronous Set/Get Behaviour for custom & animatable properties" into devel...
[platform/core/uifw/dali-core.git] / dali / internal / event / common / object-impl.h
index b7e6836..bf96435 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_OBJECT_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -151,6 +151,16 @@ public:
   virtual Property::Index GetPropertyIndex( const std::string& name ) const;
 
   /**
+   * @copydoc Dali::Handle::GetPropertyIndex()
+   */
+  virtual Property::Index GetPropertyIndex( Property::Index key ) const;
+
+  /**
+   * @copydoc Dali::Handle::GetPropertyIndex()
+   */
+  virtual Property::Index GetPropertyIndex( Property::Key key ) const;
+
+  /**
    * @copydoc Dali::Handle::IsPropertyWritable()
    */
   virtual bool IsPropertyWritable( Property::Index index ) const;
@@ -181,6 +191,13 @@ public:
   virtual Property::Value GetProperty( Property::Index index ) const;
 
   /**
+   * @brief Retrieves the latest value of the property on the scene-graph.
+   * @param[in]  index  The index of the property required.
+   * @return The latest value of the property on the scene-graph.
+   */
+  virtual Property::Value GetCurrentProperty( Property::Index index ) const;
+
+  /**
    * @copydoc Dali::Handle::GetPropertyIndices()
    */
   virtual void GetPropertyIndices( Property::IndexContainer& indices ) const;
@@ -191,11 +208,21 @@ public:
   virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue );
 
   /**
+   * @copydoc Dali::Handle::RegisterProperty()
+   */
+  virtual Property::Index RegisterProperty( const std::string& name, Property::Index key, const Property::Value& propertyValue );
+
+  /**
    * @copydoc Dali::Handle::RegisterProperty(std::string name, Property::Value propertyValue, Property::AccessMode accessMode)
    */
   virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode );
 
   /**
+   * @brief Implementing method for this override
+   */
+  virtual Property::Index RegisterProperty( const std::string& name, Property::Index key, const Property::Value& propertyValue, Property::AccessMode accessMode );
+
+  /**
    * @copydoc Dali::Handle::AddPropertyNotification()
    */
   virtual Dali::PropertyNotification AddPropertyNotification( Property::Index index,
@@ -352,11 +379,12 @@ protected:
   /**
    * Helper to register a scene-graph property
    * @param [in] name The name of the property.
+   * @param [in] key The key of the property
    * @param [in] index The index of the property
    * @param [in] value The value of the property.
    * @return The index of the registered property or Property::INVALID_INDEX if registration failed.
    */
-  Property::Index RegisterSceneGraphProperty(const std::string& name, Property::Index index, const Property::Value& propertyValue) const;
+  Property::Index RegisterSceneGraphProperty(const std::string& name, Property::Index key, Property::Index index, const Property::Value& propertyValue) const;
 
   /**
    * Check whether the animatable property is registered already, if not then register one.
@@ -483,11 +511,11 @@ private:
   void DisablePropertyNotifications();
 
   /**
-   * Get the value of the property.
-   * @param [in] entry An entry from the property lookup container.
-   * @return The new value of the property.
+   * Get the latest value of the property on the scene-graph.
+   * @param[in] entry An entry from the property lookup container.
+   * @return The latest value of the property.
    */
-  Property::Value GetPropertyValue( const PropertyMetadata* entry ) const;
+  Property::Value GetCurrentPropertyValue( const PropertyMetadata* entry ) const;
 
   /**
    * Set the value of scene graph property.