[DEV] add back in map
This commit is contained in:
parent
f1aea942d9
commit
f586d90713
20
etk/Map.hpp
20
etk/Map.hpp
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user