[2.2.1] Apply reviewed header file (Base to Collection)
[platform/framework/native/appfw.git] / inc / FBaseColHashMapT.h
index e731325..35751e4 100644 (file)
@@ -51,7 +51,7 @@ template< class KeyType > class __HashMapDefaultProviderT;
  * The %HashMapT class provides a template-based collection of associated keys and values
  * that are organized based on the hash code of the key.
  * It contains unique keys and each key maps to one single value.
- * The key and value cannot be a null reference. Several methods in the %HashMapT class need assignment (=) operators of KeyType and ValueType.
+ * The key and value cannot be a @c null reference. Several methods in the %HashMapT class need the assignment (=) operators of the KeyType and the ValueType.
  * @n
  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/base/hashmap_multihashmap.htm">HashMap and MultiHashMap</a>.
  *
@@ -152,8 +152,9 @@ public:
         * @param[in]   capacity                The initial capacity
         * @param[in]   loadFactor              The maximum ratio of elements to buckets
         * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_INVALID_ARG   A specified input parameter is invalid, or
-        *                                                              the @c capacity or the @c loadFactor is negative.
+        * @exception   E_INVALID_ARG   Either of the following conditions has occurred:
+        *                                                              - A specified input parameter is invalid.
+        *                                                              - The specified @c capacity or the specified @c loadFactor is negative.
         * @remarks             To work properly, the key type must be of a primitive number type.
         * @see                 HashMapT()
         */
@@ -217,13 +218,15 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   map                     The map to copy
-        * @param[in]   loadFactor      The maximum ratio of elements to buckets
+        * @param[in]   map                                     The map to copy
+        * @param[in]   loadFactor                      The maximum ratio of elements to buckets
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_ARG           A specified input parameter is invalid, or
-        *                                                                      the @c loadFactor is negative.
-        * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation, or
-        *                                                                      the @c map is modified during the operation of this method.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The specified @c loadFactor is negative.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                                      - The current state of the instance prohibits the execution of the specified operation.
+        *                                                                      - The specified @c map is modified during the operation of this method.
         * @see                 HashMapT()
         */
        result Construct(const IMapT< KeyType, ValueType >& map, float loadFactor = 0.75)
