1#line 1 "D:/Jenkins/workspace/EMS/ECG/ufe/full/ufe-full-python3.13-windows/ufe/include/array.h"
18#include <initializer_list>
98 Array(std::initializer_list<value_type> il);
102 template<
typename InputIt>
258 template<
typename InputIt>
264 resize(
static_cast<size_type>(std::distance(first, last)));
265 std::copy(first, last, begin());
269 void assign(std::initializer_list<value_type> il);
295 template<
class InputIt>
296 std::enable_if_t<!std::is_integral_v<InputIt>,
iterator>
300 if (insertCount == 0)
301 return begin() + std::distance(cbegin(), position);
309 auto is_pointer_in_range = [dataBegin, dataEnd](
const_pointer p) {
310 return p >= dataBegin && p < dataEnd;
313 bool overlap =
false;
314 if constexpr (std::is_pointer_v<InputIt>) {
316 overlap = is_pointer_in_range(first) || is_pointer_in_range(last - 1);
321 std::vector<value_type> temp(first, last);
322 resize(oldSize + insertCount);
323 std::move_backward(begin() + posIndex, begin() + oldSize, end());
324 std::copy(temp.begin(), temp.end(), begin() + posIndex);
326 resize(oldSize + insertCount);
327 std::move_backward(begin() + posIndex, begin() + oldSize, end());
328 std::copy(first, last, begin() + posIndex);
330 return begin() + posIndex;
378 template<
typename... Args>
382 template<
typename... Args>
Array is a container class that encapsulates dynamic sized arrays.
bool operator>(const Array &other) const
reference at(size_type n)
Returns a reference to the element at specified location pos, with bounds checking.
void resize(size_type count, const value_type &value)
Resizes the array to contain count elements.
iterator insert(const_iterator position, size_type n, const value_type &val)
Inserts n copies of val before the element at the specified position position.
std::unique_ptr< Imp > _imp
reference back()
Returns a reference to the last element in the array.
Array()
Default constructor. Creates an empty Array.
reference front()
Returns a reference to the first element in the array.
bool operator==(const Array &other) const
void push_back(const value_type &val)
Appends an element to the end of the array.
Array(InputIt first, InputIt last)
Range constructor. Creates a Array with elements from the range [first, last).
bool operator<(const Array &other) const
const_reference operator[](size_type n) const
Returns a constant reference to the element at specified location n.
const_reference front() const
Returns a constant reference to the first element in the array.
iterator emplace(const_iterator position, Args &&... args)
Constructs a new element in-place at the specified position position.
std::enable_if_t<!std::is_integral_v< InputIt >, iterator > insert(const_iterator position, InputIt first, InputIt last)
Inserts copies of the elements in the range [first, last) before the element at the specified positio...
void swap(Array &other)
Exchanges the contents and capacity of the array with those of other.
reverse_iterator rend()
Returns a reverse iterator to the beginning of the array.
const_reverse_iterator crend() const
Returns a constant reverse iterator to the beginning of the array.
bool operator!=(const Array &other) const
reverse_iterator rbegin()
Returns a reverse iterator to the end of the array.
void assign(size_type n, const value_type &val)
Replaces the contents with n copies of val.
std::reverse_iterator< iterator > reverse_iterator
iterator erase(const_iterator first, const_iterator last)
Removes the elements in the range [first, last).
iterator insert(const_iterator position, const value_type &val)
Inserts a copy of val before the element at the specified position position.
size_type size() const
Returns the number of elements in the container.
iterator erase(iterator position)
Removes the element at the specified position position.
Array(const Array &)
Copy constructor.
const T & const_reference
void reserve(size_type n)
Requests that the capacity be at least enough to contain n elements.
value_type * data()
Returns a pointer to this array's data.
iterator erase(iterator first, iterator last)
Removes the elements in the range [first, last).
const_reverse_iterator rbegin() const
Returns a constant reverse iterator to the end of the array.
size_type capacity() const
Returns the number of elements that can be held in currently allocated storage.
void assign(std::initializer_list< value_type > il)
Replaces the contents with copies of the elements in the initializer list il.
iterator insert(const_iterator position, value_type &&val)
Inserts val before the element at the specified position position possibly moving it.
void emplace_back(Args &&... args)
Constructs a new element in-place at the end of the array.
iterator erase(const_iterator position)
Removes the element at the specified position position.
const_iterator cend() const
Returns a constant iterator to the element following the last element of the array.
Array(Array &&) noexcept
Move constructor.
reference operator[](size_type n)
Returns a reference to the element at specified location n.
bool operator>=(const Array &other) const
Array(std::initializer_list< value_type > il)
Initializer list constructor.
void push_back(value_type &&val)
Appends an element to the end of the array.
void resize(size_type count)
Resizes the array to contain count elements.
const_reference at(size_type n) const
Returns a constant reference to the element at specified location pos, with bounds checking.
Array(size_type count)
Constructs an array with count default-inserted objects of T.
void pop_back()
Removes the last element of the array.
const_reverse_iterator rend() const
Returns a constant reverse iterator to the beginning of the array.
const_reference back() const
Returns a constant reference to the last element in the array.
void assign(InputIt first, InputIt last)
Replaces the contents with copies of the elements in the range [first, last).
bool empty() const
Checks if the array has no elements.
bool operator<=(const Array &other) const
iterator end()
Returns an iterator to the element following the last element of the array.
Array(size_type count, const value_type &value)
Constructs an array with count copies of elements with value value.
const_iterator end() const
Returns a constant iterator to the element following the last element of the array.
const value_type * data() const
Returns a const pointer to this array's data.
const_reverse_iterator crbegin() const
Returns a constant reverse iterator to the end of the array.
void clear()
Removes all elements from the array. The array will be empty after this call.
iterator insert(const_iterator position, std::initializer_list< value_type > il)
Inserts copies of the elements in the initializer list il before the element at the specified positio...
std::reverse_iterator< const_iterator > const_reverse_iterator
Array< std::string > StringArray
Array< Vector3d > Vector3dArray
Array< Vector3f > Vector3fArray
Array< Vector4i > Vector4iArray
Array< Vector3i > Vector3iArray
Array< Matrix3d > Matrix3dArray
Array< Vector4f > Vector4fArray
Array< double > DoubleArray
Array< Color3f > Color3fArray
Array< Matrix4d > Matrix4dArray
Array< Vector2i > Vector2iArray
Array< Color4f > Color4fArray
Array< unsigned int > UIntArray
Array< Vector2f > Vector2fArray
Array< Vector4d > Vector4dArray
Array< float > FloatArray
Array< Vector2d > Vector2dArray
Definition of macros for symbol visibility.