Add to retry to read DUID.
[platform/framework/native/appfw.git] / inc / FBaseColIteratorT.h
index 7e38af6..67ad607 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef _FBASE_COL_ITERATOR_T_H_
 #define _FBASE_COL_ITERATOR_T_H_
 
-#include <algorithm>   // std::swap (Before C++11)
+#include <algorithm>    // std::swap (Before C++11)
 #include <iterator>
 #include <unique_ptr.h>
 #include <FBaseLog.h>
@@ -47,7 +47,7 @@ namespace Tizen { namespace Base { namespace Collection
  * StlConverter provides static methods to get this iterator from IList.
  */
 
-template < typename T >
+template< typename T >
 class IteratorT
        : public std::iterator< std::input_iterator_tag, T >
 {
@@ -122,7 +122,7 @@ public:
         * @return              A reference to the %IteratorT instance
         * @param[in]   rhs     A reference to the %IteratorT instance on the right-hand side of the operator
         */
-       IteratorT< T >& operator=(const IteratorT< T >& rhs)
+       IteratorT< T >& operator =(const IteratorT< T >& rhs)
        {
                IteratorT< T > tmp(rhs);
                tmp.swap(*this);
@@ -136,7 +136,7 @@ public:
         *
         * @return              A T type reference
         */
-       T& operator*(void) const
+       T& operator *(void) const
        {
                AppAssertf(!__isPostEnd && __index >= 0, "It is out of range.");
                return const_cast< T& >(__currentObj);
@@ -149,9 +149,9 @@ public:
         *
         * @return              A T type pointer that is equivalent to the pointer address
         */
-       T* operator->(void) const
+       T* operator ->(void) const
        {
-               return &(operator*());
+               return &(operator *());
        }
 
        /**
@@ -166,7 +166,7 @@ public:
         *                                                                      the collection is modified after the enumerator is created.
         * @remarks             The specific error code can be accessed using GetLastResult() method.
         */
-       IteratorT< T >& operator++(void)
+       IteratorT< T >& operator ++(void)
        {
                const int PRE_BEGIN_IDX = -1;
                TryCatchResult(__index >= PRE_BEGIN_IDX, , E_OUT_OF_RANGE, "[%s] It is out of range.", GetErrorMessage(E_OUT_OF_RANGE));
@@ -174,12 +174,13 @@ public:
                if (__index != PRE_BEGIN_IDX)
                {
                        result r = __pEnum->MoveNext();
-                       TryCatchResult(r == E_SUCCESS, __isPostEnd = true; __currentObj = null, r, "[%s] It already reached the end.", GetErrorMessage(r));
+                       TryCatchResult(r == E_SUCCESS, __isPostEnd = true;
+                       __currentObj = null, r, "[%s] It already reached the end.", GetErrorMessage(r));
                }
 
                __currentObj = static_cast< T >(__pEnum->GetCurrent());
 
-       CATCH:
+CATCH:
                ++__index;
                return *this;
        }
@@ -196,10 +197,10 @@ public:
         *                                                                      the collection is modified after the enumerator is created.
         * @remarks             The specific error code can be accessed using GetLastResult() method.
         */
-       IteratorT< T > operator++(int)
+       IteratorT< T > operator ++(int)
        {
                IteratorT< T > tempIter = *this;
-               operator++();
+               operator ++();
                return tempIter;
        }
 
@@ -215,7 +216,7 @@ public:
         *                                                                      the collection is modified after the enumerator is created.
         * @remarks             The specific error code can be accessed using GetLastResult() method.
         */
-       IteratorT< T >& operator--(void)
+       IteratorT< T >& operator --(void)
        {
                TryCatchResult(__index <= __pList->GetCount(), , E_OUT_OF_RANGE, "[%s] It is out of range.", GetErrorMessage(E_OUT_OF_RANGE));
 
@@ -248,10 +249,10 @@ CATCH:
         *                                                                      the collection is modified after the enumerator is created.
         * @remarks             The specific error code can be accessed using GetLastResult() method.
         */
-       IteratorT< T > operator--(int)
+       IteratorT< T > operator --(int)
        {
                IteratorT< T > tempIter = *this;
-               operator--();
+               operator --();
                return tempIter;
        }
 
@@ -264,7 +265,7 @@ CATCH:
         *                              else @c false
         *      @param[in]      rhs     A reference to the %IteratorT instance on the right-hand side of the operator
         */
-       bool operator==(const IteratorT< T >& rhs) const
+       bool operator ==(const IteratorT< T >& rhs) const
        {
                if (__pList != rhs.__pList)
                {
@@ -299,9 +300,9 @@ CATCH:
         *                              else @c false
         *      @param[in]      rhs     A reference to the %IteratorT instance on the right-hand side of the operator
         */
-       bool operator!=(const IteratorT< T >& rhs) const
+       bool operator !=(const IteratorT< T >& rhs) const
        {
-               return !operator==(rhs);
+               return !operator ==(rhs);
        }
 
        /**