Add SetProperty and GetProperty to Visuals.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-base-impl.h
index 3820bd0..8334841 100644 (file)
@@ -135,6 +135,16 @@ public:
    */
   void SetCustomShader( const Property::Map& propertyMap );
 
+  /**
+   * @copydoc Toolkit::Visual::Base::SetProperty
+   */
+  void SetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue );
+
+  /**
+   * @copydoc Toolkit::Visual::Base::GetProperty
+   */
+  Dali::Property::Value GetProperty( Dali::Property::Index index );
+
 protected:
 
   /**
@@ -198,6 +208,24 @@ protected:
    */
   bool GetIsFromCache() const;
 
+protected:
+  /**
+   * @brief Called by SetProperty(). To be overriden by derived clases in order to set properties.
+   *
+   * @param [in] index The index of the property.
+   * @param [in] propertyValue The new value of the property.
+   */
+  virtual void DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue ) = 0;
+
+  /**
+   * @brief Called by GetProperty(). To be overriden by derived classes in order to retrieve properties.
+   *
+   * @param [in] index The index of the property.
+   *
+   * @return The property value.
+   */
+  virtual Dali::Property::Value DoGetProperty( Dali::Property::Index index ) = 0;
+
 private:
 
   // Undefined