{
/**
- * @interface IList
- * @brief This interface represents a collection of objects that can be individually accessed by an index.
+ * @interface IList
+ * @brief This interface represents a collection of objects that can be individually accessed by an index.
*
* @since 2.0
*
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to add
+ * @param[in] obj The object to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks In a collection of contiguous elements, such as a list, the elements
* @since 2.0
*
* @return An error code
- * @param[in] pObj The pointer to object to add
- * @exception E_SUCCESS The method is successful.
+ * @param[in] pObj The pointer to object to add
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks In a collection of contiguous elements, such as a list, the elements
* that follow the insertion point move down to accommodate the new element.
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to add to the list
+ * @param[in] collection The collection to add to the list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
* the @c index is greater than the number of elements in the list or less than @c 0.
* @remarks If the @c index equals the number of elements in the list, the new element
* is added at the end of the list.
- * This method performs a shallow copy. It inserts the pointer only; not the element itself.
- * @see Add()
+ * This method performs a shallow copy. It inserts the pointer only; not the element itself.
+ * @see Add(Object*)
* @see RemoveAt()
* @endif
*/
* @since 2.0
*
* @return An error code
- * @param[in] pObj The pointer to object to insert
+ * @param[in] pObj The pointer to object to insert
* @param[in] index The index at which the object must be inserted
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks If the @c index equals the number of elements in the list, the new element
* is added at the end of the list.
* This method performs a shallow copy. It inserts the pointer only; not the element itself.
- * @see Add()
+ * @see Add(Object*)
* @see RemoveAt()
*/
virtual result InsertAt(Object* pObj, int index) = 0;
*
* @return The object at the specified location, @n
* else @c null if the @c index is not valid
- * @param[in] index The index of the object to get
+ * @param[in] index The index of the object to get
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
* - The @c count is greater than the number of elements in the list starting from @c startIndex
* or less than @c 0.
* @remarks The %IList stores just the pointers to the elements in the list, not the elements themselves.
- * The specific error code can be accessed using the GetLastResult() method.
+ * The specific error code can be accessed using the GetLastResult() method.
*/
virtual IList* GetItemsN(int startIndex, int count) const = 0;
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
- * @remarks Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
+ * @remarks
+ * - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
- * @remarks Remove(obj, @b true) internally works as the below code:
+ * - Remove(obj, @b true) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(SingleObjectDeleter);
* Remove(obj);
* SetDeleter(deleter);
* @endcode
- * @remarks Remove(obj, @b false) internally works as the below code:
+ * - Remove(obj, @b false) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(NoOpDeleter);
* Remove(obj);
* SetDeleter(deleter);
* @endcode
- * @see Add()
+ * @see Add(Object*)
* @see RemoveAt()
*/
result Remove(const Object& obj, bool forceDeletion)
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to remove
+ * @param[in] obj The object to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
- * @see Add()
+ * @see Add(Object*)
* @see RemoveAt()
*/
virtual result Remove(const Object& obj) = 0;
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @param[in] forceDeletion Set to @c true to deallocate the object, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
- * @remarks Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
+ * @remarks
+ * - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
- * @remarks RemoveAt(index, @b true) internally works as the below code:
+ * - RemoveAt(index, @b true) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(SingleObjectDeleter);
* RemoveAt(index);
* SetDeleter(deleter);
* @endcode
- * @remarks RemoveAt(index, @b false) internally works as the below code:
+ * - RemoveAt(index, @b false) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(NoOpDeleter);
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
* - The specified @c startIndex is either equal to or greater than the number of elements in the list or less than @c 0. @n
* - The @c count is greater than the number of elements starting from @c startIndex
* or less than @c 0.
- * @remarks Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
+ * @remarks
+ * - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
- * @remarks RemoveItems(startIndex, count, @b true) internally works as the below code:
+ * - RemoveItems(startIndex, count, @b true) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(SingleObjectDeleter);
* RemoveItems(startIndex, count);
* SetDeleter(deleter);
* @endcode
- * @remarks RemoveItems(startIndex, count, @b false) internally works as the below code:
+ * - RemoveItems(startIndex, count, @b false) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(NoOpDeleter);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
- * @remarks Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
+ * @remarks
+ * - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
- * @remarks RemoveItems(collection, @b true) internally works as the below code:
+ * - RemoveItems(collection, @b true) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(SingleObjectDeleter);
* RemoveItems(collection);
* SetDeleter(deleter);
* @endcode
- * @remarks RemoveItems(collection, @b false) internally works as the below code:
+ * - RemoveItems(collection, @b false) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(NoOpDeleter);
*
* @return An error code
* @param[in] forceDeletion Set to @c true to deallocate all the objects, @n
- * else @c false
- * @remarks Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
+ * else @c false
+ * @remarks
+ * - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
- * @remarks RemoveAll(@b true) internally works as the below code:
+ * - RemoveAll(@b true) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(SingleObjectDeleter);
* RemoveAll();
* SetDeleter(deleter);
* @endcode
- * @remarks RemoveAll(@b false) internally works as the below code:
+ * - RemoveAll(@b false) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(NoOpDeleter);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
- * @remarks Based on the specified element deleter, the set operation not only gets rid of an element from a list, but also deletes its object instance. @n
+ * @remarks
+ * - Based on the specified element deleter, the set operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the set method. @n
* If both an element deleter and forceDeleteion are set, the set operation follows @c forceDeletion setting.
- * @remarks SetAt(obj, index, @b true) internally works as the below code:
+ * - SetAt(obj, index, @b true) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(SingleObjectDeleter);
* SetAt(const_cast< Object* >(&obj), index);
* SetDeleter(deleter);
* @endcode
- * @remarks SetAt(obj, index, @b false) internally works as the below code:
+ * - SetAt(obj, index, @b false) internally works as the below code:
* @code
* DeleterFunctionType deleter = GetDeleter();
* SetDeleter(NoOpDeleter);
* @since 2.0
*
* @return An error code
- * @param[in] comparer The IComparer implementation to use when comparing elements
+ * @param[in] comparer The IComparer implementation to use when comparing elements
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
*
* @return @c true if the list contains all the elements of the specified collection, @n
* else @c false
- * @param[in] collection The collection to check for containment in this list
+ * @param[in] collection The collection to check for containment in this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If the given @c collection is empty, this method will return @c true.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If the given @c collection is empty, this method will return @c true.
* @see Contains()
*/
virtual bool ContainsAll(const ICollection& collection) const = 0;
*
* @since 2.0
*
- * @return A pointer to a bidirectional enumerator interface of the %IList derived class, @n
- * else @c null if an exception occurs
- * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
- * to iterate over a collection (an instance of the %IList derived class).
- * The specific error code can be accessed using GetLastResult() method.
- * @see Tizen::Base::Collection::IBidirectionalEnumerator
+ * @return A pointer to a bidirectional enumerator interface of the %IList derived class, @n
+ * else @c null if an exception occurs
+ * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
+ * to iterate over a collection (an instance of the %IList derived class).
+ * The specific error code can be accessed using GetLastResult() method.
+ * @see Tizen::Base::Collection::IBidirectionalEnumerator
*/
virtual IBidirectionalEnumerator* GetBidirectionalEnumeratorN(void) const = 0;
*/
virtual DeleterFunctionType GetDeleter(void) const = 0;
+ /**
+ * Gets the reference of the object at the specified location.
+ *
+ * @since 3.0
+ *
+ * @return The reference of the object at the specified location
+ * @param[in] index The index of the object to get
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
+ * the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ */
+ virtual Object*& GetAtRef(int index)
+ {
+ return Object::pNullObj;
+ }
+
protected:
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
virtual void IList_Reserved1(void) {}
- //
- // This method is for internal use only. Using this method can cause behavioral, security-related,
- // and consistency-related issues in the application.
- // This method is reserved and may change its name at any time without prior notice.
- //
- // @since 2.0
- //
- virtual void IList_Reserved2(void) {}
-
private:
/**
* Sets the element deleter of the collection.