* @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_1_0.0
*/
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_1_0.0
* @return The count of elements in this vector.
}
/**
+ * @brief Gets the count of elements in this vector.
* @SINCE_1_0.0
* @return The count of elements in this vector.
*/
/**
* @brief @ return If the vector is empty
* @SINCE_1_0.0
+ * @return true if the count of elements is empty
*/
bool Empty() const
{
}
/**
+ * @brief Gets the capacity of this vector.
* @SINCE_1_0.0
* @return The capacity of this vector.
*/
* @brief Helper to set the count.
*
* @SINCE_1_0.0
- * @param count Number of elements in the vector.
+ * @param[in] count Number of elements in the vector.
*/
void SetCount( SizeType count );
* @brief Reserve space in the vector.
*
* @SINCE_1_0.0
- * @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 );
* @brief Copy a vector.
*
* @SINCE_1_0.0
- * @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 );
* @brief Swap the contents of two vectors.
*
* @SINCE_1_0.0
- * @param vector Vector to swap with.
+ * @param[in] vector Vector to swap with.
*/
void Swap( VectorBase& vector );
*
* Does not change capacity.
* @SINCE_1_0.0
- * @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 );
* @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 );
* @brief Copy vector contents.
*
* @SINCE_1_0.0
- * @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 )
{
* @brief Reserve space in the vector.
*
* @SINCE_1_0.0
- * @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 )
{
* @brief Resize the vector. Does not change capacity.
*
* @SINCE_1_0.0
- * @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 )
{
* @brief Erase an element. Does not change capacity.
*
* @SINCE_1_0.0
- * @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 )
{
* @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 )
{
* @brief Type definitions.
* @SINCE_1_0.0
*/
- typedef VectorBase::SizeType SizeType;
+ typedef VectorBase::SizeType SizeType; ///< Size type @SINCE_1_0.0
typedef T* Iterator; ///< Most simple Iterator is a pointer @SINCE_1_0.0
- typedef const T* ConstIterator;
- typedef T ItemType;
+ typedef const T* ConstIterator; ///< Const iterator @SINCE_1_0.0
+ typedef T ItemType; ///< Item type @SINCE_1_0.0
enum
{
* @brief Copy constructor.
*
* @SINCE_1_0.0
- * @param vector Vector to copy from.
+ * @param[in] vector Vector to copy from.
*/
Vector( const Vector& vector )
{
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @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 )
{
}
/**
+ * @brief Iterator to the beginning of the data.
* @SINCE_1_0.0
* @return Iterator to the beginning of the data.
*/
}
/**
+ * @brief Iterator to the end of the data (one past last element).
* @SINCE_1_0.0
* @return Iterator to the end of the data (one past last element).
*/
}
/**
+ * @brief Subscript operator.
* @SINCE_1_0.0
- * @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 )
{
}
/**
+ * @brief Subscript operator.
* @SINCE_1_0.0
- * @param index of the element.
+ * @param[in] index Index of the element.
* @return reference to the element for given index.
* @pre index must be in the vector's range.
*/
* become invalid.
*
* @SINCE_1_0.0
- * @param[in] element to be added.
+ * @param[in] element Element to be added.
*/
void PushBack( const ItemType& element )
{
* @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_1_0.0
*/
void Insert( Iterator at, const ItemType& element )
*
* Reserving less than current Capacity is a no-op.
* @SINCE_1_0.0
- * @param count of elements to reserve.
+ * @param[in] count Count of elements to reserve.
*/
void Reserve( SizeType count )
{
* @brief Resize the vector. Does not change capacity.
*
* @SINCE_1_0.0
- * @param count to resize to.
+ * @param[in] count Count to resize to.
*/
void Resize( SizeType count )
{
* @brief Resize the vector. Does not change capacity.
*
* @SINCE_1_0.0
- * @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, const ItemType& item )
{
* Does not change capacity. Other elements get moved.
*
* @SINCE_1_0.0
- * @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 ).
*
* this in case order does not matter. Does not change capacity.
*
* @SINCE_1_0.0
- * @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 ).
*
*/
* @brief Swap the contents of two vectors.
*
* @SINCE_1_0.0
- * @param vector Vector to swap with.
+ * @param[in] vector Vector to swap with.
*/
void Swap( Vector& vector )
{