projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure BaseHandle class move noexcept (core public-api)
[platform/core/uifw/dali-core.git]
/
dali
/
public-api
/
object
/
object-registry.h
diff --git
a/dali/public-api/object/object-registry.h
b/dali/public-api/object/object-registry.h
index
9c8034b
..
15a84d9
100644
(file)
--- a/
dali/public-api/object/object-registry.h
+++ b/
dali/public-api/object/object-registry.h
@@
-1,8
+1,8
@@
-#ifndef
__DALI_OBJECT_REGISTRY_H__
-#define
__DALI_OBJECT_REGISTRY_H__
+#ifndef
DALI_OBJECT_REGISTRY_H
+#define
DALI_OBJECT_REGISTRY_H
/*
/*
- * Copyright (c) 20
14
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-18,15
+18,16
@@
*
*/
*
*/
-// EXTERNAL INCLUDES
-#include <boost/function.hpp>
-
// INTERNAL INCLUDES
#include <dali/public-api/object/handle.h>
// INTERNAL INCLUDES
#include <dali/public-api/object/handle.h>
-#include <dali/public-api/signals/dali-signal
-v2
.h>
+#include <dali/public-api/signals/dali-signal.h>
-namespace Dali
DALI_IMPORT_API
+namespace Dali
{
{
+/**
+ * @addtogroup dali_core_object
+ * @{
+ */
namespace Internal DALI_INTERNAL
{
namespace Internal DALI_INTERNAL
{
@@
-42,75
+43,88
@@
class ObjectRegistry;
*
* Care should be taken to not store the handle in the Observer, as this will
* have adverse effect on the life time of the Internal Object. The Handle
*
* Care should be taken to not store the handle in the Observer, as this will
* have adverse effect on the life time of the Internal Object. The Handle
- * should only be used to connect to signals
+ * should only be used to connect to signals
.
*
* Usage:
* ObjectRegistry registry = Stage::GetObjectRegistry();
* registry.ObjectCreatedSignal().Connect( ObjectCreatedCallbackFunc );
*
*
* Usage:
* ObjectRegistry registry = Stage::GetObjectRegistry();
* registry.ObjectCreatedSignal().Connect( ObjectCreatedCallbackFunc );
*
+ * Signals
+ * | %Signal Name | Method |
+ * |------------------|------------------------------|
+ * | objectCreated | @ref ObjectCreatedSignal() |
+ * | objectDestroyed | @ref ObjectDestroyedSignal() |
+ * @SINCE_1_0.0
*/
*/
-class ObjectRegistry : public BaseHandle
+class
DALI_CORE_API
ObjectRegistry : public BaseHandle
{
public:
{
public:
-
- //Signal Names
- static const char* const SIGNAL_OBJECT_CREATED; ///< Created signal name
- static const char* const SIGNAL_OBJECT_DESTROYED; ///< Destroyed signal name
-
// Typedefs
/**
// Typedefs
/**
- * @brief Object created signal
+ * @brief Object created signal.
+ * @SINCE_1_0.0
*/
*/
-
typedef SignalV2< void (BaseHandle) > ObjectCreatedSignalV2
;
+
using ObjectCreatedSignalType = Signal<void(BaseHandle)>
;
/**
/**
- * @brief Object destroyed signal
+ * @brief Object destroyed signal.
+ * @SINCE_1_0.0
*/
*/
-
typedef SignalV2< void (const Dali::RefObject*) > ObjectDestroyedSignalV2
;
+
using ObjectDestroyedSignalType = Signal<void(const Dali::RefObject*)>
;
/**
* @brief Allows the creation of an empty objectRegistry handle.
*
* To retrieve the current objectRegistry,
* this handle can be set using Stage::GetCurrent().GetObjectRegistry().
/**
* @brief Allows the creation of an empty objectRegistry handle.
*
* To retrieve the current objectRegistry,
* this handle can be set using Stage::GetCurrent().GetObjectRegistry().
+ * @SINCE_1_0.0
*/
ObjectRegistry();
/**
*/
ObjectRegistry();
/**
- * @brief Destructor
+ * @brief Destructor
.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
+ * @SINCE_1_0.0
*/
~ObjectRegistry();
/**
* @brief This copy constructor is required for (smart) pointer semantics.
*
*/
~ObjectRegistry();
/**
* @brief This copy constructor is required for (smart) pointer semantics.
*
- * @param [in] handle A reference to the copied handle
+ * @SINCE_1_0.0
+ * @param[in] handle A reference to the copied handle
*/
ObjectRegistry(const ObjectRegistry& handle);
/**
* @brief This assignment operator is required for (smart) pointer semantics.
*
*/
ObjectRegistry(const ObjectRegistry& handle);
/**
* @brief This assignment operator is required for (smart) pointer semantics.
*
- * @param [in] rhs A reference to the copied handle
+ * @SINCE_1_0.0
+ * @param[in] rhs A reference to the copied handle
* @return A reference to this
*/
ObjectRegistry& operator=(const ObjectRegistry& rhs);
/**
* @return A reference to this
*/
ObjectRegistry& operator=(const ObjectRegistry& rhs);
/**
- * @brief This method is defined to allow assignment of the NULL value,
- * and will throw an exception if passed any other value.
+ * @brief Move constructor.
*
*
- * Assigning to NULL is an alias for Reset().
- * @param [in] rhs A NULL pointer
+ * @SINCE_1_9.22
+ * @param[in] rhs A reference to the moved handle
+ */
+ ObjectRegistry(ObjectRegistry&& rhs) noexcept;
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.22
+ * @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
* @return A reference to this handle
*/
- ObjectRegistry& operator=(
BaseHandle::NullType* rhs)
;
+ ObjectRegistry& operator=(
ObjectRegistry&& rhs) noexcept
;
public: // Signals
public: // Signals
-
/**
* @brief This signal is emitted when an object is created.
*
/**
* @brief This signal is emitted when an object is created.
*
@@
-118,10
+132,11
@@
public: // Signals
* @code
* void YourCallbackName(BaseHandle object);
* @endcode
* @code
* void YourCallbackName(BaseHandle object);
* @endcode
+ * @SINCE_1_0.0
+ * @return The signal to connect to
* @pre The Object has been initialized.
* @pre The Object has been initialized.
- * @return The signal to connect to.
*/
*/
- ObjectCreatedSignal
V2
& ObjectCreatedSignal();
+ ObjectCreatedSignal
Type
& ObjectCreatedSignal();
/**
* @brief This signal is emitted when an object is destroyed.
/**
* @brief This signal is emitted when an object is destroyed.
@@
-141,21
+156,27
@@
public: // Signals
* @code
* void YourCallbackName(const Dali::RefObject* objectPointer);
* @endcode
* @code
* void YourCallbackName(const Dali::RefObject* objectPointer);
* @endcode
+ * @SINCE_1_0.0
+ * @return The signal to connect to
* @pre The Object has been initialized.
* @pre The Object has been initialized.
- * @return The signal to connect to.
*/
*/
- ObjectDestroyedSignal
V2
& ObjectDestroyedSignal();
+ ObjectDestroyedSignal
Type
& ObjectDestroyedSignal();
public: // Not intended for application developers
public: // Not intended for application developers
-
+ /// @cond internal
/**
* @brief This constructor is used by Dali Get() method.
*
/**
* @brief This constructor is used by Dali Get() method.
*
- * @param [in] objectRegistry A pointer to a Dali resource
+ * @SINCE_1_0.0
+ * @param[in] objectRegistry A pointer to a Dali resource
*/
explicit DALI_INTERNAL ObjectRegistry(Internal::ObjectRegistry* objectRegistry);
*/
explicit DALI_INTERNAL ObjectRegistry(Internal::ObjectRegistry* objectRegistry);
+ /// @endcond
};
};
+/**
+ * @}
+ */
} // namespace Dali
} // namespace Dali
-#endif //
__DALI_OBJECT_REGISTRY_H__
+#endif //
DALI_OBJECT_REGISTRY_H