@@ -264,24 +267,24 @@ CATCH:
        }
 
        /**
-        * Initializes this instance of an empty %HashMapT class, with the specified initial capacity, load factor, hash code provider, and comparer.
+        * Initializes this instance of the empty %HashMapT, with the specified initial capacity, load factor, hash code provider, and comparer.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   capacity        The initial capacity @n
-        *                                                      If it is @c 0, the default capacity (16) is used.
-        * @param[in]   loadFactor      The maximum ratio of the elements to buckets @n
-        *                                                      If it is @c 0, the default load factor (0.75) is used.
-        * @param[in]   provider        An instance of the IHashCodeProviderT-derived class that supplies the hash codes
-        *                                                      for all keys in this map
-        * @param[in]   comparer        An instance of the IComparerT-derived class to use when comparing keys
+        * @param[in]   capacity                The initial capacity @n
+        *                                                              If it is @c 0, the default capacity (16) is used.
+        * @param[in]   loadFactor              The maximum ratio of the elements to buckets @n
+        *                                                              If it is @c 0, the default load factor (0.75) is used.
+        * @param[in]   provider                An instance of the IHashCodeProviderT-derived class that supplies the hash codes
+        *                                                              for all the keys in this map
+        * @param[in]   comparer                An instance of the IComparerT-derived class to use when comparing the keys
         * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_INVALID_ARG   Either of the following conditions has occurred: @n
-        *                                                              - A specified input parameter is invalid. @n
-        *                                                              - The specified @c capacity is negative. @n
-        *                                                              - The @c loadFactor is negative.
-        * @remarks             The instances of hash code provider and comparer will not be deallocated later from this map.
+        * @exception   E_INVALID_ARG   Either of the following conditions has occurred:
+        *                                                              - A specified input parameter is invalid.
+        *                                                              - The specified @c capacity is negative.
+        *                                                              - The specified @c loadFactor is negative.
+        * @remarks             The instances of the hash code provider and the comparer are not deallocated later from this map.
         * @see                 HashMapT()
         */
        result Construct(int capacity, float loadFactor, const IHashCodeProviderT< KeyType >& provider,
@@ -342,20 +345,21 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   map                     The map to copy
-        * @param[in]   loadFactor      The maximum ratio of elements to buckets @n
-        *                                                      If it is @c 0, the default load factor (0.75) is used.
-        * @param[in]   provider        An instance of the IHashCodeProviderT-derived class that supplies the hash codes
-        *                                                      for all keys in this map
-        * @param[in]   comparer        An instance of the IComparerT-derived class to use when comparing keys
+        * @param[in]   map                                     The map to copy
+        * @param[in]   loadFactor                      The maximum ratio of elements to buckets @n
+        *                                                                      If it is @c 0, the default load factor (0.75) is used.
+        * @param[in]   provider                        An instance of the IHashCodeProviderT-derived class that supplies the hash codes
+        *                                                                      for all the keys in this map
+        * @param[in]   comparer                        An instance of the IComparerT-derived class to use when comparing the keys
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
-        *                                                                      - A specified input parameter is invalid. @n
-        *                                                                      - The @c loadFactor is negative. @n
-        *                                                                      - The @c provider is a @c null or the @c comparer is a @c null.
-        * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation, or
-        *                                                                      the @c map is modified during the operation of this method.
-        * @remarks             The instances of hash code provider and comparer will not be deallocated later from this map.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The specified @c loadFactor is negative.
+        *                                                                      - Either the specified @c provider or the specified @c comparer is @c null.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                                      - The current state of the instance prohibits the execution of the specified operation.
+        *                                                                      - The specified @c map is modified during the operation of this method.
+        * @remarks             The instances of the hash code provider and the comparer are not deallocated later from this map.
         * @see                 HashMapT()
         */
        result Construct(const IMapT< KeyType, ValueType >& map, float loadFactor, const IHashCodeProviderT< KeyType >& provider,
@@ -391,16 +395,17 @@ CATCH:
        }
 
        /**
-        * Adds the specified key-value pair to a map.
+        * Adds the specified key-value pair to the map.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   key             The key of the value to add
-        * @param[in]   value   The value to add
+        * @param[in]   key                                     The key of the value to add
+        * @param[in]   value                           The value to add
         * @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 keys.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The comparer has failed to compare the keys.
         * @exception   E_OBJ_ALREADY_EXIST     The specified @c key already exists.
         * @see Remove()
         */
@@ -433,11 +438,11 @@ CATCH:
        }
 
        /**
-        * Gets the elements of a map in an instance of the IMapEnumeratorT-derived class.
+        * Gets the elements of the map through an instance of the IMapEnumeratorT-derived class.
         *
         * @since 2.0
         *
-        * @return              An instance of the IMapEnumeratorT-derived class if successful, @n
+        * @return              An instance of the IMapEnumeratorT-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.
@@ -461,11 +466,11 @@ CATCH:
        }
 
        /**
-        * Gets the elements of a map in an instance of the IMapEnumeratorT class.
+        * Gets the elements of the map through an instance of the IMapEnumeratorT class.
         *
         * @since 2.0
         *
-        * @return              An instance of the IMapEnumeratorT class if successful, @n
+        * @return              An instance of the IMapEnumeratorT 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.
@@ -485,12 +490,13 @@ CATCH:
         *
         * @return              The value associated with the key, @n
         *                              else @c null if an exception occurs
-        * @param[in]   key             The key to locate
-        * @param[out]  value   The value associated with the key
+        * @param[in]   key                                     The key to locate
+        * @param[out]  value                           The value associated with the @c key
         * @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 keys.
-        * @exception   E_OBJ_NOT_FOUND         The specified @c key is not found in the map.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The comparer has failed to compare the keys.
+        * @exception   E_OBJ_NOT_FOUND         The specified @c key has not been found in the map.
         * @see                 SetValue()
         */
        virtual result GetValue(const KeyType& key, ValueType& value) const
@@ -526,12 +532,13 @@ CATCH:
         *
         * @return              The value associated with the key, @n
         *                              else @c null if an exception occurs
-        * @param[in]   key             The key to locate
-        * @param[out]  value   The value associated with the key
+        * @param[in]   key                                     The key to locate
+        * @param[out]  value                           The value associated with the @c key
         * @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 keys.
