#ifndef _FBASE_COL_PAIR_ITERATOR_T_H_
#define _FBASE_COL_PAIR_ITERATOR_T_H_
-#include <algorithm> // std::swap (Before C++11)
+#include <algorithm> // std::swap (Before C++11)
#include <iterator>
#include <utility>
#include <unique_ptr.h>
{
/**
* @class PairIteratorT
- * @brief This class provides an iterator that is used to convert IMap or IMultiMap to STL containers. @n
- * StlConverter provides static methods to get this iterator from %IMap or %IMultiMap.
+ * @brief This class provides an iterator that is used to convert %IMap or %IMultiMap to STL containers. @n
+ * %StlConverter provides static methods to get this iterator from %IMap or %IMultiMap.
*
* @since 2.1
*
* StlConverter provides static methods to get this iterator from IMap or IMultiMap.
*/
-template < typename K, typename V >
+template< typename K, typename V >
class PairIteratorT
: public std::iterator< std::input_iterator_tag, std::pair< K, V > >
{
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- PairIteratorT< K, V >& operator=(const PairIteratorT< K, V >& rhs)
+ PairIteratorT< K, V >& operator =(const PairIteratorT< K, V >& rhs)
{
PairIteratorT< K, V > tmp(rhs);
tmp.swap(*this);
*
* @return A std::pair type reference with K and V type
*/
- std::pair< K, V >& operator*(void) const
+ std::pair< K, V >& operator *(void) const
{
AppAssertf(!__isPostEnd, "It is out of range.");
return const_cast< std::pair< K, V >& >(__currentObj);
*
* @return A std::pair type pointer equivalent to the pointer address
*/
- std::pair< K, V >* operator->(void) const
+ std::pair< K, V >* operator ->(void) const
{
- return &(operator*());
+ return &(operator *());
}
/**
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- PairIteratorT< K, V >& operator++(void)
+ PairIteratorT< K, V >& operator ++(void)
{
TryReturnResult(!__isPostEnd, *this, E_OUT_OF_RANGE, "[%s] It already reached the end.", GetErrorMessage(E_OUT_OF_RANGE));
result r = __pEnum->MoveNext();
- TryCatchResult(r == E_SUCCESS, __isPostEnd = true; __currentObj.first = null; __currentObj.second = null,
+ TryCatchResult(r == E_SUCCESS, __isPostEnd = true;
+ __currentObj.first = null;
+ __currentObj.second = null,
r, "[%s] It already reached the end.", GetErrorMessage(r));
__currentObj.first = static_cast< K >(__pEnum->GetKey());
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- PairIteratorT< K, V > operator++(int)
+ PairIteratorT< K, V > operator ++(int)
{
PairIteratorT< K, V > tempIter = *this;
- operator++();
+ operator ++();
return tempIter;
}
* else @c false
* @param[in] rhs A reference to the %PairIteratorT instance on the right-hand side of the operator
*/
- bool operator==(const PairIteratorT< K, V >& rhs) const
+ bool operator ==(const PairIteratorT< K, V >& rhs) const
{
if (__pMap != rhs.__pMap)
{
* else @c false
* @param[in] rhs A reference to the %PairIteratorT instance on the right-hand side of the operator
*/
- bool operator!=(const PairIteratorT< K, V >& rhs) const
+ bool operator !=(const PairIteratorT< K, V >& rhs) const
{
- return !operator==(rhs);
+ return !operator ==(rhs);
}
/**
int __index;
std::unique_ptr< IMapEnumerator > __pEnum;
std::pair< K, V > __currentObj;
-}; // PairIteratorT
+}; // PairIteratorT
}}} // Tizen::Base::Collection