Go to the documentation of this file.
48 #include <type_traits>
58 template<
class T,
int SizeMin>
65 template<
class T,
int SizeMin>
77 template<
class T,
int SizeMin = 16>
82 static_assert(SizeMin > 0,
"Invalid min size parameter");
104 template<
class ListType>
112 friend class List<
T>;
133 template<
int AnySizeMin>
146 template<class InputIterator>
147 inline
DynamicList(InputIterator begIter, InputIterator endIter);
150 inline explicit
DynamicList(std::initializer_list<
T> lst);
160 template<
int AnySizeMin>
178 static constexpr label
min_size() noexcept {
return SizeMin; }
181 inline label
capacity() const noexcept;
196 inline
void setSize(const label nElem);
199 inline
void setSize(const label nElem, const
T& val);
205 inline
void resize(const label nElem);
208 inline
void resize(const label nElem, const
T& val);
212 inline
void reserve(const label nElem);
230 template<
int AnySizeMin>
237 template<
int AnySizeMin>
259 append(std::initializer_list<
T> lst);
274 template<
int AnySizeMin>
291 inline
T remove(const label idx, const
bool fast=false);
300 inline label
remove(std::initializer_list<label> start_size);
309 inline label
subset(std::initializer_list<label> start_size);
335 template<
int AnySizeMin>
339 inline
void operator=(std::initializer_list<
T> lst);
352 template<
int AnySizeMin>
380 template<class
T,
int SizeMin1,
int SizeMin2>
390 #include "DynamicListI.H"
label subset(const labelRange &range)
Retain a (start,size) subset from the list.
constexpr DynamicList() noexcept
Default construct, an empty list without allocation.
void assignDynList(const ListType &lst)
Copy assignment from another list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
label expandStorage()
Expand the addressable size to fit the allocated capacity.
void swap(DynamicList< T, AnySizeMin > &lst)
Swap content with any sized DynamicList.
label capacity() const noexcept
Size of the underlying storage.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void Swap(DynamicList< T, SizeMin1 > &a, DynamicList< T, SizeMin2 > &b)
void reserve(const label nElem)
Reserve allocation space for at least this size.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
void clear()
Clear the addressed list, i.e. set the size to zero.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
A range or interval of labels defined by a start and a size.
A list that is sorted upon construction or when explicitly requested with the sort() method.
void setSize(const label nElem)
Alter addressable list size.
void setCapacity(const label nElem)
Alter the size of the underlying storage.
void resize(const label nElem)
Alter addressable list size.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void transfer(List< T > &lst)
Transfer contents of the argument List into this.
void clearStorage()
Clear the list and delete storage.
T remove()
Remove and return the last element. Fatal on an empty list.
friend Ostream & operator(Ostream &os, const DynamicList< T, SizeMin > &lst)
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Vector< label > N(dict.get< Vector< label >>("N"))
static constexpr label min_size() noexcept
Normal lower capacity limit - the SizeMin template parameter.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...