Merge "use modern construct 'nullptr' instead of 'NULL' or '0'" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / update / common / scene-graph-property-notification.h
index 2a4bea6..943e51b 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_NOTIFICATION_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_NOTIFICATION_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_NOTIFICATION_H
+#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_NOTIFICATION_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -38,10 +38,10 @@ namespace SceneGraph
 
 class PropertyNotification;
 
-typedef OwnerContainer< PropertyNotification* > PropertyNotificationContainer;
-typedef PropertyNotificationContainer::Iterator PropertyNotificationIter;
-typedef PropertyNotificationContainer::ConstIterator PropertyNotificationConstIter;
-typedef bool(*ConditionFunction)(const Dali::PropertyInput& value, Dali::Internal::PropertyNotification::RawArgumentContainer& args);
+using PropertyNotificationContainer = OwnerContainer<PropertyNotification*>;
+using PropertyNotificationIter      = PropertyNotificationContainer::Iterator;
+using PropertyNotificationConstIter = PropertyNotificationContainer::ConstIterator;
+using ConditionFunction             = bool ( * )( const Dali::PropertyInput&, Dali::Internal::PropertyNotification::RawArgumentContainer& );
 
 /**
  * PropertyNotifications are used to inspect properties of scene graph objects, as part of a scene
@@ -50,11 +50,10 @@ typedef bool(*ConditionFunction)(const Dali::PropertyInput& value, Dali::Interna
 class PropertyNotification
 {
 public:
-
-  typedef Dali::PropertyNotification::NotifyMode NotifyMode;
-  typedef Dali::Internal::PropertyNotification::ConditionType ConditionType;
-  typedef Dali::Internal::PropertyNotification::RawArgumentContainer RawArgumentContainer;
-  typedef const void *(*GetPropertyFunction)( const SceneGraph::PropertyBase*, int );
+  using NotifyMode           = Dali::PropertyNotification::NotifyMode;
+  using ConditionType        = Dali::Internal::PropertyNotification::ConditionType;
+  using RawArgumentContainer = Dali::Internal::PropertyNotification::RawArgumentContainer;
+  using GetPropertyFunction  = const void* (*)( const SceneGraph::PropertyBase*, int );
 
   /**
    * Construct a new PropertyNotification
@@ -65,6 +64,7 @@ public:
    * @param[in] condition The condition type (e.g. LessThan, GreaterThan...)
    * @param[in] arguments The arguments which accompany the condition.
    * @param[in] notifyMode The notification mode setting
+   * @param[in] compare The flag of comparing the previous and current data.
    * @return A new PropertyNotification object.
    */
   static PropertyNotification* New(Object& object,
@@ -73,7 +73,8 @@ public:
                                    int componentIndex,
                                    ConditionType condition,
                                    RawArgumentContainer& arguments,
-                                   NotifyMode notifyMode);
+                                   NotifyMode notifyMode,
+                                   bool compare);
 
   /**
    * Virtual destructor
@@ -121,7 +122,8 @@ protected:
                        int componentIndex,
                        ConditionType condition,
                        RawArgumentContainer& arguments,
-                       NotifyMode notifyMode);
+                       NotifyMode notifyMode,
+                       bool compare);
 
 private:
 
@@ -159,4 +161,4 @@ protected:
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_NOTIFICATION_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_NOTIFICATION_H