X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fobject%2Fref-object.h;h=553a1fe8341dffe29100f4111b069036308eb185;hb=646f736e77b085c86e982c0d1d4b895c2a431330;hp=2413c7fb4ca00e652342b0ee8c127f32b2bfb0f5;hpb=d4d24b9faeb37adb170191e6fd2077b8ae6c5428;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/object/ref-object.h b/dali/public-api/object/ref-object.h index 2413c7f..553a1fe 100644 --- a/dali/public-api/object/ref-object.h +++ b/dali/public-api/object/ref-object.h @@ -2,7 +2,7 @@ #define __DALI_REF_OBJECT_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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,47 +19,59 @@ */ // EXTERNAL INCLUDES +#include // uint32_t + +// INTERNAL INCLUDES #include #include namespace Dali { +/** + * @addtogroup dali_core_object + * @{ + */ class Value; /** * @brief Base class for reference counted objects. * - * Typically this should be used with an instrusive pointer, + * Typically this should be used with an intrusive pointer, * instead of calling Reference() and Unreference() methods directly. + * @SINCE_1_0.0 */ -class DALI_IMPORT_API RefObject +class DALI_CORE_API RefObject { public: /** - * @brief Increment the object's reference count. + * @brief Increments the object's reference count. + * @SINCE_1_0.0 */ void Reference(); /** - * @brief Decrement the object's reference count. + * @brief Decrements the object's reference count. * * When the reference count drops to zero, the object will self-destruct. + * @SINCE_1_0.0 */ void Unreference(); /** - * @brief Retrieve the object's reference count. + * @brief Retrieves the object's reference count. * + * @SINCE_1_0.0 * @return The reference count */ - int ReferenceCount(); + uint32_t ReferenceCount(); protected: /** * @brief Default constructor. + * @SINCE_1_0.0 */ RefObject(); @@ -67,6 +79,7 @@ protected: * @brief RefObject is intended as a base class. * * A RefObject may only be deleted when its reference count is zero. + * @SINCE_1_0.0 */ virtual ~RefObject(); @@ -74,6 +87,7 @@ protected: * @brief Copy constructor. * * The newly copied object will have a reference count of zero. + * @SINCE_1_0.0 * @param[in] rhs The object to copy */ RefObject(const RefObject& rhs); @@ -82,16 +96,20 @@ protected: * @brief Assignment operator. * * The newly copied object will have a reference count of zero. + * @SINCE_1_0.0 * @param[in] rhs The object to copy - * @return a reference to this + * @return A reference to this */ RefObject& operator=(const RefObject& rhs); private: - volatile int mCount; ///< Reference count + volatile uint32_t mCount; ///< Reference count }; +/** + * @} + */ } // namespace Dali #endif // __DALI_REF_OBJECT_H__