23#ifndef VCL_SPACE_CORE_VECTOR_POINTER_VECTOR_H
24#define VCL_SPACE_CORE_VECTOR_POINTER_VECTOR_H
71template<IsAnyPointer T,
int N = -1>
117 using Base::operator[];
118 using Base::operator();
A class representing a box in N-dimensional space.
Definition box.h:46
The ConstPointerIterator class is a utility class that wraps an iterator of a container of [shared] p...
Definition const_pointer_iterator.h:57
The PointerVector class is a utility container that stores a sequence of pointers that preserve their...
Definition pointer_vector.h:73
Pointer data()
Returns a pointer to the underlying array serving as element storage. The pointer is such that range ...
Definition vector.h:340
The Vector class is a generic container of objects of type T, that could have fixed or dynamic size,...
Definition vector.h:62
Reference operator()(uint i)
Returns a reference to the element at specified location i. No bounds checking is performed.
Definition vector.h:705
Reference atMod(int i)
Access the specified element, computing first the module of the position w.r.t. the size of the conta...
Definition vector.h:268
Container::reference Reference
A reference to the type of the elements stored in the Vector.
Definition vector.h:88
std::size_t size() const
Returns the size of the container.
Definition vector.h:218
void resize(uint n, const T &v=T())
Resize the Vector to the specified size.
Definition vector.h:554
void erase(uint i)
Remove the element at the specified index from the Vector.
Definition vector.h:661
Container::iterator Iterator
An iterator to the elements of the Vector.
Definition vector.h:99
bool contains(const MakeConstPointerT< T > &e) const
Check if the Vector contains the specified element.
Definition vector.h:468
Reference back()
Access the last element of the Vector.
Definition vector.h:318
bool empty() const noexcept
Returns whether the vector is empty (i.e. whether its size is 0).
Definition vector.h:648
Container::value_type ValueType
The type of the elements stored in the Vector.
Definition vector.h:79
void set(uint i, const T &e)
Set the value of the element at the specified position.
Definition vector.h:363
Container::pointer Pointer
A pointer to the type of the elements stored in the Vector.
Definition vector.h:96
void fill(const T &e)
Fill all elements of the Vector with the specified value.
Definition vector.h:454
Reference at(uint i)
Access the specified element with bounds checking.
Definition vector.h:241
Vector()=default
Creates an empty Vector object.
Iterator find(const MakeConstPointerT< T > &e)
Find the first occurrence of the specified element in the Vector.
Definition vector.h:484
Pointer data()
Returns a pointer to the underlying array serving as element storage. The pointer is such that range ...
Definition vector.h:340
Reference operator[](uint i)
Returns a reference to the element at specified location i. No bounds checking is performed.
Definition vector.h:689
uint indexOf(const MakeConstPointerT< T > &e) const
Get the index of the first occurrence of the specified element in the Vector.
Definition vector.h:516
void pushBack(const T &v)
Add an element to the end of the Vector.
Definition vector.h:570
void insert(uint i, const T &v)
Insert an element at the specified position in the Vector.
Definition vector.h:600
void clear()
Remove all elements from the Vector.
Definition vector.h:675
Iterator end()
Return an iterator pointing to the end of the Vector.
Definition vector.h:729
friend void swap(Vector &a, Vector &b)
Definition vector.h:539
Reference front()
Access the first element of the Vector.
Definition vector.h:298
Iterator begin()
Return an iterator pointing to the beginning of the Vector.
Definition vector.h:722
static const int SIZE
Size of the vector at compile time. It will be -1 if the Vector has dynamic size.
Definition vector.h:108