-#ifndef __DALI_BASE_OBJECT_H__
-#define __DALI_BASE_OBJECT_H__
+#ifndef DALI_BASE_OBJECT_H
+#define DALI_BASE_OBJECT_H
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
*
*/
+// EXTERNAL INCLUDES
+#include <memory>
+
// INTERNAL INCLUDES
#include <dali/public-api/object/ref-object.h>
#include <dali/public-api/object/base-handle.h>
* @brief A base class for objects.
* @SINCE_1_0.0
*/
-class DALI_IMPORT_API BaseObject : public Dali::RefObject
+class DALI_CORE_API BaseObject : public Dali::RefObject
{
public:
* @brief Connects a void() functor to a specified signal.
*
* @SINCE_1_0.0
- * @param [in] connectionTracker A connection tracker which can be used to disconnect.
- * @param [in] signalName Name of the signal to connect to.
- * @param [in] functor The functor to copy.
- * @return True if the signal was available.
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] signalName Name of the signal to connect to
+ * @param[in] functor The functor to copy
+ * @return True if the signal was available
* @pre The signal must be available in this object.
*/
template <class T>
* @brief Not intended for application developers.
*
* @SINCE_1_0.0
- * @param [in] connectionTracker A connection tracker which can be used to disconnect.
- * @param [in] signalName Name of the signal to connect to.
- * @param [in] functorDelegate A newly allocatated functor delegate (takes ownership).
- * @return True if the signal was available.
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] signalName Name of the signal to connect to
+ * @param[in] functorDelegate A newly allocated functor delegate (takes ownership)
+ * @return True if the signal was available
*/
bool DoConnectSignal( ConnectionTrackerInterface* connectionTracker, const std::string& signalName, FunctorDelegate* functorDelegate );
* @brief A reference counted object may only be deleted by calling Unreference().
* @SINCE_1_0.0
*/
- virtual ~BaseObject();
+ ~BaseObject() override;
/**
* @brief Registers the object as created with the Object registry.
*/
void UnregisterObject();
-private:
+ // Not copyable or movable
- // Not implemented
- DALI_INTERNAL BaseObject(const BaseObject& rhs);
+ BaseObject(const BaseObject& rhs) = delete; ///< Deleted copy constructor
+ BaseObject(BaseObject&& rhs) = delete; ///< Deleted move constructor
+ BaseObject& operator=(const BaseObject& rhs) = delete; ///< Deleted copy assignment operator
+ BaseObject& operator=(BaseObject&& rhs) = delete; ///< Deleted move assignment operator
+
+public:
+
+ class DALI_INTERNAL Impl;
+
+private:
- // Not implemented
- DALI_INTERNAL BaseObject& operator=(const BaseObject& rhs);
+ std::unique_ptr<Impl> mImpl;
};
// Helpers for public-api forwarding methods
/**
- * @brief Get the implementation of a handle.
+ * @brief Gets the implementation of a handle.
*
* @SINCE_1_0.0
* @param[in] handle The handle
- * @return A reference to the object the handle points at.
+ * @return A reference to the object the handle points at
*/
inline BaseObject& GetImplementation(Dali::BaseHandle& handle)
{
}
/**
- * @brief Get the implementation of a handle.
+ * @brief Gets the implementation of a handle.
*
* @SINCE_1_0.0
* @param[in] handle The handle
- * @return A reference to the object the handle points at.
+ * @return A reference to the object the handle points at
*/
inline const BaseObject& GetImplementation(const Dali::BaseHandle& handle)
{