Applied reviewed header(DateTime to Uuid)
[platform/framework/native/appfw.git] / inc / FBaseColIteratorT.h
index 9a0e3aa..67ad607 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_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>
@@ -36,16 +35,19 @@ namespace Tizen { namespace Base { namespace Collection
 {
 /**
  * @class      IteratorT
- * @brief      This class provides an iterator that is used to convert IList to STL containers.
- *                     StlConverter provides static methods to get this iterator from IList.
+ * @brief      This class provides an iterator that is used to convert %IList to STL containers. @n
+ *                     %StlConverter provides static methods to get this iterator from %IList.
  *
  * @since      2.1
  *
- * @remarks    The %IteratorT class satisfies only requirements of C++ standard library InputIterator concept due to limitations of %Tizen Collection.
+ * @remarks    The %IteratorT 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 %IteratorT class provides an iterator that is used to convert IList to STL containers.
+ * 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 >
 {
@@ -120,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);
@@ -134,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);
@@ -147,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 *());
        }
 
        /**
@@ -164,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));
@@ -172,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;
        }
@@ -194,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;
        }
 
@@ -213,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));
 
@@ -246,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;
        }
 
@@ -262,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)
                {
@@ -297,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);
        }
 
        /**