Go to the documentation of this file.
58 template<
class T,
int SizeMin>
61 template<
class T,
int SizeMin>
69 template<
class T,
int SizeMin = 16>
74 static_assert(SizeMin > 0,
"Invalid min size parameter");
91 template<
class ListType>
92 inline void assignDynList(
const ListType& list);
96 inline void doCapacity(
const bool nocopy,
const label len);
101 inline void doReserve(
const bool nocopy,
const label len);
106 inline void doResize(
const bool nocopy,
const label len);
129 template<
int AnySizeMin>
141 inline explicit
DynamicList(std::initializer_list<
T> lst);
151 template<
int AnySizeMin>
169 static constexpr label
min_size() noexcept {
return SizeMin; }
172 inline label
capacity() const noexcept;
200 inline
void reserve(const label len);
213 inline
void resize(const label len);
216 inline
void resize(const label len, const
T& val);
232 inline void clear() noexcept;
252 template<
int AnySizeMin>
259 template<
int AnySizeMin>
281 append(std::initializer_list<
T> lst);
296 template<
int AnySizeMin>
317 inline
T remove(const label idx, const
bool fast=false);
326 inline label
remove(std::initializer_list<label> start_size);
335 inline label
subset(std::initializer_list<label> start_size);
360 template<
int AnySizeMin>
364 inline
void operator=(std::initializer_list<
T> lst);
377 template<
int AnySizeMin>
411 template<class
T,
int SizeMin>
414 return list.readList(is);
419 template<
class T,
int SizeMin>
422 return (
os <<
static_cast<const UList<T>&
>(list));
429 template<
class T,
int SizeMinA,
int SizeMinB>
439 template<
class T,
int SizeMin>
void resize(const label len)
label subset(const labelRange &range)
Retain a (start,size) subset from the list.
void setCapacity_unsafe(const label len) noexcept
constexpr DynamicList() noexcept
Default construct, an empty list without allocation.
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
void setCapacity_nocopy(const label len)
void swap(DynamicList< T, AnySizeMin > &other)
Swap content, independent of sizing parameter.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void setSize(const label n, const T &val)
Same as resize()
void shrinkStorage()
Shrink the allocated space to the number of elements used.
std::streamsize capacity_bytes() const noexcept
Number of contiguous bytes of the underlying storage.
Istream & operator>>(Istream &, directionInfo &)
friend Ostream & operator(Ostream &os, const DynamicList< T, SizeMin > &list)
Write to Ostream.
void reserve(const label len)
label capacity() const noexcept
Size of the underlying storage.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
label expandStorage() noexcept
Expand the addressable size to fit the allocated capacity.
void setCapacity(const label len)
Alter the size of the underlying storage.
Istream & readList(Istream &is)
Read from Istream, discarding existing contents.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
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 T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
A range or interval of labels defined by a start and a size.
void setSize(const label n)
Same as resize()
void reserve_nocopy(const label len)
OBJstream os(runTime.globalPath()/outputName)
A list that is sorted upon construction or when explicitly requested with the sort() method.
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 clearStorage()
Clear the list and delete storage.
T remove()
Remove and return the last element. Fatal on an empty list.
void transfer(List< T > &list)
Transfer contents of the argument List into this.
void resize_nocopy(const label len)
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"))
label appendUniq(const T &val)
Append an element if not already in the list.
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 ...