[2.2.1] Apply reviewed header file (Base to Collection)
[platform/framework/native/appfw.git] / inc / FBaseBuffer.h
index a3476c8..f5eb717 100644 (file)
@@ -18,7 +18,7 @@
  * @file               FBaseBuffer.h
  * @brief              This is the header file for the %Buffer class.
  *
- * This header file contains the declarations of the %Buffer classes.
+ * This header file contains the declarations of the %Buffer class.
  */
 #ifndef _FBASE_BUFFER_H_
 #define _FBASE_BUFFER_H_
@@ -42,7 +42,7 @@ class ByteBuffer;
  *
  * The %Buffer class represents a linear finite sequence of elements of the same type.
  * It is a means of defining an aggregation of the same type of objects, similar to an array.
- * @n
+ *
  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/base/buffer.htm">Buffer</a>.
  *
  * @see                Tizen::Base::BufferBase
@@ -120,12 +120,10 @@ class _OSP_EXPORT_ Buffer
 
 public:
        /**
-        * This is the default constructor for this class.
-        *
-        * @since 2.0
+        * This is the default constructor for this class. @n
+        * After creating an instance of the %Buffer class, one of the Construct() methods must be called explicitly to initialize this instance.
         *
-        * @remarks             After creating an instance of the %Buffer class, one of the Construct() methods must be called explicitly to initialize this instance.
-        * @see                         Construct()
+        * @since               2.0
         */
        Buffer(void)
        {
@@ -152,8 +150,9 @@ public:
         *
         * @param[in]   buffer                  The other %Buffer instance
         * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_INVALID_ARG   The specified input parameter is invalid, or
-        *                                                              the source buffer is not constructed.
+        * @exception   E_INVALID_ARG   Either of the following conditions has occured:
+        *                                                              - The specified input parameter is invalid.
+        *                                                              - The source buffer has not been constructed.
         * @see                 Buffer()
         */
        result Construct(const Buffer< Type >& buffer)
@@ -194,15 +193,18 @@ public:
        * @since 2.0
        *
        * @return                       An error code
-       * @param[in]            pBuffer                         The buffer which is shared
+       * @param[in]            pBuffer                         The shared buffer
        * @param[in]            index                           The starting index of the buffer from where the first @c byte value is read
-       * @param[in]            length                          The number of bytes to read from the given buffer @n This is a limit of this instance.
+       * @param[in]            length                          The number of bytes to read from the given buffer @n 
+       *                                                                               This is the limit of this instance.
        * @param[in]            capacity                        The capacity of this instance
        * @exception       E_SUCCESS                    The method is successful.
-       * @exception       E_INVALID_ARG                A specified input parameter is invalid, or
-       *                                                                               the @c pBuffer is @c null.
-       * @exception       E_OUT_OF_RANGE               The specified @c index is outside the bounds of the data structure, or
-       *                                                                               the @c index is larger than the @c length.
+       * @exception       E_INVALID_ARG                Either of the following conditions has occured:
+       *                                                                               - A specified input parameter is invalid.
+       *                                                                               - The specified @c pBuffer is @c null.
+       * @exception       E_OUT_OF_RANGE               Either of the following conditions has occured:
+       *                                                                               - The specified @c index is outside the bounds of the data structure.
+       *                                                                               - The specified @c index is larger than the specified @c length.
        */
        result Construct(const Type* pBuffer, int index, int length, int capacity)
        {
@@ -236,13 +238,13 @@ public:
        }
 
        /**
-        * This subscript operator returns the reference to the element indicated by the given @c index.
+        * Returns a reference to the element indicated by the given @c index.
         *
         * @since 2.0
         *
         * @return              A reference to the indexed element
         * @param[in]   index   The index of the element @n
-        *                              It must be less than the limit.
+        *                                              It must be less than the limit.
         */
        Type& operator [](int index) const
        {
@@ -253,15 +255,15 @@ public:
        }
 
        /**
-        * Overloaded equality operator to compare two %Buffer instances.
+        * Checks whether two %Buffer instances are equal.
         *
         * @since 2.0
         *
-        * @return              @c true if the buffers being compared are equal, @n
+        * @return              @c true if the two %Buffer instances are equal, @n
         *                              else @c false
-        * @param[in]   buffer The buffer to compare with the current instance of %Buffer
-        * @remarks     This method returns @c true only if the two buffers have the same number of remaining elements @n
-        *                              and the two sequences of remaining elements are equal (considered independently of their starting positions).
+        * @param[in]   buffer          The buffer to compare with the current instance of %Buffer
+        * @remarks             This method returns @c true only if the two buffers have the same number of remaining elements @n
+        *                              and the sequences of the remaining elements are equal (considered independent of their starting positions).
         * @see                 Equals()
         */
        bool operator ==(const Buffer< Type >& buffer) const
@@ -289,16 +291,16 @@ public:
        }
 
        /**
-        * Checks whether the two %Buffer instances are not equal.
+        * Checks whether two %Buffer instances are not equal.
         *
         * @since 2.0
         *
-        * @return              @c true if the buffers are not equal, @n
+        * @return              @c true if the two %Buffer instances are not equal, @n
         *                              else @c false
-        * @param[in]   buffer The buffer to compare with the current instance of %Buffer
-        * @remarks     This method returns @c false only if the two buffers being compared have the same @n
-        *                              number of remaining elements and the two sequences of remaining elements are equal @n
-        *                              (considered independently of their starting positions).
+        * @param[in]   buffer          The buffer to compare with the current instance of %Buffer
+        * @remarks             This method returns @c false only if the two buffers have the same @n
+        *                              number of remaining elements and the sequences of the remaining elements are equal @n
+        *                              (considered independent of their starting positions).
         * @see                 Equals()
         */
        bool operator !=(const Buffer< Type >& buffer) const
