[dali_1.3.20] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / internal / event / common / object-registry-impl.h
index a5ce23d..13f225f 100644 (file)
@@ -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;
 
 };