Merge "Remove priviledge check for powermanager." into tizen_2.2
[platform/framework/native/appfw.git] / inc / FBaseColArrayListT.h
index af74afe..a687295 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);
@@ -28,7 +27,6 @@
 #include <FBaseColIListT.h>
 #include <FBaseColIComparerT.h>
 
-
 namespace Tizen { namespace Base { namespace Collection
 {
 
@@ -55,7 +53,7 @@ template< class Type > class __ArrayListEnumeratorT;
  *     void
  *     MyClass::ArrayListTSample(void)
  *     {
- *             ArrayListT<int> list;
+ *             ArrayListT< int > list;
  *
  *             list.Construct();
  *
@@ -76,7 +74,7 @@ template< class Type > class __ArrayListEnumeratorT;
  *
  *             list.InsertAt(int4, 1);         // 1,4,2,3
  *
- *             ComparerT<int>* pIntComparer = new ComparerT<int>();
+ *             ComparerT< int >* pIntComparer = new ComparerT<int>();
  *             list.Sort(*pIntComparer);       // 1,2,3,4
  *
  *             delete pIntComparer;
@@ -86,7 +84,7 @@ template< class Type > class __ArrayListEnumeratorT;
  *             list.RemoveAt(0);                       // 2,4
  *
  *             // Uses an enumerator to access elements in the list
- *             IEnumeratorT<int>* pEnum = list.GetEnumeratorN();
+ *             IEnumeratorT< int >* pEnum = list.GetEnumeratorN();
  *             while (pEnum->MoveNext() == E_SUCCESS)
  *             {
  *                     pEnum->GetCurrent(temp);
@@ -141,7 +139,7 @@ public:
         *                              The default capacity is @c 10.
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
-        *                                                                the specified @c capacity is negative.
+        *                                                              the specified @c capacity is negative.
         * @remarks             If the number of elements added to the list reaches its current capacity,
         *                              the capacity is automatically increased by memory reallocation.
         *                              Thus, if the size of the list can be estimated,
@@ -166,7 +164,7 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   collection      A collection of elements to add
+        * @param[in]   collection                      A collection of elements 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.
@@ -192,7 +190,7 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   obj     An object to add to the list
+        * @param[in]   obj                             An object to add to the list
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OUT_OF_MEMORY The memory is insufficient.
         * @see                 Remove()
@@ -218,7 +216,7 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   collection A collection of elements to add to the list
+        * @param[in]   collection                      A collection of elements 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 @c collection is modified during the operation of this method.
@@ -272,7 +270,7 @@ CATCH:
         * @return              An instance of the IEnumeratorT derived class if successful, @n
         *                              else @c null if an exception occurs
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_OUT_OF_MEMORY The memory is insufficient.
+        * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         * @see                 Tizen::Base::Collection::IEnumeratorT
         */
@@ -296,14 +294,14 @@ CATCH:
         *
         * @since 2.0
         *
-        * @return        An instance of the IBidirectionalEnumeratorT derived class, @n
-        *                              else @c null if an exception occurs
-        * @exception    E_SUCCESS        The method is successful.
-        * @exception    E_OUT_OF_MEMORY       The memory is insufficient.
-        * @remarks      Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
-        *                              to iterate over a collection (an instance of the IListT derived class).
-        * @remarks      The specific error code can be accessed using the GetLastResult() method.
-        * @see           Tizen::Base::Collection::IBidirectionalEnumeratorT
+        * @return              An instance of the IBidirectionalEnumeratorT derived class, @n
+        *                              else @c null if an exception occurs
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
+        * @remarks             Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
+        *                              to iterate over a collection (an instance of the IListT derived class).
+        * @remarks             The specific error code can be accessed using the GetLastResult() method.
+        * @see                 Tizen::Base::Collection::IBidirectionalEnumeratorT
         */
        virtual IBidirectionalEnumeratorT< Type >* GetBidirectionalEnumeratorN(void) const
        {
@@ -321,15 +319,15 @@ CATCH:
        }
 
        /**
-        * Gets the object at the specified index of the list.
+        * Gets the object at the specified @c index of the list.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index The index of the object to read
-        * @param[out]  obj An object to get from this list
+        * @param[in]   index                                   The index of the object to read
+        * @param[out]  obj                                             An object to get from this list
         * @exception   E_SUCCESS                               The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
+        * @exception   E_OUT_OF_RANGE                  The specified @c 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 or less than @c 0.
         * @see                 SetAt()
         */
@@ -344,15 +342,15 @@ CATCH:
        }
 
        /**
-        * Gets the object at the specified index of the list.
+        * Gets the object at the specified @c index of the list.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index The index of the object to read
-        * @param[out]  obj An object to get from this list
+        * @param[in]   index                                   The index of the object to read
+        * @param[out]  obj                                             An object to get from this list
         * @exception   E_SUCCESS                               The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
+        * @exception   E_OUT_OF_RANGE                  The specified @c 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 or less than @c 0.
         * @see                 SetAt()
         */
@@ -435,7 +433,7 @@ CATCH:
        }
 
        /**
-        * Searches for an object starting from the specified index. @n
+        * Searches for an object starting from the specified @c index. @n
         * Gets the index of the object if found.
         *
         * @since 2.0
@@ -446,7 +444,7 @@ CATCH:
         *                                                      It must be less than the number of elements.
         * @param[out]  index           The index of the object
         * @exception   E_SUCCESS                               The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
+        * @exception   E_OUT_OF_RANGE                  The specified @c index is outside the bounds of the data structure, or
         *                                                                              the specified @c startIndex is either equal to or greater than the number of elements or less than @c 0.
         * @exception   E_OBJ_NOT_FOUND                 The specified @c obj is not found.
         * @see                 LastIndexOf()
@@ -473,7 +471,7 @@ CATCH:
         * @param[out]  index           The index of the object
         * @exception   E_SUCCESS                               The method is successful.
         * @exception   E_OUT_OF_RANGE                  Either of the following conditions has occurred: @n
-        *                                                                              - The specified index is outside the bounds of the data structure. @n
+        *                                                                              - The specified @c index is outside the bounds of the data structure. @n
         *                                                                              - The specified @c startIndex is either greater than or equal to the number of elements or less than @c 0. @n
         *                                                                              - The specified @c count is either greater than the number of elements starting from @c startIndex or less than @c 0.
         * @exception   E_OBJ_NOT_FOUND                 The specified @c obj is not found.
@@ -511,7 +509,7 @@ CATCH:
         * @param[in]   obj             The object to insert
         * @param[in]   index   The index at which the object must be inserted
         * @exception   E_SUCCESS                               The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
+        * @exception   E_OUT_OF_RANGE                  The specified @c index is outside the bounds of the data structure, or
         *                                                                              the @c index is greater than the number of elements or less than @c 0.
         * @remarks             The elements that follow the insertion point move down to accommodate the new element.
         *                              If the @c index equals the number of elements in the list, the new element
@@ -649,7 +647,7 @@ CATCH:
         * @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()
@@ -676,7 +674,7 @@ CATCH:
         * @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.
@@ -724,9 +722,9 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index The index of the object that is to remove
+        * @param[in]   index                                   The index of the object that is to remove
         * @exception   E_SUCCESS                               The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
+        * @exception   E_OUT_OF_RANGE                  The specified @c index is outside the bounds of the data structure, or
         *                                                                              the specified @c index is greater than or equal to the number of elements or less than @c 0.
         * @remarks             The elements that follow the deleted object move up the list to occupy the empty location.
         * @see                 InsertAt()
@@ -823,7 +821,7 @@ CATCH:
        }
 
        /**
-        * Sets the object at a specified index of the current instance of ByteBuffer with the specified object.
+        * Sets the object at a specified @c index of the current instance of ByteBuffer with the specified object.
         *
         * @since 2.0
         *
@@ -831,7 +829,7 @@ CATCH:
         * @param[in]   obj             The object to set
         * @param[in]   index   The index at which the object must be set
         * @exception   E_SUCCESS                               The method is successful.
-        * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure, or
+        * @exception   E_OUT_OF_RANGE                  The specified @c 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 or less than @c 0.
         * @see                 GetAt()
         */
@@ -854,10 +852,10 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   newCapacity     The new capacity to set for the list
+        * @param[in]   newCapacity             The new capacity to set for the list
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
-        *                                                                the @c newCapacity is negative.
+        *                                                              the @c newCapacity is negative.
         * @remarks             If the new capacity is less than the current capacity, the memory
         *                              is truncated and the elements within the truncated memory are destroyed.
         * @see                 Construct()
@@ -912,7 +910,7 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   comparer A pointer to IComparerT
+        * @param[in]   comparer                A pointer to IComparerT
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
         *                                                              the @c comparer is not valid.
@@ -966,7 +964,7 @@ CATCH:
         * @since 2.0
         *
         * @return      The current capacity of the list
-        * @see                 SetCapacity()
+        * @see         SetCapacity()
         */
        int GetCapacity(void) const
        {
@@ -1014,13 +1012,13 @@ CATCH:
        }
 
        /**
-        * Checks whether the list contains all the elements of the specified collection.
+        * Checks whether the list contains all the elements of the specified @c collection.
         *
         * @since 2.0
         *
         * @return              An error code
         * @param[in]   collection      The collection to check for in the list
-        * @param[out]  out                     @c true if the list contains all the elements of the specified collection, @n
+        * @param[out]  out                     @c true if the list contains all the elements of the specified @c collection, @n
         *                                                      else @c false
         * @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
@@ -1119,7 +1117,7 @@ CATCH:
         *
         * @return      The hash value of the current instance
         * @remarks     The two Tizen::Base::Object::Equals() instances must return the same hash value. For better performance, @n
-        *              the used hash function must generate a random distribution for all inputs.
+        *                      the used hash function must generate a random distribution for all inputs.
         */
        virtual int GetHashCode(void) const
        {
@@ -1153,8 +1151,8 @@ private:
         * Sorts a section of a list using a comparer.
         *
         * @return              An error code
-        * @param[in]   startIndex The start index of the section of the list
-        * @param[in]   endIndex The end index of the section of the list
+        * @param[in]   startIndex              The start index of the section of the list
+        * @param[in]   endIndex                The end index of the section of the list
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
         *                                                              the comparer has failed to compare the elements.
@@ -1248,7 +1246,7 @@ public:
        {
                TryReturn((__modCount == __list.__modCount), E_INVALID_OPERATION,
                        "[%s] The source collection is modified after the creation of this enumerator.", GetErrorMessage(E_INVALID_OPERATION));
-               TryReturn((__position > -1) && (__position < static_cast <int>(__list.__count)), E_INVALID_OPERATION,
+               TryReturn((__position > -1) && (__position < static_cast< int >(__list.__count)), E_INVALID_OPERATION,
                        "[%s] Current position(%d) is before the first element or past the last element.", GetErrorMessage(E_INVALID_OPERATION), __position);
 
                obj = __list.__pObjArray[__position];