Go to the documentation of this file.
45 #include <type_traits>
54 template<
class T,
int SizeMin>
class PtrDynList;
60 template<
class T,
int SizeMin=64>
65 static_assert(SizeMin > 0,
"Invalid min size parameter");
76 void setAddressableSize(
const label len);
108 inline label
capacity() const noexcept;
120 inline
void resize(const label newLen);
123 inline
void setSize(const label newLen);
127 inline
void reserve(const label nElem);
161 template<
int AnySizeMin>
169 inline const
T*
set(const label i) const;
187 inline
void operator=(const
PtrList<
T>& list);
190 inline
void operator=(const
PtrDynList<
T, SizeMin>& list);
193 template<
int AnySizeMin>
194 inline
void operator=(const
PtrDynList<
T, AnySizeMin>& list);
197 inline
void operator=(
PtrList<
T>&& list);
200 inline
void operator=(
PtrDynList<
T, SizeMin>&& list);
203 template<
int AnySizeMin>
204 inline
void operator=(
PtrDynList<
T, AnySizeMin>&& list);
215 #include "PtrDynListI.H"
void reserve(const label nElem)
Reserve allocation space for at least this size.
void setSize(const label newLen)
Same as resize()
label expandStorage()
Expand the addressable size to fit the allocated capacity.
A class for managing temporary objects.
label capacity() const noexcept
Size of the underlying storage.
void reorder(const labelUList &oldToNew)
Reorder elements. Reordering must be unique (ie, shuffle).
void append(T *ptr)
Append an element to the end of the list.
A dynamically resizable PtrList with allocation management.
void resize(const label newLen)
Alter the addressed list size.
void shrink()
Shrink the allocated space to the number of elements used.
autoPtr< T > remove()
Remove and return the top element.
void setCapacity(const label nElem)
Alter the size of the underlying storage.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const T * set(const label i) const
Return const pointer to element (if set) or nullptr.
void clearStorage()
Clear the list and delete storage.
void clear()
Clear the addressed list, i.e. set the size to zero.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
constexpr PtrDynList() noexcept
Construct null.