[DEV] add back in map

This commit is contained in:
Edouard DUPIN 2017-11-06 09:09:06 +01:00
parent f1aea942d9
commit f586d90713

View File

@ -542,7 +542,7 @@ namespace etk {
return Iterator(this, _pos);
}
/**
* @brief Get an Iterator on the start position of the Vector
* @brief Get an Iterator on the start position of the Map
* @return The Iterator
*/
Iterator begin() {
@ -552,7 +552,7 @@ namespace etk {
return position(0);
}
/**
* @brief Get an Iterator on the end position of the Vector
* @brief Get an Iterator on the end position of the Map
* @return The Iterator
*/
Iterator end() {
@ -561,6 +561,22 @@ namespace etk {
const Iterator end() const {
return position(size());
}
/**
* @brief Get the last element in the Map or end()
* @return The Iterator
*/
Iterator back() {
if (size() > 0) {
return position(size()-1);
}
return position(size());
}
const Iterator back() const {
if (size() > 0) {
return position(size()-1);
}
return position(size());
}
Iterator find(const ETK_MAP_TYPE_KEY& _key) {
int64_t elementId = getId(_key);