-        * @exception   E_OBJ_NOT_FOUND         The specified @c key is not found in the map.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The comparer has failed to compare the keys.
+        * @exception   E_OBJ_NOT_FOUND         The specified @c key has not been found in the map.
         * @see                 SetValue()
         */
        virtual result GetValue(const KeyType& key, ValueType& value)
@@ -540,16 +547,17 @@ CATCH:
        }
 
        /**
-        * Gets a list of all the keys in a map.
+        * Gets the list of all the keys in the map.
         *
         * @since 2.0
         *
-        * @return              A pointer to an IListT object containing all the keys in the map, @n
+        * @return              A pointer to the IListT object that contains all the keys in the map, @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             The order of the keys is the same as the corresponding values in the IListT interface returned by the GetValuesN() method.
-        * @remarks             The specific error code can be accessed using the GetLastResult() method.
+        * @remarks
+        *                              - The order of the keys is the same as the corresponding values in the IListT interface returned by the GetValuesN() method.
+        *                              - The specific error code can be accessed using the GetLastResult() method.
         * @see                 GetValuesN()
         */
        virtual IListT< KeyType >* GetKeysN(void) const
@@ -582,11 +590,11 @@ CATCH:
        }
 
        /**
-        * Gets all the values in a map.
+        * Gets all the values in the map.
         *
         * @since 2.0
         *
-        * @return              A pointer to an IListT object containing all the values in the map, @n
+        * @return              A pointer to the IListT object that contains all the values in the map, @n
         *                              else @c null if an exception occurs
         * @exception   E_SUCCESS               The method is successful.
         * @exception   E_OUT_OF_MEMORY The memory is insufficient.
@@ -623,16 +631,17 @@ CATCH:
        }
 
        /**
-        * Removes the value associated with the specified @c key.
+        * Removes the value associated to the specified @c key.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   key The key to remove
+        * @param[in]   key                             The key to remove
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
-        *                                                                      the comparer has failed to compare the keys.
-        * @exception   E_OBJ_NOT_FOUND         The specified @c key is not found in the map.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - The specified input parameter is invalid.
+        *                                                                      - The comparer has failed to compare the keys.
+        * @exception   E_OBJ_NOT_FOUND         The specified @c key has not been found in the map.
         * @see                 Add()
         */
        virtual result Remove(const KeyType& key)
@@ -675,7 +684,7 @@ CATCH:
        }
 
        /**
-        * Removes all key-value pairs in the map.
+        * Removes all the key-value pairs in the map.
         *
         * @since 2.0
         */
@@ -695,14 +704,14 @@ CATCH:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   key             The key for which the value is to replace
-        * @param[in]   value   The new value to replace
+        * @param[in]   key                                     The key whose value is replaced
+        * @param[in]   value                           The new value to replace
         * @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 keys.
-        * @exception   E_OBJ_NOT_FOUND         The specified @c key is not found in the map.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The comparer has failed to compare the keys.
+        * @exception   E_OBJ_NOT_FOUND         The specified @c key has not been found in the map.
         * @remarks             Use the Add() method to add a new key-value pair.
-        * @see                 Add()
         * @see                 GetValue()
         */
        virtual result SetValue(const KeyType& key, const ValueType& value)
@@ -737,7 +746,7 @@ CATCH:
        }
 
        /**
-        * Gets the number of pairs currently stored in a map.
+        * Gets the number of pairs currently stored in the map.
         *
         * @since 2.0
         *
@@ -749,17 +758,18 @@ CATCH:
        }
 
        /**
-        * Checks whether a map contains the specified @c key.
+        * Checks whether the map contains the specified @c key.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   key             The key to locate
-        * @param[out]  out     Set to @c true if the map contains the specified @c key, @n
-        *                                              else @c false
+        * @param[in]   key                                     The key to locate
+        * @param[out]  out                             Set to @c true if the map contains the specified @c key, @n
+        *                                                                      else @c false
         * @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 keys.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The comparer has failed to compare the keys.
         * @see                 ContainsValue()
         */
        virtual result ContainsKey(const KeyType& key, bool& out) const
