|
| vector (size_type count) |
|
| vector (size_type count, const T &value) |
|
| vector (const vector< T > &array) |
|
| vector (vector< T > &&old) |
|
| vector (::std::initializer_list< T > list) |
|
template<class T2 > |
| vector (const T2 *array, size_type n) |
|
void | push_back (const T &element) |
|
template<class... Args> |
void | emplace_back (Args... args) |
|
void | push_back (const vector< T > &array) |
|
void | insert (const T &element) |
|
void | insert (iterator position, const_iterator first, const_iterator last) |
|
void | pop_back () |
|
const T * | data () const |
|
T * | data () |
|
T & | front () |
|
const T & | front () const |
|
T & | back () |
|
const T & | back () const |
|
void | insert_at (size_type idx, const T &element) |
|
void | insert_at (size_type idx, const vector< T > &array) |
|
void | insert (iterator pos, const T &element) |
|
T | remove_at (size_type idx) |
|
T & | at (size_t index) |
|
const T & | at (size_t index) const |
|
T & | operator[] (size_type idx) |
|
const T & | operator[] (size_type idx) const |
|
vector< T > & | operator= (const vector< T > &array) |
|
vector & | operator= (vector< T > &&old) |
|
size_type | size () const |
|
void | clear () |
|
iterator | erase (iterator pos) |
|
iterator | erase (iterator first, iterator last) |
|
void | remove (T element) |
|
bool | empty () const |
|
bool | operator== (const vector< T > &other) const |
|
bool | operator!= (const vector< T > &other) const |
|
iterator | begin () |
|
iterator | end () |
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
void | swap (vector &arr) |
|
void | rotate (iterator it) |
|
const_iterator | cbegin () |
|
const_iterator | cend () |
|
reverse_iterator | rbegin () |
|
reverse_iterator | rend () |
|
const_reverse_iterator | rbegin () const |
|
const_reverse_iterator | rend () const |
|
const_reverse_iterator | crbegin () const |
|
const_reverse_iterator | crend () const |
|
void | reserve (size_type newCapacity) |
|
void | resize (size_type newSize) |
|
void | resize (size_t newSize, const T elem) |
|
void | assign (const_iterator first, const_iterator last) |
|
◆ iterator
◆ const_iterator
Const-qualified array iterator.
◆ value_type
◆ size_type
◆ vector() [1/6]
Construct an array with count
default-inserted instances of T
. No copies are made.
◆ vector() [2/6]
Construct an array with count
copies of elements with value value
.
◆ vector() [3/6]
Construct an array as a copy of the given array
.
◆ vector() [4/6]
Construct an array as a copy of the given array using the C++11 move semantic.
◆ vector() [5/6]
Construct an array using list initialization. For example:
Common::vector<int> myArray = {1, 7, 42};
constructs an array with 3 elements whose values are 1, 7, and 42 respectively.
- Note
- This constructor is only available when C++11 support is enabled.
◆ vector() [6/6]
template<class T>
template<class T2 >
Construct an array by copying data from a regular array.
◆ push_back() [1/2]
Append an element to the end of the array.
◆ push_back() [2/2]
Append an element to the end of the array.
◆ insert() [1/2]
Adds a range of items at the specified position in the array
◆ pop_back()
Remove the last element of the array.
◆ data() [1/2]
Return a pointer to the underlying memory serving as element storage.
◆ data() [2/2]
Return a pointer to the underlying memory serving as element storage.
◆ front() [1/2]
Return a reference to the first element of the array.
◆ front() [2/2]
Return a reference to the first element of the array.
◆ back() [1/2]
Return a reference to the last element of the array.
◆ back() [2/2]
Return a reference to the last element of the array.
◆ insert_at() [1/2]
Insert an element into the array at the given position.
◆ insert_at() [2/2]
Insert copies of all the elements from the given array into this array at the given position.
◆ insert() [2/2]
Insert an element before pos
.
◆ remove_at()
Remove an element at the given position from the array and return the value of that element.
◆ operator[]() [1/2]
Return a reference to the element at the given position in the array.
◆ operator[]() [2/2]
Return a const reference to the element at the given position in the array.
◆ operator=() [1/2]
Assign the given array
to this array.
◆ operator=() [2/2]
Assign the given array to this array using the C++11 move semantic.
◆ size()
Return the size of the array.
◆ clear()
Clear the array of all its elements.
◆ erase()
Erase the element at pos
position and return an iterator pointing to the next element in the array.
◆ remove()
◆ empty()
Check whether the array is empty.
◆ operator==()
Check whether two arrays are identical.
◆ operator!=()
Check if two arrays are different.
◆ begin() [1/2]
Return an iterator pointing to the first element in the array.
◆ end() [1/2]
Return an iterator pointing past the last element in the array.
◆ begin() [2/2]
Return a const iterator pointing to the first element in the array.
◆ end() [2/2]
Return a const iterator pointing past the last element in the array.
◆ rotate()
Rotates the array so that the item pointed to by the iterator becomes the first item, and the predeceding item becomes the last one
◆ reserve()
Reserve enough memory in the array so that it can store at least the given number of elements. The current content of the array is not modified.
◆ resize()
Change the size of the array.
◆ assign()
Assign to this array the elements between the given iterators from another array, from first
included to last
excluded.
◆ roundUpCapacity()
Round up capacity to the next power of 2. A minimal capacity of 8 is used.
◆ allocCapacity()
Allocate a specific capacity for the array.
◆ freeStorage()
Free the storage used by the array.
◆ insert_aux()
Insert a range of elements coming from this or another array. Unlike std::vector::insert, this method does not accept arbitrary iterators, mainly because our iterator system is seriously limited and does not distinguish between input iterators, output iterators, forward iterators, or random access iterators.
So, we simply restrict to vector iterators. Extending this to arbitrary random access iterators would be trivial.
Moreover, this method does not handle all cases of inserting a subrange of an array into itself; this is why it is private for now.
◆ _capacity
Maximum number of elements the array can hold.
◆ _size
How many elements the array holds.
◆ _storage
Memory used for element storage.
The documentation for this class was generated from the following file: