//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
#include <FBaseComparerT.h>
#include <FBaseFloat.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* void
* MyClass::MultiHashMapTSample(void)
* {
- * MultiHashMapT<int, int> map;
+ * MultiHashMapT< int, int > map;
*
* // Constructs a MultiHashMap instance with default capacity, load factor, hash code provider, and comparer
* map.Construct();
*
* // Gets values with the specified key
* key = 1;
- * IEnumeratorT<int>* pValueEnum = map.GetValuesN(key);
+ * IEnumeratorT< int >* pValueEnum = map.GetValuesN(key);
* while (pValueEnum->MoveNext() == E_SUCCESS)
* {
* pValueEnum->GetCurrent(value);
* map.Remove(key); // 30, 3000 removed
*
* // Uses an enumerator to access elements in the map
- * IMapEnumeratorT<int, int>* pMapEnum = map.GetMapEnumeratorN();
+ * IMapEnumeratorT< int, int >* pMapEnum = map.GetMapEnumeratorN();
* while (pMapEnum->MoveNext() == E_SUCCESS)
* {
* pMapEnum->GetKey(key);
* @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 specified @c capacity or the @c loadFactor is negative.
+ * the specified @c capacity or the @c loadFactor is negative.
* @remarks The key type must be a primitive data type.
* @see MultiHashMapT()
*/
* If it is @c 0, the default load factor(0.75) is used.
* @param[in] provider An instance of the IHashCodeProvider derived class that supplies the hash codes
* for all keys in this map
- * @param[in] comparer An instance of the IComparer derived class to use when comparing keys
+ * @param[in] comparer An instance of the IComparer derived class to use when comparing keys
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c capacity or the @c loadFactor is negative.
+ * the specified @c capacity or the @c loadFactor is negative.
* @remarks The instances of hash code provider and comparer will not be deallocated later from this map.
* @see MultiHashMapT()
*/
*
* @return An enumerator (an instance of the IEnumeratorT derived class) of the values associated with the specified key, @n
* else @c null if an exception occurs
- * @param[in] key A key to locate
+ * @param[in] key A key to locate
* @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.
}
/**
- * Gets a list of all the keys in this map.
+ * Gets a list of all unique keys in this map.
*
* @since 2.0
*
- * @return A list of all the keys in this map, @n
+ * @return A list of all unique keys in this 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.
- * The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
* @see GetValuesN()
*/
virtual IListT< KeyType >* GetKeysN(void) const
* @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.
* @since 2.0
*
* @return An error code
- * @param[in] key The key whose mapping is to remove from the map
+ * @param[in] key The key whose mapping is to remove from the map
* @param[in] value The value to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* @param[in] key A key
* @param[in] value A value to replace
* @param[in] newValue A new value to replace the existing value
- * @exception E_SUCCESS The method is successful.
+ * @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 and @c value pair is not found in the map.
+ * @exception E_OBJ_NOT_FOUND The specified @c key and @c value pair is not found in the map.
* @remarks To add a new key-value pair, use the Add() method.
* @see Add()
* @see GetValuesN()
* @since 2.0
*
* @return An error code
- * @param[in] key A key to locate
+ * @param[in] key A key to locate
* @param[out] count The number of values whose key is @c key
- * @exception E_SUCCESS The method is successful.
+ * @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.
* @since 2.0
*
* @return An error code
- * @param[in] key The key to locate
- * @param[in] value The value to locate
+ * @param[in] key The key to locate
+ * @param[in] value The value to locate
* @param[out] out Set to @c true if the map contains the specified key and value pair, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @since 2.0
*
* @return An error code
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @param[out] out Set to @c true if the map contains the specified key, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* Copies all the pairs from the specified map to this map.
*
* @return An error code
- * @param[in] map The map to copy
+ * @param[in] map The map to copy
* @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
* The @c map is modified during the operation of this method.
* @since 2.0
*
* @param[in] keyType A key to include in this entry
- * @param[in] list A list of values whose key is specified @n
- * It cannot be @c null.
- * @param[in] next A pointer to the next entry
- * @param[in] h An hash value of the key
+ * @param[in] list A list of values whose key is specified @n
+ * It cannot be @c null.
+ * @param[in] next A pointer to the next entry
+ * @param[in] h An hash value of the key
*/
__MultiHashMapEntryT(const KeyType& keyType, __ValueNodeT< ValueType >* list, __MultiHashMapEntryT< KeyType, ValueType >* next, int h)
: key(keyType)
* @since 2.0
*
* @return An error code
- * @param[out] obj The current object
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - 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. @n
- * - The map is modified after this enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] obj The current object
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - 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. @n
+ * - The map is modified after this enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetCurrent(MapEntryT< KeyType, ValueType >& obj) const
{
* @since 2.0
*
* @return An error code
- * @param[out] key The current key
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - 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. @n
- * - The map is modified after this enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] key The current key
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - 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. @n
+ * - The map is modified after this enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetKey(KeyType& key) const
{
* @since 2.0
*
* @return An error code
- * @param[out] value The current value
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - 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. @n
- * - The map is modified after the enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] value The current value
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - 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. @n
+ * - The map is modified after the enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetValue(ValueType& value) const
{
* @since 2.0
*
* @return An error code
- * @param[out] obj The current value
+ * @param[out] obj The current value
* @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
* - The current state of the instance prohibits the execution of the specified operation. @n
* - This enumerator is currently positioned before the first element or