@@ -309,29 +311,30 @@ public:
        /**
         * Copies the remaining elements of the input %Buffer instance into the current
         * %Buffer instance. @n
-        * It returns E_OVERFLOW if the remaining part of the current instance is smaller
+        * It returns @c E_OVERFLOW if the remaining part of the current instance is smaller
         * than the remaining part of the input instance.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   buffer  The source buffer from which bytes are read @n
-        *                                              It must not be the current instance of %Buffer.
+        * @param[in]   buffer                  The source buffer from which bytes are read @n
+        *                                                              It must not be the current instance of %Buffer.
         * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_INVALID_ARG   The specified input parameter is invalid, or
-        *                                                              the source buffer is same as destination buffer,
+        * @exception   E_INVALID_ARG   Either of the following conditions has occured:
+        *                                                              - The specified input parameter is invalid.
+        *                                                              - The source buffer is same as destination buffer,
         *                                                              that is, the current instance of %Buffer.
-        * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow. @n
-        *                                                              The number of remaining bytes of the current buffer is less than
-        *                                                              the number of remaining bytes of the given buffer.
+        * @exception   E_OVERFLOW              Either of the following conditions has occured:
+        *                                                              - The operation (arithmetic/casting/conversion) has caused an overflow.
+        *                                                              - The number of remaining bytes in the current buffer is less than
+        *                                                              the number of remaining bytes in the given buffer.
         * @remarks     After the copy operation, the current (destination) buffer's position and the given
         *                              (source) buffer's position are incremented by the number of elements copied (the number
         *                              of remaining elements of the given buffer). @n
         *                              If the remaining part of the current instance is not less than the remaining part of the input instance,
-        *                              the effect of this method and the ReadFrom() method is the same. But when the remaining part of the
-        *                              current instance is less, ReadFrom() method copies the number of remaining elements of the current
-        *                              instance while this method returns E_OVERFLOW and does not transfer.
-        * @see                 ReadFrom()
+        *                              the effect of this method and the ReadFrom() method is the same. @n
+        *                              But when the remaining part of the current instance is less, the ReadFrom() method copies the number of remaining 
+        *                              elements of the current instance while this method returns @c E_OVERFLOW and does not transfer.
         *
         * The following example demonstrates how to use the %CopyFrom() method.
         *
@@ -399,16 +402,17 @@ public:
        }
 
        /**
-        * Reads the value from the current position in the buffer, and then increments the position. @n
-        * Provides a way for relative indexing and reading.
+        * Reads the value of the current position in the buffer, and then increments the position. @n
+        * Provides a way to perform relative indexing and reading.
         *
         * @since 2.0
         *
         * @return                      An error code
-        * @param[out]          value The value at the current position
+        * @param[out]          value                   The value at the current position
         * @exception           E_SUCCESS               The method is successful.
-        * @exception           E_UNDERFLOW             The operation (arithmetic/casting/conversion) has caused an underflow. @n
-        *                                                                      The current position is greater than the limit.
+        * @exception           E_UNDERFLOW             Either of the following conditions has occured:
+        *                                                                      - The operation (arithmetic/casting/conversion) has caused an underflow.
+        *                                                                      - The current position is greater than the limit.
         * @see                         Set()
         */
        result Get(Type& value)
