◆ back() [1/2]
template<typename KeyType , typename ValueType >
Mutable access to the last element in the container.
- Returns
- reference to the last element in container
◆ back() [2/2]
template<typename KeyType , typename ValueType >
| const ValueType & VectorWithKeys< KeyType, ValueType >::back |
( |
| ) |
const |
Read only access to the last element in the container.
- Returns
- constant reference to the last element in container
◆ begin() [1/2]
template<typename KeyType, typename ValueType>
- Returns
- an iterator pointing to the first element of the container
◆ begin() [2/2]
template<typename KeyType, typename ValueType>
- Returns
- a constant iterator pointing to the first element of the container
◆ cbegin()
template<typename KeyType, typename ValueType>
- Returns
- a constant iterator pointing to the first element of the container
◆ cend()
template<typename KeyType, typename ValueType>
- Returns
- a constant iterator pointing to position past the last element of the container
◆ emplaceBackWithKey()
template<typename KeyType , typename ValueType >
| bool VectorWithKeys< KeyType, ValueType >::emplaceBackWithKey |
( |
const KeyType & |
key | ) |
|
Constructs an additional element at the at the back of the container by calling a default constructor if the key value passed isn't yet taken.
True is returned only when an element has been added.
- Parameters
-
| key | value of the newly constructed element at the back of container |
- Returns
- true if element with passed key value was added to the container
◆ empty()
template<typename KeyType , typename ValueType >
- Returns
- true if the container is empty otherwise false
◆ end() [1/2]
template<typename KeyType, typename ValueType>
- Returns
- an iterator pointing to position past the last element of the container
◆ end() [2/2]
template<typename KeyType, typename ValueType>
- Returns
- a constant iterator pointing to position past the last element of the container
◆ erase() [1/2]
template<typename KeyType , typename ValueType >
Erases an element at an iterator position.
- Parameters
-
| position | and iterator pointing to the single element to be removed from the container |
- Returns
- an iterator pointing to the new location of the element that followed the element erased by the function call
◆ erase() [2/2]
template<typename KeyType , typename ValueType >
Erases an element at an iterator position.
- Parameters
-
| index | of a single element to be removed from the container |
- Returns
- an iterator pointing to the new location of the element that followed the element erased by the function call
◆ findByKey() [1/2]
template<typename KeyType , typename ValueType >
Searches for an element with a key value passed.
Returns an iterator pointing to the element with a passed key value. If element with that key doesn't exist an iterator pointing container end is returned.
- Parameters
-
| key | value of an element being searched |
- Returns
- an iterator pointing to the element found or to container end if element wasn't found
◆ findByKey() [2/2]
template<typename KeyType , typename ValueType >
Searches for an element with a key value passed.
Returns a constant iterator pointing to the element with a passed key value. If element with that key doesn't exist an iterator pointing container end is returned.
- Parameters
-
| key | value of an element being searched |
- Returns
- a constant iterator pointing to the element found or to container end if element wasn't found
◆ getKey()
template<typename KeyType , typename ValueType >
| const KeyType & VectorWithKeys< KeyType, ValueType >::getKey |
( |
std::size_t |
pos | ) |
const |
- Parameters
-
| pos | index position in container |
- Returns
- key value at index position
◆ operator[]() [1/2]
template<typename KeyType , typename ValueType >
| ValueType & VectorWithKeys< KeyType, ValueType >::operator[] |
( |
std::size_t |
pos | ) |
|
Mutable access element at position.
- Parameters
-
| pos | index position of an element |
- Returns
- reference of an object at the position
◆ operator[]() [2/2]
template<typename KeyType , typename ValueType >
| const ValueType & VectorWithKeys< KeyType, ValueType >::operator[] |
( |
std::size_t |
pos | ) |
const |
Read only access to element at position.
- Parameters
-
| pos | index position of an element |
- Returns
- constant reference of an object at the position
◆ size()
template<typename KeyType , typename ValueType >
- Returns
- number of elements in the container
◆ swap()
template<typename KeyType , typename ValueType >
| void VectorWithKeys< KeyType, ValueType >::swap |
( |
int32_t |
posA, |
|
|
int32_t |
posB |
|
) |
| |
Swaps elements in container at indexed positions passed.
- Parameters
-
| posA | index of the to be swapped element |
| posB | index of the to be swapped element |
The documentation for this class was generated from the following file: