Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / event / common / object-impl.h
index c9c1c00..fffe3ee 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_OBJECT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -109,7 +109,7 @@ public:
     /**
      * Virtual destructor
      */
-    virtual ~Observer(){}
+    virtual ~Observer() = default;
   };
 
   /**
@@ -150,16 +150,6 @@ public:
   /**
    * @copydoc Dali::Handle::GetPropertyIndex()
    */
-  Property::Index GetPropertyIndex( const std::string& name ) const;
-
-  /**
-   * @copydoc Dali::Handle::GetPropertyIndex()
-   */
-  Property::Index GetPropertyIndex( Property::Index key ) const;
-
-  /**
-   * @copydoc Dali::Handle::GetPropertyIndex()
-   */
   Property::Index GetPropertyIndex( Property::Key key ) const;
 
   /**
@@ -185,7 +175,7 @@ public:
   /**
    * @copydoc Dali::Handle::SetProperty()
    */
-  void SetProperty( Property::Index index, const Property::Value& propertyValue );
+  void SetProperty(Property::Index index, Property::Value propertyValue);
 
   /**
    * @copydoc Dali::Handle::GetProperty()
@@ -207,12 +197,12 @@ public:
   /**
    * @copydoc Dali::Handle::RegisterProperty()
    */
-  Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue );
+  Property::Index RegisterProperty(std::string name, Property::Value propertyValue);
 
   /**
    * @copydoc Dali::Handle::RegisterProperty()
    */
-  Property::Index RegisterProperty( const std::string& name, Property::Index key, const Property::Value& propertyValue );
+  Property::Index RegisterProperty(std::string name, Property::Index key, Property::Value propertyValue);
 
   /**
    * @copydoc Dali::DevelHandle::SetProperties()
@@ -227,12 +217,15 @@ public:
   /**
    * @copydoc Dali::Handle::RegisterProperty(std::string name, Property::Value propertyValue, Property::AccessMode accessMode)
    */
-  Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode );
+  Property::Index RegisterProperty(std::string name, Property::Value propertyValue, Property::AccessMode accessMode);
 
   /**
    * @brief Implementing method for this override
    */
-  Property::Index RegisterProperty( const std::string& name, Property::Index key, const Property::Value& propertyValue, Property::AccessMode accessMode );
+  Property::Index RegisterProperty(std::string          name,
+                                   Property::Index      key,
+                                   Property::Value      propertyValue,
+                                   Property::AccessMode accessMode);
 
   /**
    * @brief returns true if the custom property exists on this object.
@@ -280,7 +273,7 @@ public:
    * @param propertyIndex index of the property
    * @param uniformName name of the uniform (same as property name)
    */
-  void AddUniformMapping( Property::Index propertyIndex, const std::string& uniformName ) const;
+  void AddUniformMapping(Property::Index propertyIndex, std::string uniformName) const;
 
   /**
    * Removes uniform mapping for given property
@@ -359,9 +352,18 @@ public:
   virtual int32_t GetPropertyComponentIndex( Property::Index index ) const;
 
   /**
+   * Query whether playing an animation is possible or not.
+   * @return true if playing an animation is possible.
+   */
+  virtual bool IsAnimationPossible() const
+  {
+    return true;
+  }
+
+  /**
    * @copydoc Dali::Handle::PropertySetSignal()
    */
-  DevelHandle::PropertySetSignalType& PropertySetSignal();
+  Handle::PropertySetSignalType& PropertySetSignal();
 
 protected:
 
@@ -375,7 +377,7 @@ protected:
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual ~Object();
+  ~Object() override;
 
   /**
    * Called immediately by derived classes, after the scene-object has been created & passed to the scene-graph.
@@ -402,7 +404,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
@@ -433,7 +435,7 @@ protected:
    * @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 key, Property::Index index, const Property::Value& propertyValue ) const;
+  Property::Index RegisterSceneGraphProperty( std::string name, Property::Index key, Property::Index index, Property::Value propertyValue ) const;
 
   /**
    * Registers animatable scene property
@@ -571,8 +573,8 @@ private:
 
   using PropertyNotificationContainer = std::vector< Dali::PropertyNotification >;
   PropertyNotificationContainer* mPropertyNotifications; ///< Container of owned property notifications.
-  DevelHandle::PropertySetSignalType mPropertySetSignal;
 
+  Handle::PropertySetSignalType mPropertySetSignal;
 };
 
 } // namespace Internal