@@ -421,16 +425,18 @@ public:
 
        /**
         * Reads the value at the given @c index. @n
-        * Provides a way for absolute indexing and reading.
+        * Provides a way to preform absolute indexing and reading.
         *
         * @since 2.0
         *
         * @return                      An error code
-        * @param[in]           index The index into the buffer from where the value is read
-        * @param[out]          value The value at the given index
-        * @exception           E_SUCCESS                       The method is successful.
-        * @exception           E_OUT_OF_RANGE          The specified @c index is outside the bounds of the data structure. @n
-        *                                                                              The @c index is greater than the limit or less than @c 0.
+        * @param[in]           index                   The buffer index from where the value is read
+        * @param[out]          value                   The value at the given index
+        * @exception           E_SUCCESS               The method is successful.
+        * @exception           E_OUT_OF_RANGE  Either of the following conditions has occured:
+        *                                                                      - The specified @c index is outside the bounds of the data structure.
+        *                                                                      - The specified @c index is greater than the limit.
+        *                                                                      - The specified @c index is less than @c 0.
         * @see                         Set()
         */
        result Get(int index, Type& value) const
@@ -445,22 +451,25 @@ public:
 
 
        /**
-        * Copies the specified range of values from the calling buffer to the specified destination array as per the given @c index of the array.
+        * Copies the specified range of values from the calling buffer to the specified @c index of the destination array.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[out]  pArray  A pointer to the array into which values are written
-        * @param[in]   index   The starting index in the array of the first value to write
-        * @param[in]   length  The number of values from the buffer to write to the array
+        * @param[out]  pArray                          A pointer to the array into which the values are written
+        * @param[in]   index                           The starting index in the array where the first value is written
+        * @param[in]   length                          The number of values to write from the buffer to the array
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_ARG           A specified input parameter is invalid, or
-        *                                                                      the @c pArray is @c null.
-        * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
-        *                                                                      the @c index or length is less than @c 0.
-        * @exception   E_UNDERFLOW                     The operation (arithmetic/casting/conversion) has caused an underflow. @n
-        *                                                                      The remaining elements of this buffer are smaller than @c length.
-        * @remarks     After the copy operation, the position is incremented by @c length.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occured:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The specified @c pArray is @c null.
+        * @exception   E_OUT_OF_RANGE          Either of the following conditions has occured:
+        *                                                                      - The specified @c index is outside the bounds of the data structure.
+        *                                                                      - The specified @c index or @c length is less than @c 0.
+        * @exception   E_UNDERFLOW                     Either of the following conditions has occured:
+        *                                                                      - The operation (arithmetic/casting/conversion) has caused an underflow.
+        *                                                                      - The remaining elements of this buffer are smaller than the specified @c length.
+        * @remarks             After the copy operation, the position is incremented by @c length.
         * @see                 SetArray()
         */
        result GetArray(Type* pArray, int index, int length)
