Merge "Update deprecated libprivilege-control API functions." into tizen
[platform/framework/native/appfw.git] / inc / FBaseColLinkedList.h
index 19c49ac..58104c9 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -27,7 +26,6 @@
 #include <FBaseColIComparer.h>
 #include <FBaseColIList.h>
 
-
 namespace Tizen { namespace Base { namespace Collection
 {
 
@@ -110,7 +108,7 @@ public:
         * @since 2.0
         *
         * @param[in]   deleter The function pointer to type of the element deleter
-        * @remarks     To create an owing collection, set the element deleter value as @c SingleObjectDeleter. This gives the collection the ownership of elements and the collection will destroy elements. @n
+        * @remarks     To create an owning collection, set the element deleter value as @c SingleObjectDeleter. This gives the collection the ownership of elements and the collection will destroy elements. @n
         *                      On the other hand, to create a non-owning collection, you do not need to set the element deleter value, as @c NoOpDeleter is the default element deleter.
         *                      It means that you do not transfer the ownership of elements to the collection.
         * @see         NoOpDeleter()
@@ -132,9 +130,9 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   pObj            An pointer to object to add
+        * @param[in]   pObj                    An pointer to object to add
         * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_INVALID_ARG           The specified input parameter is invalid.
+        * @exception   E_INVALID_ARG   The specified input parameter is invalid.
         * @remarks             This method performs a shallow copy. It adds just the pointer; not the element itself.
         * @see Remove()
         */
@@ -146,7 +144,7 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   collection A collection to add
+        * @param[in]   collection                      A collection to add
         * @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 @c collection is modified during the operation of this method.
@@ -172,12 +170,12 @@ public:
         *
         * @since 2.0
         *
-        * @return        An instance of the IBidirectionalEnumerator derived class, @n
-        *                              else @c null if some 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                      An instance of the IBidirectionalEnumerator derived class, @n
+        *                                      else @c null if some 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;
 
@@ -188,7 +186,7 @@ public:
         *
         * @return              A pointer to the object at the specified index of the list, @n
         *                              else @c null if the index is not valid
-        * @param[in]   index The index of the object to read
+        * @param[in]   index                                   The index of the object to read
         * @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 equal to or greater than the number of elements or less than @c 0.
@@ -204,7 +202,7 @@ public:
         *
         * @return              A pointer to the object at the specified index of the list, @n
         *                              else @c null if the index is not valid
-        * @param[in]   index The index of the object to read
+        * @param[in]   index                                   The index of the object to read
         * @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 equal to or greater than the number of elements or less than @c 0.
@@ -214,6 +212,20 @@ public:
        virtual Object* GetAt(int index);
 
        /**
+        * Gets the reference of the object at the specified index of the calling list.
+        *
+        * @since               3.0
+        *
+        * @return              The reference of the object at the specified index of the list
+        * @param[in]           index                                   The index of the object to read
+        * @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 equal to or greater than the number of elements or less than @c 0.
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
+        */
+       virtual Object*& GetAtRef(int index);
+
+       /**
         * Gets an IList with the specified range from the calling list object.
         *
         * @since 2.0
@@ -308,7 +320,7 @@ public:
         *
         * @return              An error code
         * @param[in]   pObj            The pointer to object to insert
-        * @param[in]   index   The index at which the object must be inserted
+        * @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.
         * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
@@ -336,7 +348,7 @@ public:
         *                                                                              the @c collection is modified during the operation of this method.
         * @remarks             If the @c startIndex equals to the number of elements then the new elements
         *                              are added at the end of this list.
-        *                      This method performs a shallow copy. It inserts just the pointer; not the element itself.
+        *                              This method performs a shallow copy. It inserts just the pointer; not the element itself.
         * @see                 RemoveItems()
         * @see                 AddItems()
         */
@@ -348,7 +360,7 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   obj     An object to remove
+        * @param[in]   obj                             An object to remove
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OBJ_NOT_FOUND The specified @c obj is not found.
         * @see                 Add()
@@ -362,7 +374,7 @@ public:
         * @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 equal to or greater than the number of elements or less than @c 0.
@@ -395,7 +407,7 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   collection The collection to remove from this list
+        * @param[in]   collection                      The collection to remove from 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 @c collection is modified during the operation of this method.
@@ -421,7 +433,7 @@ public:
         *
         * @return              An error code
         * @param[in]   pObj            The pointer to object to set
-        * @param[in]   index   The index at which the object must be set
+        * @param[in]   index           The index at which the object must be set
         * @exception   E_SUCCESS                       The method is successful.
         * @exception   E_INVALID_ARG           The specified input parameter is invalid.
         * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
@@ -436,7 +448,7 @@ public:
         * @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, or
         *                                                              the @c comparer is not valid.
@@ -470,8 +482,8 @@ public:
         * @since 2.0
         *
         * @return              @c true if this list contains all of the elements in the specified collection, @n
-        *                                      else @c false
-        * @param[in]   collection      The collection to check for containment in this list
+        *                              else @c false
+        * @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 @c collection is modified during the operation of this method.
@@ -534,7 +546,7 @@ private:
         * Allocates and adds a memory block.
         *
         * @return              An error code
-        * @param[in]   blockSize       The size of block to allocate
+        * @param[in]   blockSize               The size of block to allocate
         * @exception   E_SUCCESS               The method is successful.
         */
        result AddBlock(int blockSize = DEFAULT_CAPACITY);
@@ -549,7 +561,7 @@ private:
         * Inserts an object to the beginning of the %LinkedList.
         *
         * @return              An error code
-        * @param[in]   pObj            The pointer to object to insert
+        * @param[in]   pObj                    The pointer to object to insert
         * @exception   E_SUCCESS               The method is successful.
         */
        result InsertFirst(Object* pObj);
@@ -558,7 +570,7 @@ private:
         * Inserts an object to the end of the %LinkedList.
         *
         * @return              An error code
-        * @param[in]   pObj            The pointer to object to insert
+        * @param[in]   pObj                    The pointer to object to insert
         * @exception   E_SUCCESS               The method is successful.
         */
        result InsertLast(Object* pObj);
@@ -567,8 +579,8 @@ private:
         * Inserts an object after the specified node.
         *
         * @return              An error code
-        * @param[in]   pObj            The pointer to object to insert
-        * @param[in]   pPrevNode The node after which the object must inserted
+        * @param[in]   pObj                    The pointer to object to insert
+        * @param[in]   pPrevNode               The node after which the object must inserted
         * @exception   E_SUCCESS               The method is successful.
         */
        result InsertNext(Object* pObj, _ListNode* pPrevNode);