Enable build with iniparser v 3.1
[platform/framework/native/appfw.git] / inc / FBaseColStlConverter.h
index 5b65d1f..ccb5328 100644 (file)
@@ -84,6 +84,12 @@ class IMultiMap;
  *             // call SomeNativeAPI(pList2.get());
  *     }
  *     @endcode
+ *     @remarks        Before %Tizen 3.0, iterators managed by %StlConverter only met the requirements of the STL InputIterator concept
+ *                             due to the limitation of the uderlying %Tizen collection. But from %Tizen 3.0, these iterators support further STL iterator concept like below.
+ *                             Both IteratorT and RandomIteratorT support STL OutputIterator concept which can be dereferenced as an lvalue. It's the mutable iterator.
+ *                             - PairIteratorT supports STL constant ForwardIterator.
+ *                             - IteratorT supports STL mutable BidirectionalIterator.
+ *                             - RandomIteratorT supports STL mutable RandomAccessIterator.
  */
 
 class StlConverter
@@ -92,6 +98,8 @@ public:
        /**
         * Gets the STL compatible iterator referring to the first element in the IList instance.
         *
+        * @brief       <i> [Deprecated] </i>
+        * @deprecated  This method is deprecated to support mutation algorithm requiring non-const pointer.
         * @since               2.1
         *
         * @return              An IteratorT instance
@@ -100,12 +108,29 @@ public:
        template< typename T >
        static IteratorT< T > GetBeginIterator(const IList* pList)
        {
+               return GetBeginIterator< T >(const_cast< IList* >(pList));
+       }
+
+       /**
+        * Gets the STL compatible iterator referring to the first element in the IList instance.
+        *
+        * @since               3.0
+        *
+        * @return              An IteratorT instance
+        * @param[in]   pList                   A pointer to the IList instance to convert
+        * @remarks             This method does not take the ownership of the @c pList because the argument is a non-const pointer.
+        */
+       template< typename T >
+       static IteratorT< T > GetBeginIterator(IList* pList)
+       {
                return IteratorT< T >(*pList);
        }
 
        /**
         * Gets the STL compatible iterator referring to the post-end element in the IList instance.
         *
+        * @brief       <i> [Deprecated] </i>
+        * @deprecated  This method is deprecated to support mutation algorithm requiring non-const pointer.
         * @since               2.1
         *
         * @return              An IteratorT instance
@@ -114,12 +139,29 @@ public:
        template< typename T >
        static IteratorT< T > GetEndIterator(const IList* pList)
        {
+               return GetEndIterator< T >(const_cast< IList* >(pList));
+       }
+
+       /**
+        * Gets the STL compatible iterator referring to the post-end element in the IList instance.
+        *
+        * @since               3.0
+        *
+        * @return              An IteratorT instance
+        * @param[in]   pList                   A pointer to the IList instance to convert
+        * @remarks             This method does not take the ownership of the @c pList because the argument is a non-const pointer.
+        */
+       template< typename T >
+       static IteratorT< T > GetEndIterator(IList* pList)
+       {
                return IteratorT< T >(*pList, true);
        }
 
        /**
         * Gets the STL compatible random iterator referring to the first element in the IList instance.
         *
+        * @brief       <i> [Deprecated] </i>
+        * @deprecated  This method is deprecated to support mutation algorithm requiring non-const pointer.
         * @since               2.1
         *
         * @return              A RandomIteratorT instance
@@ -128,12 +170,29 @@ public:
        template< typename T >
        static RandomIteratorT< T > GetBeginRandomIterator(const IList* pList)
        {
+               return GetBeginRandomIterator< T >(const_cast< IList* >(pList));
+       }
+
+       /**
+        * Gets the STL compatible random iterator referring to the first element in the IList instance.
+        *
+        * @since               3.0
+        *
+        * @return              A RandomIteratorT instance
+        * @param[in]   pList                   A pointer to the IList instance to convert
+        * @remarks             This method does not take the ownership of the @c pList because the argument is a non-const pointer.
+        */
+       template< typename T >
+       static RandomIteratorT< T > GetBeginRandomIterator(IList* pList)
+       {
                return RandomIteratorT< T >(*pList, 0);
        }
 
        /**
         * Gets the STL compatible random iterator referring to the post-end element in the IList instance.
         *
+        * @brief       <i> [Deprecated] </i>
+        * @deprecated  This method is deprecated to support mutation algorithm requiring non-const pointer.
         * @since               2.1
         *
         * @return              A RandomIteratorT instance
@@ -142,6 +201,21 @@ public:
        template< typename T >
        static RandomIteratorT< T > GetEndRandomIterator(const IList* pList)
        {
+               return GetEndRandomIterator< T >(const_cast< IList* >(pList));
+       }
+
+       /**
+        * Gets the STL compatible random iterator referring to the post-end element in the IList instance.
+        *
+        * @since               3.0
+        *
+        * @return              A RandomIteratorT instance
+        * @param[in]   pList                   A pointer to the IList instance to convert
+        * @remarks             This method does not take the ownership of the @c pList because the argument is a non-const pointer.
+        */
+       template< typename T >
+       static RandomIteratorT< T > GetEndRandomIterator(IList* pList)
+       {
                return RandomIteratorT< T >(*pList, pList->GetCount());
        }