Implementation of ImmutableString
[platform/framework/native/appfw.git] / inc / FBaseColStlConverter.h
index e6c282d..a0d979a 100644 (file)
@@ -92,56 +92,124 @@ 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
         * @param[in]   pList                   A pointer to the IList instance to convert
         */
-       template < typename T >
+       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
         * @param[in]   pList                   A pointer to the IList instance to convert
         */
-       template < typename T >
+       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
         * @param[in]   pList                   A pointer to the IList instance to convert
         */
-       template < typename T >
+       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
         * @param[in]   pList                   A pointer to the IList instance to convert
         */
-       template < typename T >
+       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());
        }
 
@@ -154,7 +222,7 @@ public:
         * @return              A PairIteratorT instance
         * @param[in]   pMap            A pointer to the IMap instance to convert
         */
-       template < typename K, typename V >
+       template< typename K, typename V >
        static PairIteratorT< K, V > GetBeginPairIterator(const IMap* pMap)
        {
                return PairIteratorT< K, V >(*pMap);
@@ -169,7 +237,7 @@ public:
         * @return              A PairIteratorT instance
         * @param[in]   pMap            A pointer to the IMap instance to convert
         */
-       template < typename K, typename V >
+       template< typename K, typename V >
        static PairIteratorT< K, V > GetEndPairIterator(const IMap* pMap)
        {
                return PairIteratorT< K, V >(*pMap, true);
@@ -184,7 +252,7 @@ public:
         * @return              A PairIteratorT instance
         * @param[in]   pMultiMap       A pointer to the IMultiMap instance to convert
         */
-       template < typename K, typename V >
+       template< typename K, typename V >
        static PairIteratorT< K, V > GetBeginPairIterator(const IMultiMap* pMultiMap)
        {
                return PairIteratorT< K, V >(*pMultiMap);
@@ -199,7 +267,7 @@ public:
         * @return              A PairIteratorT instance
         * @param[in]   pMultiMap       A pointer to the IMultiMap instance to convert
         */
-       template < typename K, typename V >
+       template< typename K, typename V >
        static PairIteratorT< K, V > GetEndPairIterator(const IMultiMap* pMultiMap)
        {
                return PairIteratorT< K, V >(*pMultiMap, true);
@@ -227,7 +295,7 @@ public:
         * @see                 SingleObjectDeleter()
         * @see                 ArrayDeleter()
         */
-       template < typename FwdIter >
+       template< typename FwdIter >
        static std::unique_ptr< ArrayList > GetArrayListN(FwdIter begin, FwdIter end, DeleterFunctionType deleter = NoOpDeleter)
        {
                std::unique_ptr< ArrayList > pArrayList(new (std::nothrow) ArrayList(deleter));
@@ -271,7 +339,7 @@ public:
         * @see                 SingleObjectDeleter()
         * @see                 ArrayDeleter()
         */
-       template < typename FwdIter >
+       template< typename FwdIter >
        static std::unique_ptr< LinkedList > GetLinkedListN(FwdIter begin, FwdIter end, DeleterFunctionType deleter = NoOpDeleter)
        {
                std::unique_ptr< LinkedList > pLinkedList(new (std::nothrow) LinkedList(deleter));
@@ -312,7 +380,7 @@ public:
         * @see                 SingleObjectDeleter()
         * @see                 ArrayDeleter()
         */
-       template < typename PairedFwdIter >
+       template< typename PairedFwdIter >
        static std::unique_ptr< HashMap > GetHashMapN(PairedFwdIter begin, PairedFwdIter end, DeleterFunctionType deleter = NoOpDeleter)
        {
                std::unique_ptr< HashMap > pMap(new (std::nothrow) HashMap(deleter));
@@ -356,7 +424,7 @@ public:
         * @see                 SingleObjectDeleter()
         * @see                 ArrayDeleter()
         */
-       template < typename PairedFwdIter >
+       template< typename PairedFwdIter >
        static std::unique_ptr< MultiHashMap > GetMultiHashMapN(PairedFwdIter begin, PairedFwdIter end, DeleterFunctionType deleter = NoOpDeleter)
        {
                std::unique_ptr< MultiHashMap > pMultiMap(new (std::nothrow) MultiHashMap(deleter));
@@ -410,7 +478,7 @@ private:
        // @return              A reference to the %StlConverter instance
        // @param[in]   rhs             A reference to the %StlConverter instance
        //
-       StlConverter& operator=(const StlConverter& rhs);
+       StlConverter& operator =(const StlConverter& rhs);
 };
 
 }}} // Tizen::Base::Collection