@@ -478,26 +487,27 @@ public:
 
        /**
         * Transfers bytes from the input buffer into the calling buffer. @n
-        * If the empty space in the calling buffer is larger than the remaining values from the input buffer,
-        * all the remaining elements from the input are copied to the destination. @n
+        * If the empty space in the calling buffer is larger than the remaining values of the input buffer,
+        * then all the remaining elements from the input are copied to the destination. @n
         * Otherwise, the number of bytes copied equals the number of elements remaining in the calling buffer.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   buffer  The source buffer from where the bytes are read @n
-        *                                              It must not be this buffer.
+        * @param[in]   buffer                  The source buffer from where the bytes are read @n
+        *                                                              It must not be this buffer.
         * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_INVALID_ARG   The specified input parameter is invalid. @n
-        *                                                              The given buffer is same as the current buffer instance.
+        * @exception   E_INVALID_ARG   Either of the following conditions has occured:
+        *                                                              - The specified input parameter is invalid.
+        *                                                              - The given buffer is same as the current buffer instance.
         * @remarks     After the copy operation, the current (destination) buffer's position and the given
-        *                              (source) buffer's position are  incremented by the number of elements copied (the smaller value
+        *                              (source) buffer's position are incremented by the number of elements copied (the smaller value
         *                              between the number of elements remaining in the calling buffer and the source buffer). @n
-        *                              If there are more elements remaining in the calling buffer than elements remaining in the input instance,
-        *                              this method is equivalent to CopyFrom() method. If there are less remaining elements in the
-        *                              calling buffer, the %CopyFrom() method returns @c E_OVERFLOW and does not transfer
-        *                              while this method copies the number of remaining elements of the current instance.
-        * @see                 CopyFrom()
+        *                              If there are more elements remaining in the calling buffer than the elements remaining in the input instance,
+        *                              then this method is equivalent to the CopyFrom() method. @n
+        *                              If there are less elements remaining in the calling buffer, then the %CopyFrom() method 
+        *                              returns @c E_OVERFLOW and does not transfer, while this method copies the number of remaining elements 
+        *                              of the current instance.
         *
         * The following example demonstrates how to use the %ReadFrom() method.
         *
@@ -575,15 +585,16 @@ public:
        /**
         * Writes the specified @c value into the current buffer instance at the current position,
         * and then increments the position. @n
-        * Provides a way for relative indexing and writing.
+        * Provides a way to perform relative indexing and writing.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   value           The value to write to the calling %Buffer
+        * @param[in]   value           The value to write into the calling %Buffer
         * @exception   E_SUCCESS               The method is successful.
-        * @exception   E_OVERFLOW              The operation (arithmetic/casting/conversion) has caused an overflow. @n
-        *                                                              The current position is not smaller than the limit.
+        * @exception   E_OVERFLOW              Either of the following conditions has occured:
+        *                                                              - The operation (arithmetic/casting/conversion) has caused an overflow.
+        *                                                              - The current position is not smaller than the limit.
         * @see                 Get()
         */
        result Set(Type value)
@@ -595,17 +606,19 @@ public:
        }
 
        /**
-        * Writes the specified @c value into the current instance of buffer at the given @c index. @n
-        * Provides a way for absolute indexing and writing.
+        * Writes the specified @c value into the current instance of the buffer at the given @c index. @n
+        * Provides a way to perform absolute indexing and writing.
         *
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   index   The index at which the value is written
-        * @param[in]   value   The value to write
+        * @param[in]   index                           The index at which the value is written
+        * @param[in]   value                           The value to write
         * @exception   E_SUCCESS           The method is successful.
-        * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
-        *                                                                      the @c index is not smaller than the limit or less than @c 0.
+        * @exception   E_OUT_OF_RANGE          Either of the following conditions has occured:
+        *                                                                      - The specified index is outside the bounds of the data structure.
+        *                                                                      - The specified @c index is not smaller than the limit.
+     *                                                                 - The specified @c index is less than @c 0.
         * @see                 Get()
         */
        result Set(int index, Type value)
