24 #include "cheetah/data/VectorLike.h" 31 template <
typename VectorType>
36 template <
typename VectorType>
42 template <
typename VectorType>
47 template <
typename VectorType>
48 template<
typename... Args>
50 : _data(n,
std::forward<Args>(args)...)
54 template <
typename VectorType>
56 : _data(n,value, allocator)
60 template <
typename VectorType>
66 template <
typename VectorType>
72 template <
typename VectorType>
78 template <
typename VectorType>
84 template <
typename VectorType>
90 template <
typename VectorType>
93 return _data.cbegin();
96 template <
typename VectorType>
99 return _data.cbegin();
102 template <
typename VectorType>
108 template <
typename VectorType>
114 template <
typename VectorType>
120 template <
typename VectorType>
126 template <
typename VectorType>
132 template <
typename VectorType>
138 template <
typename VectorType>
144 template <
typename VectorType>
150 template <
typename VectorType>
151 template<
typename ...Args>
154 return _data.
emplace_back(std::forward<Args>(values)...);
157 template <
typename VectorType>
163 template <
typename VectorType>
169 template <
typename VectorType>
172 return _data.
swap(v);
175 template <
typename VectorType>
178 return _data.
erase(pos);
181 template <
typename VectorType>
184 return _data.
erase(first,last);
187 template <
typename VectorType>
190 return _data.
insert(pos, value);
193 template <
typename VectorType>
196 return _data.
insert(pos, std::move(value));
199 template <
typename VectorType>
202 return _data.
insert(pos, value);
205 template <
typename VectorType>
208 return _data.
insert(pos, std::move(value));
211 template <
typename VectorType>
212 template<
typename...Args>
215 return _data.emplace(pos, std::forward<Args>(values)...);
218 template <
typename VectorType>
219 template<
typename...Args>
222 return _data.emplace(pos, std::forward<Args>(values)...);
225 template <
typename VectorType>
228 return _data.
front();
231 template <
typename VectorType>
234 return _data.
front();
237 template <
typename VectorType>
243 template <
typename VectorType>
249 template <
typename VectorType>
252 return _data.
empty();
255 template <
typename VectorType>
261 template <
typename VectorType>
264 for(
auto it=v.
begin(); it != v.
end(); ++it) {
270 template <
typename VectorType>
273 return _data.get_allocator();
ValueType const & front() const
the first emelment
ValueType const & back() const
the last emelment
void resize(std::size_t size, const ValueType &x=ValueType())
Resize the vector.
Pointer data()
Return a pointer pointing to the start of the vector.
ConstIterator cend() const
A constant iterator pointing to the end of the vector.
std::size_t size() const
Retrieve the size of the underlying vector.
void emplace_back(Args &&... value)
Appends element to end of vector using the move operator.
Class that wraps objects that export the std::vector interface.
Some limits and constants for FLDO.
void clear()
clear the data
void push_back(ValueType const &value)
Appends element to end of vector.
void reserve(std::size_t size)
Reserve space for this many elements.
void swap(VectorLike &v)
swaps the contents of this vector_base with another vector
ReverseIterator rbegin()
A reverse iterator pointing to the end of the vector (i.e the last element).
VectorLike()
Construct a VectorLike instance.
Iterator end()
An iterator pointing to the end of the vector.
bool empty() const
return true if the vector is empty
std::size_t capacity() const
The reseved size of the vector.
Iterator insert(Iterator pos, const ValueType &value)
insert a value in the vector_base
Iterator erase(Iterator pos)
erase the element from a given position or a range of positions
Iterator begin()
An iterator pointing to the start of the vector.