Move WeakHandle to the Public API 33/153533/3
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 Sep 2017 14:38:17 +0000 (15:38 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 29 Sep 2017 09:28:29 +0000 (10:28 +0100)
Change-Id: Ie324f3da23047374b6a857b1d74ca5867caa2969

automated-tests/src/dali/utc-Dali-WeakHandle.cpp
dali/devel-api/CMakeLists.txt
dali/devel-api/file.list
dali/internal/event/actors/actor-impl.cpp
dali/public-api/CMakeLists.txt
dali/public-api/dali-core.h
dali/public-api/file.list
dali/public-api/object/weak-handle.cpp [moved from dali/devel-api/object/weak-handle.cpp with 96% similarity]
dali/public-api/object/weak-handle.h [moved from dali/devel-api/object/weak-handle.h with 66% similarity]

index 9fc86a5..186e5c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -16,7 +16,6 @@
  */
 
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/object/weak-handle.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
index 75151be..0bdfd9a 100644 (file)
@@ -56,7 +56,6 @@ SET( DEVEL_API_HEADERS
   ${CMAKE_CURRENT_SOURCE_DIR}/object/csharp-type-registry.h
   ${CMAKE_CURRENT_SOURCE_DIR}/object/handle-devel.h
   ${CMAKE_CURRENT_SOURCE_DIR}/object/property-helper-devel.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/object/weak-handle.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderer-devel.h
 
index 6fa8e0c..4a5d6eb 100644 (file)
@@ -13,7 +13,6 @@ devel_api_src_files = \
   $(devel_api_src_dir)/images/nine-patch-image.cpp \
   $(devel_api_src_dir)/images/pixel-data-devel.cpp \
   $(devel_api_src_dir)/object/handle-devel.cpp \
-  $(devel_api_src_dir)/object/weak-handle.cpp \
   $(devel_api_src_dir)/object/csharp-type-registry.cpp \
   $(devel_api_src_dir)/scripting/scripting.cpp \
   $(devel_api_src_dir)/signals/signal-delegate.cpp \
@@ -61,8 +60,7 @@ devel_api_core_object_header_files = \
   $(devel_api_src_dir)/object/csharp-type-info.h \
   $(devel_api_src_dir)/object/csharp-type-registry.h \
   $(devel_api_src_dir)/object/handle-devel.h \
-  $(devel_api_src_dir)/object/property-helper-devel.h \
-  $(devel_api_src_dir)/object/weak-handle.h
+  $(devel_api_src_dir)/object/property-helper-devel.h
 
 devel_api_core_rendering_header_files = \
   $(devel_api_src_dir)/rendering/renderer-devel.h
index eb3ec85..e16eed2 100644 (file)
@@ -33,7 +33,6 @@
 #include <dali/public-api/math/radian.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/devel-api/actors/actor-devel.h>
-#include <dali/devel-api/object/weak-handle.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali/internal/common/internal-constants.h>
 #include <dali/internal/event/common/event-thread-services.h>
index c7f2e58..618e22c 100644 (file)
@@ -191,6 +191,7 @@ SET(PUBLIC_API_HEADERS
   ${CMAKE_CURRENT_SOURCE_DIR}/object/type-info.h
   ${CMAKE_CURRENT_SOURCE_DIR}/object/type-registry.h
   ${CMAKE_CURRENT_SOURCE_DIR}/object/type-registry-helper.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/object/weak-handle.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/render-tasks/render-task.h
   ${CMAKE_CURRENT_SOURCE_DIR}/render-tasks/render-task-list.h
index f0a4516..3e602bf 100644 (file)
 #include <dali/public-api/object/type-info.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
+#include <dali/public-api/object/weak-handle.h>
 
 #include <dali/public-api/render-tasks/render-task-list.h>
 #include <dali/public-api/render-tasks/render-task.h>
index e23504d..d594cd0 100644 (file)
@@ -86,6 +86,7 @@ public_api_src_files = \
   $(public_api_src_dir)/signals/functor-delegate.cpp \
   $(public_api_src_dir)/object/type-info.cpp \
   $(public_api_src_dir)/object/type-registry.cpp \
+  $(public_api_src_dir)/object/weak-handle.cpp \
   $(public_api_src_dir)/dali-core-version.cpp
 
 
@@ -198,7 +199,8 @@ public_api_core_object_header_files = \
   $(public_api_src_dir)/object/ref-object.h \
   $(public_api_src_dir)/object/type-info.h \
   $(public_api_src_dir)/object/type-registry.h \
-  $(public_api_src_dir)/object/type-registry-helper.h
+  $(public_api_src_dir)/object/type-registry-helper.h \
+  $(public_api_src_dir)/object/weak-handle.h
 
 public_api_core_render_tasks_header_files = \
   $(public_api_src_dir)/render-tasks/render-task.h \
similarity index 96%
rename from dali/devel-api/object/weak-handle.cpp
rename to dali/public-api/object/weak-handle.cpp
index cfe628b..42905b0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/event/common/object-impl.h>
similarity index 66%
rename from dali/devel-api/object/weak-handle.h
rename to dali/public-api/object/weak-handle.h
index 982a036..47883a8 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_WEAK_HANDLE_H__
-#define __DALI_WEAK_HANDLE_H__
+#ifndef DALI_WEAK_HANDLE_H
+#define DALI_WEAK_HANDLE_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
 
 namespace Dali
 {
+/**
+ * @addtogroup dali_core_object
+ * @{
+ */
 
 /**
- * @brief Base class to store a weak pointer to an internal Dali object. The handle to the object
- * can be accessed if the object exists, and such access is not reference counted. When the object
- * is deleted, the weak pointer will be set to NULL, and any further attmpt to access to a deleted
- * object will return an empty handle.
+ * @brief Base class to store a weak pointer to an internal DALi object.
  *
+ * The handle to the object can be accessed if the object exists, and such access is not reference counted.
+ * When the object is deleted, the weak pointer will be set to NULL, and any further attempt to access to a
+ * deleted object will return an empty handle.
+ * @SINCE_1_2.60
  */
 class DALI_IMPORT_API WeakHandleBase
 {
@@ -39,24 +44,28 @@ public:
 
   /**
    * @brief Default constructor which provides an uninitialized Dali::WeakHandleBase.
+   * @SINCE_1_2.60
    */
   WeakHandleBase();
 
   /**
-   * @brief This constructor creates a weak handle of the Dali object.
+   * @brief This constructor creates a weak handle of the DALi object.
    *
-   * @param [in] handle A reference to the handle of the Dali object.
+   * @SINCE_1_2.60
+   * @param [in] handle A reference to the handle of the DALi object
    */
   WeakHandleBase( Handle& handle );
 
   /**
    * @brief Destructor to free resources.
+   * @SINCE_1_2.60
    */
   ~WeakHandleBase();
 
   /**
    * @brief Copy constructor.
    *
+   * @SINCE_1_2.60
    * @param [in] handle A reference to the copied WeakHandleBase
    */
   WeakHandleBase(const WeakHandleBase& handle);
@@ -64,7 +73,8 @@ public:
   /**
    * @brief Assignment operator.
    *
-   * It makes this WeakHandleBase point to the same internal Dali object as the copied WeakHandleBase
+   * It makes this WeakHandleBase point to the same internal DALi object as the copied WeakHandleBase
+   * @SINCE_1_2.60
    * @param [in] rhs  A reference to the copied WeakHandleBase
    * @return A reference to this WeakHandleBase
    */
@@ -73,41 +83,49 @@ public:
   /**
    * @brief Equality operator overload.
    *
-   * @param [in] rhs A reference to the compared WeakHandleBase.
-   * @return true if the handle points to the same Dali resource, or if both are uninitialized.
+   * @SINCE_1_2.60
+   * @param [in] rhs A reference to the compared WeakHandleBase
+   * @return true if the handle points to the same DALi resource, or if both are uninitialized
    */
   bool operator==(const WeakHandleBase& rhs) const;
 
   /**
    * @brief Inequality operator overload.
    *
-   * @param [in] rhs A reference to the compared WeakHandleBase.
-   * @return true if the handle points to the different Dali resources.
+   * @SINCE_1_2.60
+   * @param [in] rhs A reference to the compared WeakHandleBase
+   * @return true if the handle points to the different DALi resources
    */
   bool operator!=(const WeakHandleBase& rhs) const;
 
   /**
-   * @brief Gets the handle to the Dali object.
+   * @brief Gets the handle to the DALi object.
    *
-   * @return The handle of the Dali object pointed by this WeakHandleBase or an empty handle if the Dali object doesn't exist.
+   * @SINCE_1_2.60
+   * @return The handle of the DALi object pointed by this WeakHandleBase or an empty handle if the DALi object doesn't exist
    */
   Handle GetBaseHandle() const;
 
   /**
-   * @brief Resets this weak handle to not point to any Dali object
+   * @brief Resets this weak handle to not point to any DALi object
+   * @SINCE_1_2.60
    */
   void Reset();
 
 
 protected:
 
+  /// @cond internal
   struct Impl;
   Impl* mImpl;
+  /// @endcond
 };
 
 
 /**
- * @brief Weak handle for the given type of Dali object.
+ * @brief Weak handle for the given type of DALi object.
+ * @SINCE_1_2.60
+ * @see WeakHandleBase
  */
 template < class T >
 class WeakHandle : public WeakHandleBase
@@ -185,6 +203,9 @@ public:
   }
 };
 
+/**
+ * @}
+ */
 } // namespace Dali
 
-#endif // __DALI_WEAK_HANDLE_H__
+#endif // DALI_WEAK_HANDLE_H