Change API for locale
[platform/framework/native/appfw.git] / inc / FBaseColPairIteratorT.h
index 72a298d..037fa3e 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -25,7 +24,7 @@
 #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>
@@ -38,16 +37,19 @@ namespace Tizen { namespace Base { namespace Collection
 {
 /**
  * @class      PairIteratorT
- * @brief      This class provides an iterator that is used to convert IMap or IMultiMap to STL containers.
- *                     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
  *
  * @remarks    The %PairIteratorT class satisfies only requirements of C++ standard library InputIterator concept due to limitations of %Tizen Collection.
  *                     So, this class can be used with C++ standard library algorithms which requires only InputIterator concept for their arguments.
+ *
+ * The %PairIteratorT class provides an iterator that is used to convert IMap or IMultiMap to STL containers.
+ * 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 > >
 {
@@ -176,7 +178,7 @@ public:
         *                                                                      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);
@@ -190,7 +192,7 @@ public:
         *
         * @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);
@@ -203,9 +205,9 @@ public:
         *
         * @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 *());
        }
 
        /**
@@ -220,12 +222,14 @@ public:
         *                                                                      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());
@@ -248,10 +252,10 @@ CATCH:
         *                                                                      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;
        }
 
@@ -264,7 +268,7 @@ CATCH:
         *                              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)
                {
@@ -304,9 +308,9 @@ CATCH:
         *                              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);
        }
 
        /**
@@ -333,7 +337,7 @@ private:
        int __index;
        std::unique_ptr< IMapEnumerator > __pEnum;
        std::pair< K, V > __currentObj;
-};     // PairIteratorT
+};  // PairIteratorT
 
 }}} // Tizen::Base::Collection