[DEV] add pushFront API for vector

This commit is contained in:
Edouard DUPIN 2013-03-22 20:56:28 +01:00
parent 3b6cd4880c
commit 28d5740bf5

View File

@ -391,9 +391,26 @@ namespace etk
#endif
return m_data[pos];
}
/**
* @brief Add at the First position of the Vector
* @param[in] item Element to add at the end of vector
*/
void PushFront(const MY_TYPE& item)
{
Insert(0, &item, 1);
}
/**
* @brief Add at the Last position of the Vector
* @param[in] item Element to add at the end of vector
* @param[in] item Pointer on a list of Element to add at the start of vector
* @param[in] nbElement Number of element to add.
*/
void PushFront(const MY_TYPE * item, int32_t nbElement)
{
Insert(0, item, nbElement);
}
/**
* @brief Add at the Last position of the Vector
* @param[in] item Element to add at the end of vector
*/
void PushBack(const MY_TYPE& item)
{
@ -407,7 +424,8 @@ namespace etk
}
/**
* @brief Add at the Last position of the Vector
* @param[in] item Element to add at the end of vector
* @param[in] item Pointer on a list of Element to add at the end of vector
* @param[in] nbElement Number of element to add.
*/
void PushBack(const MY_TYPE * item, int32_t nbElement)
{