Go to the documentation of this file.
110 class const_iterator;
116 inline constexpr
UPtrList() noexcept;
119 inline explicit
UPtrList(const label len);
149 inline label
size() const noexcept;
152 inline
bool empty() const noexcept;
158 inline const
T&
first() const;
164 inline const
T&
last() const;
168 inline
T*
get(const label i);
172 inline const
T*
get(const label i) const;
177 const
T*
set(const label i)
const {
return this->
get(i); }
187 inline void resize(
const label newLen);
208 inline T*
set(
const label i,
T* ptr);
303 const T*
const* ptr_;
395 #include "UPtrListI.H"
label size() const noexcept
The number of elements in the list.
const_iterator cbegin() const noexcept
Return an const_iterator to begin traversing the UPtrList.
T & first()
Return reference to the first element of the list.
void clear()
Set list size to zero.
reference operator()() const
void swap(UPtrList< T > &list)
Swap content.
void append(T *ptr)
Append an element to the end of the list.
iterator begin() noexcept
Return an iterator to begin traversing the UPtrList.
Detail::PtrListDetail< T > ptrs_
The list of pointers.
T & reference
A non-const reference to the value_type.
void setSize(const label n)
Alias for resize()
friend class const_iterator
void operator=(const UPtrList< T > &list)
Copy assignment (shallow copies addresses)
Random-access iterator with const access.
pointer get() const
Return pointer, can be nullptr.
void transfer(UPtrList< T > &list)
Transfer contents into this list and annul the argument.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
void resize(const label newLen)
Change the size of the list.
T value_type
Type of values the list contains.
Random-access iterator with non-const access.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
reference operator()() const
void setAddressableSize(const label n) noexcept
Adjust addressable size.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
iterator end() noexcept
Return an iterator to end traversing the UPtrList.
friend Ostream & operator(Ostream &os, const UPtrList< T > &list)
Write UPtrList to Ostream.
constexpr UPtrList() noexcept
Default construct.
void sortOrder(const labelUList &order, const bool testNull=true)
OBJstream os(runTime.globalPath()/outputName)
std::random_access_iterator_tag iterator_category
reference operator*() const
pointer operator->() const
iterator & operator++() noexcept
reference operator[](difference_type n) const
const T * set(const label i) const
iterator(T **ptr) noexcept
Construct for a given entry.
T & last()
Return reference to the last element of the list.
label squeezeNull()
Squeeze out intermediate nullptr entries in the list of pointers.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const T & operator[](const label i) const
Return const reference to the element.
A rudimentary list of pointers used for PtrList, UPtrList, etc. This class is considered implementati...
std::random_access_iterator_tag iterator_category
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void reorder(const labelUList &oldToNew, const bool testNull=true)
const T * operator()(const label i) const
Return const pointer to the element - same as get().
const typedef T & const_reference
A const reference to the value_type.
bool empty() const noexcept
True if the list is empty (ie, size() is zero)
const_iterator cend() const noexcept
Return an const_iterator to end traversing the UPtrList.