Revert "[Tizen] Property Notify for orientation changes"
[platform/core/uifw/dali-core.git] / dali / internal / update / common / property-condition-step-functions.h
index 8f07188..57fe42c 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H
+#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
  */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/object/property-value.h>
 #include <dali/internal/update/common/scene-graph-property-notification.h>
+#include <dali/public-api/object/property-value.h>
 
 namespace Dali
 {
-
 namespace Internal
 {
-
-class ProxyObject;
+class Object;
 class PropertyNotification;
 
 namespace SceneGraph
 {
-
 /**
  * Step condition class,
  * Checks if a Property has stepped a certain amount from the reference point
@@ -46,18 +43,31 @@ namespace SceneGraph
  */
 class Step
 {
-
 public:
+  /**
+   * @return function pointer to the correct condition function, based on
+   * the type of value being examined.
+   */
+  static ConditionFunction GetFunction(Property::Type valueType);
 
   /**
    * @return function pointer to the correct condition function, based on
    * the type of value being examined.
+   *
+   * This function pointer is to compare previous and current components for the swapping case.
    */
-  static ConditionFunction GetFunction( Property::Type valueType );
+  static ConditionFunction GetCompareFunction(Property::Type valueType);
 
 private:
+  static bool Evaluate(const float propertyValue, PropertyNotification::RawArgumentContainer& arg);
 
-  static bool Evaluate( const float propertyValue, PropertyNotification::RawArgumentContainer& arg );
+  /**
+   * Checks if integer is Outside
+   * @param[in] value The value being examined.
+   * @param[in] arg The supplied arguments for the condition.
+   * @return Condition result (true if condition met, false if not)
+   */
+  static bool EvalInteger(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Checks if float is Outside
@@ -65,31 +75,34 @@ private:
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalFloat( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalFloat(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
-   * Checks if integer is Outside
+   * Checks if Vector2.Length() is Outside
    * @param[in] value The value being examined.
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalInteger( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalVector2(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
-   * Checks if Vector2.Length() is Outside
+   * Checks if Vector3.Length() is Outside
    * @param[in] value The value being examined.
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalVector2( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalVector3(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Checks if Vector3.Length() is Outside
+   *
+   * If previous Vector3.Lenght() and current are same, the raw datas are checked with comparing these values.
+   *
    * @param[in] value The value being examined.
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalVector3( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalAndCompareVector3(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Checks if Vector4.Length() is Outside
@@ -97,7 +110,7 @@ private:
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalVector4( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
+  static bool EvalVector4(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 
   /**
    * Default check for other types.
@@ -105,8 +118,7 @@ private:
    * @param[in] arg The supplied arguments for the condition.
    * @return Condition result (true if condition met, false if not)
    */
-  static bool EvalDefault( const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg );
-
+  static bool EvalDefault(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
 };
 
 } // namespace SceneGraph
@@ -115,4 +127,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_CONDITION_STEP_FUNCTIONS_H