[Tizen] Implement partial update
[platform/core/uifw/dali-core.git] / dali / internal / event / common / object-registry-impl.h
index a5ce23d..ff52b90 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_OBJECT_REGISTRY_H__
-#define __DALI_INTERNAL_OBJECT_REGISTRY_H__
+#ifndef DALI_INTERNAL_OBJECT_REGISTRY_H
+#define DALI_INTERNAL_OBJECT_REGISTRY_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.
@@ -19,9 +19,6 @@
  */
 
 // INTERNAL INCLUDES
-#ifdef DEBUG_ENABLED
-#include <dali/public-api/common/set-wrapper.h>
-#endif
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/object/object-registry.h>
 #include <dali/public-api/object/base-object.h>
@@ -59,9 +56,12 @@ public:
   static ObjectRegistryPtr New();
 
   /**
-   * Registers the Object into the Object Registry, Which notifies
-   * about this object creation to its observers.
+   * Registers the Object into the Object Registry, which notifies
+   * about this object creation to its observers using signals. As
+   * the signals use a BaseHandle, the object must already have a
+   * ref-count > 0, otherwise it will get deleted on signal completion.
    * @pre The object is not already registered.
+   * @pre the object is ref counted (held in an intrusive pointer)
    * @param[in] object Pointer to the object.
    */
   void RegisterObject( Dali::BaseObject* object );
@@ -77,17 +77,17 @@ public:
   /**
    * @copydoc Dali::ObjectRegistry::ObjectCreatedSignal()
    */
-  Dali::ObjectRegistry::ObjectCreatedSignalV2& ObjectCreatedSignal()
+  Dali::ObjectRegistry::ObjectCreatedSignalType& ObjectCreatedSignal()
   {
-    return mObjectCreatedSignalV2;
+    return mObjectCreatedSignal;
   }
 
   /**
    * @copydoc Dali::ObjectRegistry::ObjectDestroyedSignal()
    */
-  Dali::ObjectRegistry::ObjectDestroyedSignalV2& ObjectDestroyedSignal()
+  Dali::ObjectRegistry::ObjectDestroyedSignalType& ObjectDestroyedSignal()
   {
-    return mObjectDestroyedSignalV2;
+    return mObjectDestroyedSignal;
   }
 
   /**
@@ -115,12 +115,8 @@ private:
 
 private:
 
-  Dali::ObjectRegistry::ObjectCreatedSignalV2 mObjectCreatedSignalV2;
-  Dali::ObjectRegistry::ObjectDestroyedSignalV2 mObjectDestroyedSignalV2;
-
-#ifdef DEBUG_ENABLED
-  std::set< Dali::BaseObject* > mDebugRegistry; ///< This allows us to assert that an object is only registered once (debug builds only)
-#endif
+  Dali::ObjectRegistry::ObjectCreatedSignalType mObjectCreatedSignal;
+  Dali::ObjectRegistry::ObjectDestroyedSignalType mObjectDestroyedSignal;
 
 };
 
@@ -148,4 +144,4 @@ inline const Internal::ObjectRegistry& GetImplementation(const Dali::ObjectRegis
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_OBJECT_REGISTRY_H__
+#endif // DALI_INTERNAL_OBJECT_REGISTRY_H