@@ -624,19 +637,21 @@ public:
         * @since 2.0
         *
         * @return              An error code
-        * @param[in]   pArray          A pointer to the array from where the values are read
-        * @param[in]   index           The starting index of the array
-        * @param[in]   length          The number of values read from the given array
+        * @param[in]   pArray                          A pointer to the array from where the values are read
+        * @param[in]   index                           The starting index of the array
+        * @param[in]   length                          The number of values read from the given array
         * @exception   E_SUCCESS                       The method is successful.
-        * @exception   E_INVALID_ARG           A specified input parameter is invalid, or
-        *                                                                      the @c pArray is @c null.
-        * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure, or
-        *                                                                      the @c index or length is less than @c 0.
-        * @exception   E_OVERFLOW                      The operation (arithmetic/casting/conversion) has caused an overflow. @n
-        *                                                                      The remainder of this buffer is smaller than @c length.
-        * @remarks     This method copies @c length number of values from the source array,
-        *                              starting from the given @c index in the array, into the calling
-        *                              buffer, starting at the current position.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occured:
+        *                                                                      - A specified input parameter is invalid.
+        *                                                                      - The specified @c pArray is @c null.
+        * @exception   E_OUT_OF_RANGE          Either of the following conditions has occured:
+        *                                                                      - The specified @c index is outside the bounds of the data structure.
+        *                                                                      - The specified @c index or @c length is less than @c 0.
+        * @exception   E_OVERFLOW                      Either of the following conditions has occured:
+        *                                                                      - The operation (arithmetic/casting/conversion) has caused an overflow.
+        *                                                                      - The remainder of this buffer is smaller than the specified @c length.
+        * @remarks     This method copies @c length number of values starting from the given @c index of the source array,
+        *                              into the calling buffer, starting from the current position. @n
         *                              After the copy operation, the position is incremented by @c length.
         * @see                 GetArray()
         */
@@ -656,12 +671,12 @@ public:
        /**
         * Creates a new %Buffer instance. @n
         * Its content is a shared portion of
-        * the calling %Buffer instance that starts from the current position of calling %Buffer instance.
+        * the calling %Buffer instance that starts from the current position of the calling %Buffer instance.
         *
         * @since 2.0
         *
-        * @return              A pointer to the new buffer
-        * @remarks     The content of the new buffer starts at the current position of this instance of %Buffer.
+        * @return              A pointer to the new %Buffer instance
+        * @remarks     The content of the new buffer starts at the current position of this %Buffer instance. @n
         *                              The new buffer's position is @c 0, its capacity and limit is
         *                              the number of bytes remaining in the current instance of %Buffer,
         *                              and it is marked as undefined.
@@ -695,16 +710,16 @@ public:
        }
 
        /**
-        * Compares the Object instance with the calling %Buffer instance for equivalence.
+        * Compares the Object instance with the current %Buffer instance for equality.
         *
         * @since 2.0
         *
-        * @return              @c true if the input equals the calling %Buffer instance, @n
+        * @return              @c true if the input equals the current %Buffer instance, @n
         *                              else @c false
-        * @param[in]   obj     The object to compare with the calling %Buffer
-        * @remarks     This method returns @c true if and only if the specified object is also an instance of %Buffer class,
+        * @param[in]   obj     The object to compare with the current %Buffer instance
+        * @remarks             This method returns @c true if and only if the specified object is also an instance of %Buffer,
         *                              the two buffers have the same number of remaining elements, and the two sequences of
-        *                              remaining elements are equal (considered independently of their starting positions).
+        *                              remaining elements are equal (considered independent of their starting positions).
         * @see                 Tizen::Base::BufferBase::GetHashCode()
         */
        virtual bool Equals(const Tizen::Base::Object& obj) const
@@ -724,7 +739,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return         The hash value of the current instance
+        *      @return                 The hash value of the current instance
         *      @remarks                The hash code of a buffer depends only upon its remaining elements.
         */
        virtual int GetHashCode(void) const