Tizen 2.4.0 rev3 SDK Public Release
[framework/graphics/dali.git] / dali / public-api / common / dali-vector.h
index cbdb4a3..c253193 100644 (file)
@@ -54,7 +54,7 @@ namespace Dali
  * @brief Base class to handle the memory of simple vector.
  *
  * Memory layout is such that it has two std::size_t to hold the count
- * and capacity of the vector. mData is adjusted so that it points to the
+ * and capacity of the vector. VectorBase::mData is adjusted so that it points to the
  * beginning of the first real item so that iterating the items is quick.
  * @since_tizen 2.4
  */
@@ -62,7 +62,7 @@ class DALI_IMPORT_API VectorBase
 {
 public: // Typedefs
 
-  typedef std::size_t SizeType;
+  typedef std::size_t SizeType; ///< Size type @since_tizen 2.4
 
 protected: // Construction
 
@@ -85,7 +85,7 @@ protected: // Construction
 public: // API
 
   /**
-   * @brief This method is inlined as its needed frequently for End() iterator.
+   * @brief This method is inlined as its needed frequently for Vector::End() iterator.
    *
    * @since_tizen 2.4
    * @return The count of elements in this vector.
@@ -132,7 +132,7 @@ protected: // for Derived classes
    * @brief Helper to set the count.
    *
    * @since_tizen 2.4
-   * @param count Number of elements in the vector.
+   * @param[in] count Number of elements in the vector.
    */
   void SetCount( SizeType count );
 
@@ -140,8 +140,8 @@ protected: // for Derived classes
    * @brief Reserve space in the vector.
    *
    * @since_tizen 2.4
-   * @param count of elements to reserve.
-   * @param elementSize of a single element.
+   * @param[in] count Count of elements to reserve.
+   * @param[in] elementSize Size of a single element.
    */
   void Reserve( SizeType count, SizeType elementSize );
 
@@ -149,8 +149,8 @@ protected: // for Derived classes
    * @brief Copy a vector.
    *
    * @since_tizen 2.4
-   * @param vector Vector to copy from.
-   * @param elementSize of a single element.
+   * @param[in] vector Vector to copy from.
+   * @param[in] elementSize Size of a single element.
    */
   void Copy( const VectorBase& vector, SizeType elementSize );
 
@@ -158,7 +158,7 @@ protected: // for Derived classes
    * @brief Swap the contents of two vectors.
    *
    * @since_tizen 2.4
-   * @param vector Vector to swap with.
+   * @param[in] vector Vector to swap with.
    */
   void Swap( VectorBase& vector );
 
@@ -167,9 +167,9 @@ protected: // for Derived classes
    *
    * Does not change capacity.
    * @since_tizen 2.4
-   * @param address to erase from.
-   * @param elementSize to erase.
-   * @pre last element cannot be erased as there is nothing to move.
+   * @param[in] address Adress to erase from.
+   * @param[in] elementSize Size to erase.
+   * @pre Last element cannot be erased as there is nothing to move.
    */
   void Erase( char* address, SizeType elementSize );
 
@@ -181,7 +181,7 @@ protected: // for Derived classes
    * @param[in] first Address to the first element to be erased.
    * @param[in] last Address to the last element to be erased.
    * @param[in] elementSize Size of one of the elements to be erased.
-   * @return address pointing to the next element of the last one.
+   * @return Address pointing to the next element of the last one.
    */
   char* Erase( char* first, char* last, SizeType elementSize );
 
@@ -200,8 +200,8 @@ protected: // for Derived classes
 private:
 
   // not copiable as it does not know the size of elements
-  VectorBase( const VectorBase& ); ///< Undefined
-  VectorBase& operator=( const VectorBase& ); ///< Undefined
+  VectorBase( const VectorBase& ); ///< Undefined @since_tizen 2.4
+  VectorBase& operator=( const VectorBase& ); ///< Undefined @since_tizen 2.4
 
 protected: // Data
 
@@ -220,7 +220,7 @@ class VectorAlgorithms : public VectorBase
 {
 protected: // API for deriving classes
 
-  typedef VectorBase::SizeType SizeType;
+  typedef VectorBase::SizeType SizeType; ///< Size type @since_tizen 2.4
 
   /**
    * @brief Empty constructor.
@@ -240,8 +240,8 @@ protected: // API for deriving classes
    * @brief Copy vector contents.
    *
    * @since_tizen 2.4
-   * @param rhs to copy from.
-   * @param elementSize of the content.
+   * @param[in] rhs VectorBase object to copy from.
+   * @param[in] elementSize Size of the content.
    */
   void Copy( const VectorBase& rhs, SizeType elementSize )
   {
@@ -259,8 +259,8 @@ protected: // API for deriving classes
    * @brief Reserve space in the vector.
    *
    * @since_tizen 2.4
-   * @param count of elements to reserve.
-   * @param elementSize of a single element.
+   * @param[in] count Count of elements to reserve.
+   * @param[in] elementSize Size of a single element.
    */
   void Reserve( SizeType count, SizeType elementSize )
   {
@@ -271,8 +271,8 @@ protected: // API for deriving classes
    * @brief Resize the vector. Does not change capacity.
    *
    * @since_tizen 2.4
-   * @param count to resize to.
-   * @param elementSize of a single element.
+   * @param[in] count Count to resize to.
+   * @param[in] elementSize Size of a single element.
    */
   void Resize( SizeType count, SizeType elementSize )
   {
@@ -307,8 +307,8 @@ protected: // API for deriving classes
    * @brief Erase an element. Does not change capacity.
    *
    * @since_tizen 2.4
-   * @param address to erase from.
-   * @param elementSize to erase.
+   * @param[in] address Address to erase from.
+   * @param[in] elementSize Size to erase.
    */
   void Erase( char* address, SizeType elementSize )
   {
@@ -322,7 +322,7 @@ protected: // API for deriving classes
    * @param[in] first Address to the first element to be erased.
    * @param[in] last Address to the last element to be erased.
    * @param[in] elementSize Size of one of the elements to be erased.
-   * @return address pointing to the next element of the last one.
+   * @return Address pointing to the next element of the last one.
    */
   char* Erase( char* first, char* last, SizeType elementSize )
   {
@@ -390,7 +390,7 @@ private:
  * @brief Vector class with minimum space allocation when its empty.
  *
  * @since_tizen 2.4
- * @param type of the data that the vector holds.
+ * @param[in] type of the data that the vector holds.
  */
 template< class T, bool IsTrivialType = TypeTraits<T>::IS_TRIVIAL_TYPE == true >
 class Vector : public VectorAlgorithms< IsTrivialType >
@@ -401,10 +401,10 @@ public: // API
    * @brief Type definitions.
    * @since_tizen 2.4
    */
-  typedef VectorBase::SizeType SizeType;
-  typedef T* Iterator;  ///< Most simple Iterator is a pointer
-  typedef const T* ConstIterator;
-  typedef T  ItemType;
+  typedef VectorBase::SizeType SizeType; ///< Size type @since_tizen 2.4
+  typedef T* Iterator;  ///< Most simple Iterator is a pointer @since_tizen 2.4
+  typedef const T* ConstIterator; ///< Const iterator @since_tizen 2.4
+  typedef T  ItemType; ///< Item type @since_tizen 2.4
 
   enum
   {
@@ -431,7 +431,7 @@ public: // API
    * @brief Copy constructor.
    *
    * @since_tizen 2.4
-   * @param vector Vector to copy from.
+   * @param[in] vector Vector to copy from.
    */
   Vector( const Vector& vector )
   {
@@ -443,8 +443,8 @@ public: // API
    * @brief Assignment operator.
    *
    * @since_tizen 2.4
-   * @param  vector Vector to assign from.
-   * @return reference to self for chaining.
+   * @param[in]  vector Vector to assign from.
+   * @return Reference to self for chaining.
    */
   Vector& operator=( const Vector& vector )
   {
@@ -481,9 +481,9 @@ public: // API
   /**
    * @brief Subscript operator.
    * @since_tizen 2.4
-   * @param  index of the element.
-   * @return reference to the element for given index.
-   * @pre index must be in the vector's range.
+   * @param[in]  index Index of the element.
+   * @return Reference to the element for given index.
+   * @pre Index must be in the vector's range.
    */
   ItemType& operator[]( SizeType index )
   {
@@ -494,7 +494,7 @@ public: // API
   /**
    * @brief Subscript operator.
    * @since_tizen 2.4
-   * @param  index of the element.
+   * @param[in]  index of the element.
    * @return reference to the element for given index.
    * @pre index must be in the vector's range.
    */
@@ -515,7 +515,7 @@ public: // API
    * become invalid.
    *
    * @since_tizen 2.4
-   * @param[in] element to be added.
+   * @param[in] element Element to be added.
    */
   void PushBack( const ItemType& element )
   {
@@ -544,7 +544,7 @@ public: // API
    * @pre Iterator at must be in the vector's range ( Vector::Begin(), Vector::End() ).
    *
    * @param[in] at Iterator where to insert the elements into the vector.
-   * @param[in] element to be added.
+   * @param[in] element An element to be added.
    *@since_tizen 2.4
    */
   void Insert( Iterator at, const ItemType& element )
@@ -598,7 +598,7 @@ public: // API
    *
    * Reserving less than current Capacity is a no-op.
    * @since_tizen 2.4
-   * @param count of elements to reserve.
+   * @param[in] count Count of elements to reserve.
    */
   void Reserve( SizeType count )
   {
@@ -609,8 +609,8 @@ public: // API
    * @brief Resize the vector. Does not change capacity.
    *
    * @since_tizen 2.4
-   * @param count to resize to.
-   * @param item to insert to the new indices.
+   * @param[in] count Count to resize to.
+   * @param[in] item An item to insert to the new indices.
    */
   void Resize( SizeType count, ItemType item = ItemType() )
   {
@@ -638,7 +638,7 @@ public: // API
    * Does not change capacity. Other elements get moved.
    *
    * @since_tizen 2.4
-   * @param iterator Iterator pointing to item to remove.
+   * @param[in] iterator Iterator pointing to item to remove.
    * @return Iterator pointing to next element.
    * @pre Iterator \e iterator must be within the vector's range ( Vector::Begin(), Vector::End() - 1 ).
    *
@@ -705,7 +705,7 @@ public: // API
    * this in case order does not matter. Does not change capacity.
    *
    * @since_tizen 2.4
-   * @param iterator Iterator pointing to item to remove.
+   * @param[in] iterator Iterator pointing to item to remove.
    * @pre Iterator \e iterator must be in the vector's range ( Vector::Begin(), Vector::End() - 1 ).
    *
    */
@@ -725,7 +725,7 @@ public: // API
    * @brief Swap the contents of two vectors.
    *
    * @since_tizen 2.4
-   * @param vector Vector to swap with.
+   * @param[in] vector Vector to swap with.
    */
   void Swap( Vector& vector )
   {