@@ -790,7 +800,7 @@ CATCH:
        }
 
        /**
-        * Checks whether a map contains the specified @c value.
+        * Checks whether the map contains the specified @c value.
         *
         * @since 2.0
         *
@@ -817,14 +827,14 @@ CATCH:
        }
 
        /**
-        * Compares two instances of the %HashMapT class.
+        * Compares two instances of %HashMapT.
         *
         * @since 2.0
         *
         * @return              @c true if the two instances match, @n
         *                              else @c false
         * @param[in]   obj The object to compare with the current instance
-        * @remarks             This method returns @c true if and only if the two instances contain the same number of elements and all the elements of each other.
+        * @remarks             This method returns @c true if and only if the two instances contain the same number of elements and all the elements are present in both of them.
         */
        virtual bool Equals(const Object& obj) const
        {
@@ -870,8 +880,8 @@ CATCH:
         * @since 2.0
         *
         * @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.
+        * @remarks     The two Tizen::Base::Object::Equals() instances must return the same hash value. @n
+        *                              For better performance, the used hash function must generate a random distribution for all the inputs.
         */
        virtual int GetHashCode(void) const
        {
@@ -1065,7 +1075,7 @@ public:
         * @param[in]   k               The key to include in this entry
         * @param[in]   v               The value to include in this entry
         * @param[in]   next    A pointer to the next entry
-        * @param[in]   h               A hash value of the key
+        * @param[in]   h               The hash value of the key
         */
        __HashMapEntryT(const KeyType& k, const ValueType& v, __HashMapEntryT< KeyType, ValueType >* next, int h)
                : key(k)
@@ -1160,9 +1170,10 @@ public:
         * @return              An error code
         * @param[out]  obj                                     The current object
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
-        *                                                                      This enumerator is currently positioned before the first element or
-        *                                                                      past the last element or the map is modified after this enumerator is created.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                                      - The current state of the instance prohibits the execution of the specified operation.
+        *                                                                      - This enumerator is currently positioned before the first element or past the last element.
+        *                                                                      - The map is modified after this enumerator is created.
         */
        virtual result GetCurrent(MapEntryT< KeyType, ValueType >& obj) const
        {
@@ -1175,17 +1186,17 @@ public:
        }
 
        /**
-        * Moves this enumerator to the next elements of the map.
+        * Moves this enumerator to the next element of the map.
         * When this enumerator is first created, or when the Reset() method is called, or when the %MoveNext() method is first called, the enumerator positions itself to the first element in the map.
         *
         * @since 2.0
         *
         * @return              An error code
         * @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 map is modified after this enumerator is created.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                                      - The current state of the instance prohibits the execution of the specified operation.
+        *                                                                      - The map is modified after this enumerator is created.
         * @exception   E_OUT_OF_RANGE          The enumerator has passed the end of the map.
-        * @see                 Reset()
         */
        virtual result MoveNext(void)
        {
@@ -1213,14 +1224,15 @@ public:
        }
 
        /**
-        * Positions the enumerator before the first element in a map.
+        * Positions the enumerator before the first element in the map.
         *
         * @since 2.0
         *
         * @return              An error code
         * @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 map is modified after this enumerator is created.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                                      - The current state of the instance prohibits the execution of the specified operation.
+        *                                                                      - The map is modified after this enumerator is created.
         */
        virtual result Reset(void)
        {
@@ -1233,16 +1245,17 @@ public:
        }
 
        /**
-        * Gets the current key in a map.
+        * Gets the current key in the map.
         *
         * @since 2.0
         *
         * @return              An error code
         * @param[out]  key                                     The current key
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
-        *                                                                      This enumerator is currently positioned before the first element or
-        *                                                                      past the last element or the map is modified after this enumerator is created.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                                      - The current state of the instance prohibits the execution of the specified operation.
+        *                                                                      - This enumerator is currently positioned before the first element or past the last element.
+        *                                                                      - The map is modified after this enumerator is created.
         */
        virtual result GetKey(KeyType& key) const
        {
@@ -1255,16 +1268,17 @@ public:
        }
 
        /**
-        * Gets the current value in a map.
+        * Gets the current value in the map.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  value The current value
+        * @param[out]  value                           The current value
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
-        *                                                                      This enumerator is currently positioned before the first element or
-        *                                                                      past the last element or the map is modified after the enumerator is created.
+        * @exception   E_INVALID_OPERATION     Either of the following conditions has occurred:
+        *                                                                      - The current state of the instance prohibits the execution of the specified operation.
+        *                                                                      - This enumerator is currently positioned before the first element or past the last element 
+        *                                                                      - The map is modified after the enumerator is created.
         */
        virtual result GetValue(ValueType& value) const
        {