Loading...
Searching...
No Matches
DynamicList< T, SizeMin > Class Template Reference

A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects. More...

#include <DynamicList.H>

Inherits List< T >.

Collaboration diagram for DynamicList< T, SizeMin >:

Public Member Functions

constexpr DynamicList () noexcept
 Default construct, an empty list without allocation.
 DynamicList (const label initialCapacity)
 Construct an empty list with given initial capacity.
 DynamicList (std::pair< label, label > sizing)
 Construct with given size and capacity.
 DynamicList (const label len, const T &val)
 Construct with given size and value for all elements.
 DynamicList (const label len, Foam::zero)
 Construct with given size initializing all elements to zero.
 DynamicList (const DynamicList< T, SizeMin > &lst)
 Copy construct.
template<int AnySizeMin>
 DynamicList (const DynamicList< T, AnySizeMin > &lst)
 Copy construct from DynamicList with different sizing parameters.
 DynamicList (const UList< T > &lst)
 Copy construct from UList. Size set to UList size.
 DynamicList (const UList< T > &list, const labelUList &indices)
 Copy construct subset of list.
template<unsigned N>
 DynamicList (const FixedList< T, N > &lst)
 Copy construct from a FixedList.
 DynamicList (std::initializer_list< T > lst)
 Copy construct from an initializer list. Size set to list size.
template<class Addr>
 DynamicList (const IndirectListBase< T, Addr > &lst)
 Copy construct from IndirectList. Size set to addressing size.
 DynamicList (DynamicList< T, SizeMin > &&list) noexcept
 Move construct.
template<int AnySizeMin>
 DynamicList (DynamicList< T, AnySizeMin > &&list) noexcept
 Move construct with different sizing parameters.
 DynamicList (List< T > &&list) noexcept
 Move construct from List.
 DynamicList (Istream &is)
 Construct from Istream. Size set to size of list read.
 ~DynamicList ()
 Destructor, sync allocated size before List destruction.
label capacity () const noexcept
 Size of the underlying storage.
std::streamsize capacity_bytes () const noexcept
 Number of contiguous bytes of the underlying storage.
void setCapacity (const label len)
 Alter the size of the underlying storage.
void setCapacity_nocopy (const label len)
 Alter the size of the underlying storage, without retaining old content.
void setCapacity_unsafe (label len) noexcept
 Change the value for the list capacity directly (ADVANCED, UNSAFE) Does not perform any memory management or resizing.
void reserve (const label len)
 Reserve allocation space for at least this size, allocating new space if required and retaining old content.
void reserve_nocopy (const label len)
 Reserve allocation space for at least this size, allocating new space if required without retaining old content.
void reserve_exact (const label len)
 Reserve allocation space for at least this size, allocating new space if required and retaining old content. If allocation is required, uses the specified size without any other resizing logic.
void resize (const label len)
 Alter addressable list size, allocating new space if required while recovering old content.
void resize (const label len, const T &val)
 Alter addressable size and fill new entries with constant value.
void resize_copy (label count, const label len)
 Alter addressable size, retaining the first count contents.
void resize_fill (const label len, const T &val)
 Alter addressable size and set val for all addressed entries.
void resize_nocopy (const label len)
 Alter addressable list size, allocating new space if required without necessarily recovering old content.
void clear () noexcept
 Clear the addressed list, i.e. set the size to zero.
void clearStorage ()
 Clear the list and delete storage.
void shrink_to_fit ()
 Shrink the allocated space to the number of elements used.
void swap (List< T > &other)
 Swap with plain List content. Implies shrink_to_fit().
template<int AnySizeMin>
void swap (DynamicList< T, AnySizeMin > &other) noexcept
 Swap content, independent of sizing parameter.
void transfer (List< T > &list)
 Transfer contents of the argument List into this.
template<int AnySizeMin>
void transfer (DynamicList< T, AnySizeMin > &list)
 Transfer contents of any DynamicList into this.
template<class... Args>
Templace_back (Args &&... args)
 Construct an element at the end of the list, return reference to the new list element.
void push_back (const T &val)
 Copy append an element to the end of this list.
void push_back (T &&val)
 Move append an element.
void push_back (const UList< T > &list)
 Copy append another list to the end of this list.
template<unsigned N>
void push_back (const FixedList< T, N > &list)
 Copy append a FixedList to the end of this list.
void push_back (std::initializer_list< T > list)
 Copy append an initializer list at the end of this list.
template<class Addr>
void push_back (const IndirectListBase< T, Addr > &lst)
 Copy append an IndirectList at the end of this list.
void push_back (List< T > &&list)
 Move append another list to the end of this list.
template<int AnySizeMin>
void push_back (DynamicList< T, AnySizeMin > &&list)
 Move append list.
label push_uniq (const T &val)
 Append an element if not already in the list.
void pop_back (label n=1)
 Reduce size by 1 or more elements. Can be called on an empty list.
T remove ()
 Remove and return the last element. Fatal on an empty list.
T remove (const label idx, const bool fast=false)
 Remove and return the specified element. Fatal on an empty list.
label remove (const labelRange &range)
 Remove a (start,size) subset from the list.
label remove (std::initializer_list< label > start_size)
 Remove a (start,size) subset from the list.
label subset (const labelRange &range)
 Retain a (start,size) subset from the list.
label subset (std::initializer_list< label > start_size)
 Retain a (start,size) subset from List.
Toperator() (const label i)
 Return non-const access to an element, resizing list if needed.
void operator= (const T &val)
 Assign addressed entries to the given value.
void operator= (Foam::zero)
 Assign addressed entries to zero.
void operator= (const UList< T > &lst)
 Assignment to UList.
template<unsigned N>
void operator= (const FixedList< T, N > &lst)
 Assignment to FixedList.
void operator= (const DynamicList< T, SizeMin > &lst)
 Assignment to DynamicList.
template<int AnySizeMin>
void operator= (const DynamicList< T, AnySizeMin > &lst)
 Assignment from DynamicList with different sizing parameters.
void operator= (std::initializer_list< T > lst)
 Assignment from initializer list.
template<class Addr>
void operator= (const IndirectListBase< T, Addr > &lst)
 Assignment from IndirectList.
void operator= (List< T > &&lst)
 Move assignment.
void operator= (DynamicList< T, SizeMin > &&lst)
 Move assignment.
template<int AnySizeMin>
void operator= (DynamicList< T, AnySizeMin > &&lst)
 Move assignment.
IstreamreadList (Istream &is)
 Read from Istream, discarding existing contents.
void setSize (const label n)
 Alias for resize().
void setSize (const label n, const T &val)
 Alias for resize().
DynamicList< T, SizeMin > & shrink ()
 Calls shrink_to_fit() and returns a reference to the DynamicList.
void append (const T &val)
 Copy append an element to the end of this list.
void append (T &&val)
 Move append an element.
void append (const UList< T > &list)
 Append another list to the end of this list.
template<unsigned N>
void append (const FixedList< T, N > &list)
 Append a FixedList to the end of this list.
void append (std::initializer_list< T > list)
 Append an initializer list at the end of this list.
template<class Addr>
void append (const IndirectListBase< T, Addr > &list)
 Append a IndirectList at the end of this list.
void append (List< T > &&list)
 Move append list.
template<int AnySizeMin>
void append (DynamicList< T, AnySizeMin > &&list)
 Move append list.
label appendUniq (const T &val)
 Same as push_uniq().
Public Member Functions inherited from List< T >
constexpr List () noexcept
 Default construct.
 List (const label len)
 Construct with given size.
 List (const label len, const T &val)
 Construct with given size and value for all elements.
 List (const label len, Foam::zero)
 Construct with given size initializing all elements to zero.
 List (Foam::one, const T &val)
 Construct with length=1, copying the value as the only content.
 List (Foam::one, T &&val)
 Construct with length=1, moving the value as the only content.
 List (Foam::one, Foam::zero)
 Construct with length=1, initializing content to zero.
 List (const List< T > &list)
 Copy construct from list.
 List (const UList< T > &list)
 Copy construct contents from list.
 List (List< T > &list, bool reuse)
 Construct as copy or re-use as specified.
 List (const UList< T > &list, const labelUList &indices)
 Copy construct subset of list.
template<unsigned N>
 List (const UList< T > &list, const FixedList< label, N > &indices)
 Copy construct subset of list.
template<unsigned N>
 List (const FixedList< T, N > &list)
 Construct as copy of FixedList<T, N>.
 List (const UPtrList< T > &list)
 Construct as copy of UPtrList<T> content.
template<class Addr>
 List (const IndirectListBase< T, Addr > &list)
 Construct as copy of IndirectList contents.
 List (std::initializer_list< T > list)
 Construct from an initializer list.
 List (List< T > &&list) noexcept
 Move construct from List.
template<int SizeMin>
 List (DynamicList< T, SizeMin > &&list)
 Move construct from DynamicList.
 List (Istream &is)
 Construct from Istream.
autoPtr< List< T > > clone () const
 Clone.
 ~List ()
 Destructor.
void clear ()
 Clear the list, i.e. set size to zero.
void resize (const label len)
 Adjust allocated size of list.
void resize (const label len, const T &val)
 Adjust allocated size of list and set val for new elements.
void resize_copy (label count, const label len)
 Change allocated size of list, retaining the first count elements.
void resize_fill (const label len, const T &val)
 Adjust allocated size of list and set val for all elements.
void resize_nocopy (const label len)
 Adjust allocated size of list without necessarily.
void transfer (List< T > &list)
 Transfer the contents of the argument List into this list and annul the argument list.
template<int SizeMin>
void transfer (DynamicList< T, SizeMin > &list)
 Transfer the contents of the argument List into this list and annul the argument list.
TnewElmt (const label i)
 Return subscript-checked element of UList and resizing the list if required.
template<class... Args>
Templace_back (Args &&... args)
 Construct an element at the end of the list, return reference to the new list element.
void push_back (const T &val)
 Append an element at the end of the list.
void push_back (T &&val)
 Move append an element at the end of the list.
void push_back (const UList< T > &list)
 Append a List to the end of this list.
template<class Addr>
void push_back (const IndirectListBase< T, Addr > &list)
 Append IndirectList contents at the end of this list.
label push_uniq (const T &val)
 Append an element if not already in the list.
void pop_back (label n=1)
 Reduce size by 1 or more elements. Can be called on an empty list.
void operator= (const UList< T > &list)
 Assignment to UList operator. Takes linear time.
void operator= (const List< T > &list)
 Assignment operator. Takes linear time.
template<class Addr>
void operator= (const IndirectListBase< T, Addr > &list)
 Assignment from IndirectList. Takes linear time.
template<unsigned N>
void operator= (const FixedList< T, N > &list)
 Copy assignment from FixedList.
void operator= (std::initializer_list< T > list)
 Assignment to an initializer list.
void operator= (const T &val)
 Assignment of all entries to the given value.
void operator= (Foam::zero)
 Assignment of all entries to zero.
void operator= (List< T > &&list)
 Move assignment. Takes constant time.
template<int SizeMin>
void operator= (DynamicList< T, SizeMin > &&list)
 Move assignment. Takes constant time.
IstreamreadList (Istream &is)
 Read List from Istream, discarding contents of existing List.
void shallowCopy (const UList< T > &)=delete
 No shallowCopy permitted.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_bool_v<TypeT>>>
bool set (const label i, bool val=true)
 A bitSet::set() method for a list of bool.
void append (const T &val)
 Append an element at the end of the list.
void append (T &&val)
 Move append an element at the end of the list.
void append (const UList< T > &list)
 Append a List to the end of this list.
template<class Addr>
void append (const IndirectListBase< T, Addr > &list)
 Append IndirectList contents at the end of this list.
label appendUniq (const T &val)
 Same as push_uniq().
void setSize (label n)
 Alias for resize().
void setSize (label n, const T &val)
 Alias for resize().
template<typename E>
 List (const Expression::ListExpression< E > &expr)
 Construct from value expression.
template<typename E>
void operator= (const Expression::ListExpression< E > &expr)
 Assign values from expression.
void resize (const label len)
Public Member Functions inherited from UList< T >
 UList (const UList< T > &) noexcept=default
 Copy construct, shallow copy.
 UList (UList< T > &&) noexcept=default
 Move construct, shallow copy.
UList< T > & operator= (const UList< T > &)=delete
 No copy assignment (default: shallow copy).
UList< T > & operator= (UList< T > &&) noexcept=default
 Move assignment, shallow copy.
constexpr UList () noexcept
 Default construct, zero-sized and nullptr.
 UList (T *__restrict__ ptr, const label len) noexcept
 Construct from components.
 UList (SubList< T > &&) noexcept
 Move construct from a SubList, shallow copy.
label fcIndex (const label i) const noexcept
 The forward circular index. The next index in the list which returns to the first at the end of the list.
label rcIndex (const label i) const noexcept
 The reverse circular index. The previous index in the list which returns to the last at the beginning of the list.
const TfcValue (const label i) const
 Return forward circular value (ie, next value in the list).
TfcValue (const label i)
 Return forward circular value (ie, next value in the list).
const TrcValue (const label i) const
 Return reverse circular value (ie, previous value in the list).
TrcValue (const label i)
 Return reverse circular value (ie, previous value in the list).
const Tcdata () const noexcept
 Return pointer to the underlying array serving as data storage.
Tdata () noexcept
 Return pointer to the underlying array serving as data storage.
const char * cdata_bytes () const noexcept
 Return pointer to the underlying array serving as data storage,.
char * data_bytes () noexcept
 Return pointer to the underlying array serving as data storage,.
Tfront ()
 Access first element of the list, position [0].
const Tfront () const
 Access first element of the list.
Tback ()
 Access last element of the list, position [size()-1].
const Tback () const
 Access last element of the list, position [size()-1].
std::streamsize size_bytes () const noexcept
 Number of contiguous bytes for the List data.
std::streamsize byteSize () const
 Number of contiguous bytes for the List data, runtime FatalError if type is not contiguous.
void checkStart (const label start) const
 Check start is within valid range [0,size).
void checkSize (const label size) const
 Check size is within valid range [0,size].
void checkRange (const label start, const label len) const
 Check that start and length define a valid range.
void checkIndex (const label i) const
 Check index is within valid range [0,size).
bool uniform () const
 True if all entries have identical values, and list is non-empty.
bool contains (const T &val) const
 True if the value is contained in the list.
bool contains (const T &val, label pos, label len=-1) const
 Is the value contained in the list?
label find (const T &val) const
 Find index of the first occurrence of the value.
label find (const T &val, label pos, label len=-1) const
 Find index of the first occurrence of the value.
label rfind (const T &val, label pos=-1) const
 Find index of the last occurrence of the value.
void moveFirst (const label i)
 Move element to the first position.
void moveLast (const label i)
 Move element to the last position.
void swapFirst (const label i)
 Swap element with the first element. Fatal on an empty list.
void swapLast (const label i)
 Swap element with the last element. Fatal on an empty list.
void shallowCopy (T *__restrict__ ptr, const label len) noexcept
 Copy the pointer and size.
void shallowCopy (std::nullptr_t) noexcept
 Copy nullptr and zero size.
void shallowCopy (const UList< T > &list) noexcept
 Copy the pointer and size held by the given UList.
void deepCopy (const UList< T > &list)
 Copy elements of the given UList. Sizes must match!
template<class Addr>
void deepCopy (const IndirectListBase< T, Addr > &list)
 Copy elements of the given indirect list. Sizes must match!
SubList< Tslice (const label pos, label len=-1)
 Return SubList slice (non-const access) - no range checking.
const SubList< Tslice (const label pos, label len=-1) const
 Return SubList slice (const access) - no range checking.
SubList< Tslice (const labelRange &range)
 Return SubList slice (non-const access) - with range checking.
const SubList< Tslice (const labelRange &range) const
 Return SubList slice (const access) - with range checking.
Toperator[] (const label i)
 Return element of UList.
const Toperator[] (const label i) const
 Return element of constant UList.
 operator const Foam::List< T > & () const
 Allow cast to a const List<T>&.
void operator= (const T &val)
 Assignment of all entries to the given value.
void operator= (Foam::zero)
 Assignment of all entries to zero.
iterator begin () noexcept
 Return an iterator to begin traversing the UList.
iterator end () noexcept
 Return an iterator to end traversing the UList.
iterator begin (const label i) noexcept
 Return iterator at offset i from begin, clamped to [0,size] range.
const_iterator cbegin () const noexcept
 Return const_iterator to begin traversing the constant UList.
const_iterator cend () const noexcept
 Return const_iterator to end traversing the constant UList.
const_iterator begin () const noexcept
 Return const_iterator to begin traversing the constant UList.
const_iterator end () const noexcept
 Return const_iterator to end traversing the constant UList.
const_iterator cbegin (const label i) const noexcept
 Return const_iterator at offset i from begin, clamped to [0,size] range.
const_iterator begin (const label i) const noexcept
 Return const_iterator at offset i from begin, clamped to [0,size] range.
reverse_iterator rbegin ()
 Return reverse_iterator to begin reverse traversing the UList.
reverse_iterator rend ()
 Return reverse_iterator to end reverse traversing the UList.
const_reverse_iterator crbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList.
const_reverse_iterator crend () const
 Return const_reverse_iterator to end reverse traversing the UList.
const_reverse_iterator rbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList.
const_reverse_iterator rend () const
 Return const_reverse_iterator to end reverse traversing the UList.
bool empty () const noexcept
 True if List is empty (ie, size() is zero).
label size () const noexcept
 The number of elements in the container.
label capacity () const noexcept
 Size of the underlying storage.
void swap (UList< T > &list) noexcept
 Swap content with another UList of the same type in constant time.
bool operator== (const UList< T > &list) const
 Equality operation on ULists of the same type.
bool operator!= (const UList< T > &list) const
 The opposite of the equality operation. Takes linear time.
bool operator< (const UList< T > &list) const
 Compare two ULists lexicographically. Takes linear time.
bool operator> (const UList< T > &list) const
 Compare two ULists lexicographically. Takes linear time.
bool operator<= (const UList< T > &list) const
 Return true if !(a > b). Takes linear time.
bool operator>= (const UList< T > &list) const
 Return true if !(a < b). Takes linear time.
IstreamreadList (Istream &is)
 Read List contents from Istream.
void writeEntry (const word &keyword, Ostream &os) const
 Write the List as a dictionary entry with keyword.
OstreamwriteList (Ostream &os, const label shortLen=0) const
 Write List, with line-breaks in ASCII when length exceeds shortLen.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_bool_v<TypeT>>>
bool all () const
 True if all entries are 'true' or if the list is empty.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_bool_v<TypeT>>>
bool any () const
 True if any entries are 'true'.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_bool_v<TypeT>>>
bool none () const
 True if no entries are 'true'.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_bool_v<TypeT>>>
bool test (const label i) const
 Test bool value at specified position, always false for out-of-range access.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_bool_v<TypeT>>>
bool get (const label i) const
 Return bool value at specified position, always false for out-of-range access.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_bool_v<TypeT>>>
bool unset (const label i)
 Unset the bool entry at specified position, always false for out-of-range access.
template<class TypeT = T, class = std::enable_if_t<stdFoam::is_char_v<TypeT>>>
std::string_view view () const
 Return a string_view of the charList. Content is non-modifiable.
Tfirst ()
 Access first element of the list, position [0].
const Tfirst () const
 Access first element of the list.
Tlast ()
 Access last element of the list, position [size()-1].
const Tlast () const
 Access last element of the list, position [size()-1].
bool found (const T &val, label pos=0) const
 Same as contains().
auto expr () const
 Wrap value as expression.
template<typename E>
void operator= (const Expression::ListExpression< E > &expr)
 Assign values from expression.

Static Public Member Functions

static constexpr label min_size () noexcept
 Normal lower capacity limit - the SizeMin template parameter.
Static Public Member Functions inherited from List< T >
static const List< T > & null () noexcept
 Return a null List (reference to a nullObject). Behaves like an empty List.
Static Public Member Functions inherited from UList< T >
static const UList< T > & null () noexcept
 Return a null UList (reference to a nullObject). Behaves like an empty UList.
static constexpr label max_size () noexcept
 The size of the largest possible UList.

Friends

Istreamoperator>> (Istream &is, DynamicList< T, SizeMin > &list)
 Use the readList() method to read contents from Istream.
Ostreamoperator (Ostream &os, const DynamicList< T, SizeMin > &list)
 Write to Ostream.

Additional Inherited Members

Public Types inherited from List< T >
typedef SubList< TsubList
 Declare type of subList.
Public Types inherited from UList< T >
typedef T value_type
 The value type the list contains.
typedef Tpointer
 The pointer type for non-const access to value_type items.
typedef const Tconst_pointer
 The pointer type for const access to value_type items.
typedef Treference
 The type used for storing into value_type objects.
typedef const Tconst_reference
 The type used for reading from constant value_type objects.
typedef Titerator
 Random access iterator for traversing a UList.
typedef const Tconst_iterator
 Random access iterator for traversing a UList.
typedef label size_type
 The type to represent the size of a UList.
typedef label difference_type
 The difference between iterator objects.
typedef std::reverse_iterator< iteratorreverse_iterator
 Reverse iterator (non-const access).
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Reverse iterator (const access).
using is_List = void
 Have unique tag.
Protected Member Functions inherited from UList< T >
void setAddressableSize (const label n) noexcept
 Set addressed size to be inconsistent with allocated storage.
void size (const label n)
 Older name for setAddressableSize.
void writeEntry (Ostream &os) const
 Write the UList with its compound type.
labelRange validateRange (const labelRange &requestedRange) const
 Return a validated (start,size) subset range, which means that it always addresses a valid section of the list.
void fill_uniform (const T &val)
 Assign all entries to the given value.
void fill_uniform (Foam::zero)
 Assign all entries to zero.

Detailed Description

template<class T, int SizeMin = 16>
class Foam::DynamicList< T, SizeMin >

A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.

Internal storage is a compact array and the list can be shrunk to compact storage. The increase of list size uses a doubling strategy, with the SizeMin template parameter dictating a lower bound.

Source files

Definition at line 65 of file DynamicList.H.

Constructor & Destructor Documentation

◆ DynamicList() [1/16]

template<class T, int SizeMin>
DynamicList ( )
inlineconstexprnoexcept

Default construct, an empty list without allocation.

Definition at line 125 of file DynamicListI.H.

References Foam::noexcept, and Foam::T().

Referenced by DynamicList(), DynamicList(), DynamicList(), operator=(), operator=(), operator=(), operator=(), operator>>, push_back(), readList(), swap(), and transfer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DynamicList() [2/16]

template<class T, int SizeMin>
DynamicList ( const label initialCapacity)
inlineexplicit

Construct an empty list with given initial capacity.

Definition at line 133 of file DynamicListI.H.

References reserve_nocopy(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [3/16]

template<class T, int SizeMin>
DynamicList ( std::pair< label, label > sizing)
inlineexplicit

Construct with given size and capacity.

Definition at line 143 of file DynamicListI.H.

References UList< T >::first(), Foam::max(), UList< T >::setAddressableSize(), UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [4/16]

template<class T, int SizeMin>
DynamicList ( const label len,
const T & val )
inline

Construct with given size and value for all elements.

Definition at line 156 of file DynamicListI.H.

References UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [5/16]

template<class T, int SizeMin>
DynamicList ( const label len,
Foam::zero  )
inline

Construct with given size initializing all elements to zero.

Definition at line 168 of file DynamicListI.H.

References UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [6/16]

template<class T, int SizeMin>
DynamicList ( const DynamicList< T, SizeMin > & lst)
inline

Copy construct.

Definition at line 180 of file DynamicListI.H.

References DynamicList(), UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [7/16]

template<class T, int SizeMin>
template<int AnySizeMin>
DynamicList ( const DynamicList< T, AnySizeMin > & lst)
inline

Copy construct from DynamicList with different sizing parameters.

Definition at line 192 of file DynamicListI.H.

References DynamicList(), UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [8/16]

template<class T, int SizeMin>
DynamicList ( const UList< T > & lst)
inlineexplicit

Copy construct from UList. Size set to UList size.

Also constructs from DynamicList with different sizing parameters.

Definition at line 203 of file DynamicListI.H.

References UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [9/16]

template<class T, int SizeMin>
DynamicList ( const UList< T > & list,
const labelUList & indices )
inline

Copy construct subset of list.

Definition at line 214 of file DynamicListI.H.

References UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [10/16]

template<class T, int SizeMin>
template<unsigned N>
DynamicList ( const FixedList< T, N > & lst)
inlineexplicit

Copy construct from a FixedList.

Definition at line 227 of file DynamicListI.H.

References UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [11/16]

template<class T, int SizeMin>
DynamicList ( std::initializer_list< T > lst)
inlineexplicit

Copy construct from an initializer list. Size set to list size.

Definition at line 238 of file DynamicListI.H.

References UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ DynamicList() [12/16]

template<class T, int SizeMin>
template<class Addr>
DynamicList ( const IndirectListBase< T, Addr > & lst)
inlineexplicit

Copy construct from IndirectList. Size set to addressing size.

Definition at line 250 of file DynamicListI.H.

◆ DynamicList() [13/16]

template<class T, int SizeMin>
DynamicList ( DynamicList< T, SizeMin > && list)
inlinenoexcept

Move construct.

Definition at line 261 of file DynamicListI.H.

References DynamicList(), and Foam::noexcept.

Here is the call graph for this function:

◆ DynamicList() [14/16]

template<class T, int SizeMin>
template<int AnySizeMin>
DynamicList ( DynamicList< T, AnySizeMin > && list)
inlinenoexcept

Move construct with different sizing parameters.

Definition at line 275 of file DynamicListI.H.

◆ DynamicList() [15/16]

template<class T, int SizeMin>
DynamicList ( List< T > && list)
inlinenoexcept

Move construct from List.

Definition at line 288 of file DynamicListI.H.

References Foam::noexcept, and UList< T >::size().

Here is the call graph for this function:

◆ DynamicList() [16/16]

template<class T, int SizeMin>
DynamicList ( Istream & is)
explicit

Construct from Istream. Size set to size of list read.

Definition at line 28 of file DynamicListIO.C.

References readList(), and Foam::T().

Here is the call graph for this function:

◆ ~DynamicList()

template<class T, int SizeMin = 16>
~DynamicList ( )
inline

Destructor, sync allocated size before List destruction.

Definition at line 212 of file DynamicList.H.

Member Function Documentation

◆ min_size()

template<class T, int SizeMin = 16>
constexpr label min_size ( )
inlinestaticconstexprnoexcept

Normal lower capacity limit - the SizeMin template parameter.

Definition at line 222 of file DynamicList.H.

◆ capacity()

◆ capacity_bytes()

template<class T, int SizeMin>
std::streamsize capacity_bytes ( ) const
inlinenoexcept

Number of contiguous bytes of the underlying storage.

Note
Only meaningful for contiguous data

Definition at line 302 of file DynamicListI.H.

References Foam::noexcept, and Foam::T().

Here is the call graph for this function:

◆ setCapacity()

template<class T, int SizeMin>
void setCapacity ( const label len)
inline

Alter the size of the underlying storage.

The addressed size will be truncated if needed to fit, but will remain otherwise untouched. Use this or reserve() in combination with push_back().

Definition at line 309 of file DynamicListI.H.

Referenced by primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), hexRef8::consistentSlowRefinement(), extendedEdgeMesh::cut(), snappySnapDriver::doSnap(), primitiveMesh::faceEdges(), primitiveMesh::pointPoints(), IFstream::readContents(), CircularBuffer< T >::readList(), PatchTools::sortedPointEdges(), and extendedEdgeMesh::sortPointsAndEdges().

Here is the caller graph for this function:

◆ setCapacity_nocopy()

template<class T, int SizeMin>
void setCapacity_nocopy ( const label len)
inline

Alter the size of the underlying storage, without retaining old content.

The addressed size will be truncated if needed to fit, but will remain otherwise untouched.

Definition at line 320 of file DynamicListI.H.

◆ setCapacity_unsafe()

template<class T, int SizeMin = 16>
void setCapacity_unsafe ( label len)
inlinenoexcept

Change the value for the list capacity directly (ADVANCED, UNSAFE) Does not perform any memory management or resizing.

Definition at line 261 of file DynamicList.H.

Referenced by DynamicField< T, SizeMin >::transfer(), transfer(), and List< T >::transfer().

Here is the caller graph for this function:

◆ reserve()

template<class T, int SizeMin>
void reserve ( const label len)
inline

Reserve allocation space for at least this size, allocating new space if required and retaining old content.

Never shrinks the allocated size, use setCapacity() for that.

Definition at line 331 of file DynamicListI.H.

Referenced by fileOperation::printRanks(), STARCDedgeFormat::read(), STARCDsurfaceFormat< Face >::read(), Foam::readFields(), and Foam::readUniformFields().

Here is the caller graph for this function:

◆ reserve_nocopy()

template<class T, int SizeMin>
void reserve_nocopy ( const label len)
inline

Reserve allocation space for at least this size, allocating new space if required without retaining old content.

Never shrinks the allocated size, use setCapacity() for that.

Definition at line 342 of file DynamicListI.H.

Referenced by DynamicList().

Here is the caller graph for this function:

◆ reserve_exact()

template<class T, int SizeMin>
void reserve_exact ( const label len)
inline

Reserve allocation space for at least this size, allocating new space if required and retaining old content. If allocation is required, uses the specified size without any other resizing logic.

Definition at line 353 of file DynamicListI.H.

Referenced by surfaceFeatures::selectFeatureEdges(), and OFstreamCollator::write().

Here is the caller graph for this function:

◆ resize() [1/2]

template<class T, int SizeMin>
void resize ( const label len)
inline

Alter addressable list size, allocating new space if required while recovering old content.

If no reallocation is required, the contents remain untouched. Otherwise new entries will be uninitialized. Use this to resize the list prior to using the operator[] for setting values (as per List usage).

Definition at line 381 of file DynamicListI.H.

References resize_copy(), and UList< T >::size().

Referenced by FaceCellWave< Type, TrackingData >::handleProcPatches(), OSpanStream::OSpanStream(), primitiveMesh::pointCells(), basicThermo::printThermoNames(), IFstream::readContents(), ensightSurfaceReader::readGeometry(), CircularBuffer< T >::readList(), memorybuf::out_dynamic::release(), DynamicList< float >::setSize(), DynamicList< float >::setSize(), memorybuf::out_dynamic::swap(), lduPrimitiveMesh::upperTriOrder(), cuttingSurfaceBase::walkCellCuts(), OFstreamCollator::write(), and profiling::writeData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize() [2/2]

template<class T, int SizeMin>
void resize ( const label len,
const T & val )
inline

Alter addressable size and fill new entries with constant value.

Definition at line 428 of file DynamicListI.H.

References Foam::T().

Here is the call graph for this function:

◆ resize_copy()

template<class T, int SizeMin>
void resize_copy ( label count,
const label len )
inline

Alter addressable size, retaining the first count contents.

Note
Only uses a limited number of internal checks.

Definition at line 392 of file DynamicListI.H.

References UList< T >::setAddressableSize().

Referenced by resize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_fill()

template<class T, int SizeMin>
void resize_fill ( const label len,
const T & val )
inline

Alter addressable size and set val for all addressed entries.

Definition at line 405 of file DynamicListI.H.

References UList< T >::operator=(), resize_nocopy(), and Foam::T().

Here is the call graph for this function:

◆ resize_nocopy()

template<class T, int SizeMin>
void resize_nocopy ( const label len)
inline

Alter addressable list size, allocating new space if required without necessarily recovering old content.

If no reallocation is required, the contents remain untouched. Otherwise all entries will be uninitialized.

Definition at line 417 of file DynamicListI.H.

Referenced by Foam::meshTools::bandCompression(), Foam::broadcastFile_single(), PrimitivePatch< FaceList, PointField >::checkPointManifold(), decomposedBlockData::gatherProcData(), FaceCellWave< Type, TrackingData >::handleProcPatches(), Foam::polyMeshZipUpCells(), readList(), resize_fill(), and decomposedBlockData::writeBlocks().

Here is the caller graph for this function:

◆ clear()

template<class T, int SizeMin>
void clear ( )
inlinenoexcept

Clear the addressed list, i.e. set the size to zero.

Allocated size does not change

Definition at line 451 of file DynamicListI.H.

References Foam::noexcept, and UList< T >::setAddressableSize().

Referenced by polyMeshAdder::add(), fileRegEx::apply(), Foam::meshTools::bandCompression(), isoAdvection::boundFlux(), faceAreaWeightAMI::calcAddressing(), cutCell::calcIsoFacePointsFromEdges(), createShellMesh::calcPointRegions(), waveMethod::calculate(), cellVolumeWeightMethod::calculateAddressing(), correctedCellVolumeWeightMethod::calculateAddressing(), mapNearestMethod::calculateAddressing(), primitiveMesh::cellCells(), primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), polyTopoChange::cellZones(), obstacleGrouping::clear(), cutCellIso::clearStorage(), cutCellPLIC::clearStorage(), processorColour::colour(), hexRef8::consistentSlowRefinement(), snappySnapDriver::doSnap(), primitiveMesh::edgeCells(), primitiveMesh::edgeFaces(), ABAQUSCore::faceDecomposition(), NASCore::faceDecomposition(), primitiveMesh::faceEdges(), OppositeFaceCellWave< Type, TrackingData >::faceToCell(), polyTopoChange::faceZones(), shellSurfaces::findDirectionalLevel(), searchableBox::findLineAll(), searchableRotatedBox::findLineAll(), triSurfaceSearch::findLineAll(), PstreamBuffers::finishedSends(), decomposedBlockData::gatherProcData(), coordSetWriter::getBufferLine(), cellDistFuncs::getPointNeighbours(), addPatchCellLayer::globalEdgeFaces(), csvTableReader< Type >::operator()(), OppositeFaceCellWave< Type, TrackingData >::opposingFaceLabels(), primitiveMesh::pointCells(), primitiveMesh::pointPoints(), polyTopoChange::pointZones(), Foam::blockMeshTools::read(), NASsurfaceFormat< Face >::read(), OBJsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), STARCDsurfaceFormat< Face >::read(), IFstream::readContents(), readList(), Foam::readObjVertices(), STARCDCore::readPoints(), OTstream::reset(), faceAreaWeightAMI::restartUncoveredSourceFace(), Reaction< ReactionThermo >::setLRhs(), boundaryCutter::setRefinement(), propellerInfo::setSampleDiskGeometry(), searchableSurfacesQueries::signedDistance(), PatchTools::sortedPointEdges(), MeshedSurface< Face >::sortFacesAndStore(), patchInjectionBase::updateMesh(), distributedDILUPreconditioner::wait(), UPstream::waitSomeRequests(), UPstream::waitSomeRequests(), cuttingSurfaceBase::walkCellCuts(), processorColour::walkFront(), ZoneMesh< ZoneType, MeshType >::whichZones(), and externalCoupled::writeGeometry().

Here is the call graph for this function:

◆ clearStorage()

template<class T, int SizeMin>
void clearStorage ( )
inline

Clear the list and delete storage.

Definition at line 458 of file DynamicListI.H.

References UList< T >::cdata(), List< T >::clear(), UList< T >::empty(), and UList< T >::setAddressableSize().

Referenced by isoSurfaceTopo::isoSurfaceTopo(), Foam::operator>>(), NASedgeFormat::read(), NASsurfaceFormat< Face >::read(), readList(), and memorybuf::out_dynamic::release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shrink_to_fit()

template<class T, int SizeMin>
void shrink_to_fit ( )
inline

Shrink the allocated space to the number of elements used.

Definition at line 471 of file DynamicListI.H.

References List< T >::resize(), UList< T >::setAddressableSize(), and UList< T >::size().

Referenced by DynamicList< float >::shrink(), and List< T >::transfer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap() [1/2]

template<class T, int SizeMin>
void swap ( List< T > & other)
inline

Swap with plain List content. Implies shrink_to_fit().

Definition at line 485 of file DynamicListI.H.

Referenced by Foam::Swap(), memorybuf::in_dynamic::swap(), and memorybuf::out_dynamic::swap().

Here is the caller graph for this function:

◆ swap() [2/2]

template<class T, int SizeMin>
template<int AnySizeMin>
void swap ( DynamicList< T, AnySizeMin > & other)
inlinenoexcept

Swap content, independent of sizing parameter.

Definition at line 512 of file DynamicListI.H.

References DynamicList(), FOAM_UNLIKELY, and UList< T >::swap().

Here is the call graph for this function:

◆ transfer() [1/2]

template<class T, int SizeMin>
void transfer ( List< T > & list)
inline

Transfer contents of the argument List into this.

Definition at line 539 of file DynamicListI.H.

References UList< T >::setAddressableSize(), UList< T >::size(), and List< T >::transfer().

Referenced by refinementHistory::compact(), operator=(), operator=(), operator=(), readList(), dynamicIndexedOctree< Type >::removeIndex(), and hexRef8::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transfer() [2/2]

template<class T, int SizeMin>
template<int AnySizeMin>
void transfer ( DynamicList< T, AnySizeMin > & list)
inline

Transfer contents of any DynamicList into this.

Definition at line 553 of file DynamicListI.H.

References capacity(), DynamicList(), FOAM_UNLIKELY, UList< T >::setAddressableSize(), setCapacity_unsafe(), and List< T >::transfer().

Here is the call graph for this function:

◆ emplace_back()

template<class T, int SizeMin>
template<class... Args>
T & emplace_back ( Args &&... args)
inline

◆ push_back() [1/8]

template<class T, int SizeMin>
void push_back ( const T & val)
inline

Copy append an element to the end of this list.

Definition at line 598 of file DynamicListI.H.

References UList< T >::operator[](), resize(), UList< T >::size(), and Foam::T().

Referenced by cellTable::addCellZones(), topOVariablesBase::addCuttingFaceToIsoline(), cellZoneSet::addSet(), pointZoneSet::addSet(), regIOobject::addWatch(), masterUncollatedFileOperation::addWatches(), DynamicList< float >::append(), DynamicList< float >::append(), DynamicList< float >::append(), DynamicList< float >::append(), DynamicList< float >::append(), DynamicList< float >::append(), DynamicList< float >::append(), DynamicList< float >::append(), directMethod::appendToDirectSeeds(), setToCellZone::applyToSet(), setToPointZone::applyToSet(), Foam::meshTools::bandCompression(), AMIInterpolation::calcDistribution(), cellVolumeWeightMethod::calculateAddressing(), correctedCellVolumeWeightMethod::calculateAddressing(), primitiveMesh::cellCells(), primitiveMesh::cellEdges(), primitiveMesh::cellPoints(), polyTopoChange::cellZones(), designVariablesUpdate::computeMeritFunction(), hexRef8::consistentSlowRefinement(), AABBTree< Type >::createBoxes(), mapDistributeBase::distribute(), mapDistributeBase::distribute(), mapDistributeBase::distribute(), primitiveMesh::edgeCells(), ifeqEntry::execute(), ifeqEntry::execute(), primitiveMesh::faceEdges(), topOVariablesBase::faceFaces(), polyTopoChange::faceZones(), mapNearestMethod::findMappedSrcCell(), mapNearestMethod::findNearestCell(), PstreamBuffers::finishedSends(), volBSplinesBase::getAllControlPoints(), fileOperation::getGlobalHostIORanks(), Foam::getSelectedProcs(), polyBoundaryMesh::matchGroups(), processorTopology::New(), csvTableReader< Type >::operator()(), OppositeFaceCellWave< Type, TrackingData >::opposingFaceLabels(), foamReport::parseTemplate(), primitiveMesh::pointCells(), primitiveMesh::pointPoints(), polyTopoChange::pointZones(), fileOperation::printRanks(), Foam::printRootsSubscription(), faceAreaWeightAMI::processSourceFace(), push_uniq(), NASedgeFormat::read(), NASsurfaceFormat< Face >::read(), OBJsurfaceFormat< Face >::read(), masterUncollatedFileOperation::read(), fieldAverage::read(), ensightSurfaceReader::readCase(), Foam::readFields(), Foam::readObjVertices(), Foam::readUniformFields(), mapDistributeBase::receive(), dynamicIndexedOctree< Type >::removeIndex(), dynamicCode::resolveTemplates(), AMICache::restoreCache(), Reaction< ReactionThermo >::setLRhs(), Foam::simpleTree(), streamLineBase::storePoint(), cellZoneSet::subset(), pointZoneSet::subset(), topoSet::subset(), cellZoneSet::subtractSet(), cellZoneSet::subtractSet(), pointZoneSet::subtractSet(), pointZoneSet::subtractSet(), nullSpace::updateCorrectionIndices(), designVariablesUpdate::updateGradientsAndValues(), cellZoneSet::updateMesh(), faceZoneSet::updateMesh(), pointZoneSet::updateMesh(), nullSpace::updateViolatedIndices(), ZoneMesh< ZoneType, MeshType >::whichZones(), OFstreamCollator::write(), OTstream::write(), and topOVariablesBase::writeFluidSolidInterface().

Here is the call graph for this function:

◆ push_back() [2/8]

template<class T, int SizeMin>
void push_back ( T && val)
inline

Move append an element.

Definition at line 611 of file DynamicListI.H.

References UList< T >::operator[](), resize(), UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ push_back() [3/8]

template<class T, int SizeMin>
void push_back ( const UList< T > & list)
inline

Copy append another list to the end of this list.

Definition at line 624 of file DynamicListI.H.

References Foam::abort(), UList< T >::begin(), UList< T >::end(), Foam::FatalError, FatalErrorInFunction, FOAM_UNLIKELY, resize(), UList< T >::size(), and UList< T >::size().

Here is the call graph for this function:

◆ push_back() [4/8]

template<class T, int SizeMin>
template<unsigned N>
void push_back ( const FixedList< T, N > & list)
inline

Copy append a FixedList to the end of this list.

Definition at line 652 of file DynamicListI.H.

References FixedList< T, N >::begin(), UList< T >::begin(), FixedList< T, N >::end(), resize(), FixedList< T, N >::size(), and UList< T >::size().

Here is the call graph for this function:

◆ push_back() [5/8]

template<class T, int SizeMin>
void push_back ( std::initializer_list< T > list)
inline

Copy append an initializer list at the end of this list.

Definition at line 665 of file DynamicListI.H.

References resize(), and UList< T >::size().

Here is the call graph for this function:

◆ push_back() [6/8]

template<class T, int SizeMin>
template<class Addr>
void push_back ( const IndirectListBase< T, Addr > & lst)
inline

Copy append an IndirectList at the end of this list.

Definition at line 679 of file DynamicListI.H.

References UList< T >::begin(), n, resize(), IndirectListBase< T, Addr >::size(), and UList< T >::size().

Here is the call graph for this function:

◆ push_back() [7/8]

template<class T, int SizeMin>
void push_back ( List< T > && list)
inline

Move append another list to the end of this list.

Definition at line 702 of file DynamicListI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, FOAM_UNLIKELY, resize(), and UList< T >::size().

Here is the call graph for this function:

◆ push_back() [8/8]

template<class T, int SizeMin>
template<int AnySizeMin>
void push_back ( DynamicList< T, AnySizeMin > && list)
inline

Move append list.

Definition at line 733 of file DynamicListI.H.

References Foam::abort(), DynamicList(), Foam::FatalError, FatalErrorInFunction, FOAM_UNLIKELY, resize(), and UList< T >::size().

Here is the call graph for this function:

◆ push_uniq()

template<class T, int SizeMin>
Foam::label push_uniq ( const T & val)
inline

Append an element if not already in the list.

Returns
the change in list length

Definition at line 763 of file DynamicListI.H.

References UList< T >::contains(), push_back(), and Foam::T().

Referenced by meshToMeshMethod::appendNbrCells(), DynamicList< float >::appendUniq(), polyTopoChange::cellZones(), snappySnapDriver::doSnap(), cellDistFuncs::getPointNeighbours(), polyTopoChange::pointZones(), syncTools::syncBoundaryFaceList(), syncTools::syncEdgeMap(), syncTools::syncPointMap(), and ZoneMesh< ZoneType, MeshType >::whichZones().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pop_back()

template<class T, int SizeMin>
void pop_back ( label n = 1)
inline

◆ remove() [1/4]

template<class T, int SizeMin>
T remove ( )
inline

Remove and return the last element. Fatal on an empty list.

Definition at line 792 of file DynamicListI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, UList< T >::operator[](), UList< T >::setAddressableSize(), UList< T >::size(), and Foam::T().

Referenced by remove(), and outletMappedUniformInletFvPatchField< Type >::updateCoeffs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [2/4]

template<class T, int SizeMin>
T remove ( const label idx,
const bool fast = false )
inline

Remove and return the specified element. Fatal on an empty list.

With fast=true (operates in constant time), the place of the removed element is swapped with the last one in the list, which changes the ordering. With fast=false (operates in linear time), the elements are swapped down in the list to preserve ordering.

Definition at line 812 of file DynamicListI.H.

References UList< T >::moveLast(), remove(), UList< T >::swapLast(), and Foam::T().

Here is the call graph for this function:

◆ remove() [3/4]

template<class T, int SizeMin>
Foam::label remove ( const labelRange & range)
inline

Remove a (start,size) subset from the list.

The range is subsetted with the list size itself to ensure result always addresses a valid section of the list. Remaining elements are moved down.

Definition at line 835 of file DynamicListI.H.

References range, and UList< T >::validateRange().

Here is the call graph for this function:

◆ remove() [4/4]

template<class T, int SizeMin>
Foam::label remove ( std::initializer_list< label > start_size)
inline

Remove a (start,size) subset from the list.

Definition at line 845 of file DynamicListI.H.

References UList< T >::validateRange().

Here is the call graph for this function:

◆ subset() [1/2]

template<class T, int SizeMin>
Foam::label subset ( const labelRange & range)
inline

Retain a (start,size) subset from the list.

The range is subsetted with the list size itself to ensure result always addresses a valid section of the list.

Definition at line 855 of file DynamicListI.H.

References range, and UList< T >::validateRange().

Here is the call graph for this function:

◆ subset() [2/2]

template<class T, int SizeMin>
Foam::label subset ( std::initializer_list< label > start_size)
inline

Retain a (start,size) subset from List.

Definition at line 865 of file DynamicListI.H.

References UList< T >::validateRange().

Here is the call graph for this function:

◆ operator()()

template<class T, int SizeMin>
T & operator() ( const label i)
inline

Return non-const access to an element, resizing list if needed.

Definition at line 877 of file DynamicListI.H.

References UList< T >::operator[](), resize(), UList< T >::size(), and Foam::T().

Here is the call graph for this function:

◆ operator=() [1/11]

template<class T, int SizeMin>
void operator= ( const T & val)
inline

Assign addressed entries to the given value.

Definition at line 892 of file DynamicListI.H.

References operator, UList< T >::operator=(), and Foam::T().

Here is the call graph for this function:

◆ operator=() [2/11]

template<class T, int SizeMin>
void operator= ( Foam::zero )
inline

Assign addressed entries to zero.

Definition at line 902 of file DynamicListI.H.

References operator, and UList< T >::operator=().

Here is the call graph for this function:

◆ operator=() [3/11]

template<class T, int SizeMin>
void operator= ( const UList< T > & lst)
inline

Assignment to UList.

Definition at line 912 of file DynamicListI.H.

References operator.

Here is the call graph for this function:

◆ operator=() [4/11]

template<class T, int SizeMin>
template<unsigned N>
void operator= ( const FixedList< T, N > & lst)
inline

Assignment to FixedList.

Definition at line 923 of file DynamicListI.H.

References operator.

Here is the call graph for this function:

◆ operator=() [5/11]

template<class T, int SizeMin>
void operator= ( const DynamicList< T, SizeMin > & lst)
inline

Assignment to DynamicList.

Definition at line 933 of file DynamicListI.H.

References DynamicList(), FOAM_UNLIKELY, and operator.

Here is the call graph for this function:

◆ operator=() [6/11]

template<class T, int SizeMin>
template<int AnySizeMin>
void operator= ( const DynamicList< T, AnySizeMin > & lst)
inline

Assignment from DynamicList with different sizing parameters.

Definition at line 956 of file DynamicListI.H.

References DynamicList(), FOAM_UNLIKELY, and operator.

Here is the call graph for this function:

◆ operator=() [7/11]

template<class T, int SizeMin>
void operator= ( std::initializer_list< T > lst)
inline

Assignment from initializer list.

Definition at line 978 of file DynamicListI.H.

References operator.

Here is the call graph for this function:

◆ operator=() [8/11]

template<class T, int SizeMin>
template<class Addr>
void operator= ( const IndirectListBase< T, Addr > & lst)
inline

Assignment from IndirectList.

Definition at line 989 of file DynamicListI.H.

References operator.

Here is the call graph for this function:

◆ operator=() [9/11]

template<class T, int SizeMin>
void operator= ( List< T > && lst)
inline

Move assignment.

Definition at line 1010 of file DynamicListI.H.

References operator, and transfer().

Here is the call graph for this function:

◆ operator=() [10/11]

template<class T, int SizeMin>
void operator= ( DynamicList< T, SizeMin > && lst)
inline

Move assignment.

Definition at line 1020 of file DynamicListI.H.

References DynamicList(), operator, and transfer().

Here is the call graph for this function:

◆ operator=() [11/11]

template<class T, int SizeMin>
template<int AnySizeMin>
void operator= ( DynamicList< T, AnySizeMin > && lst)
inline

Move assignment.

Definition at line 1031 of file DynamicListI.H.

References DynamicList(), operator, and transfer().

Here is the call graph for this function:

◆ readList()

◆ setSize() [1/2]

◆ setSize() [2/2]

template<class T, int SizeMin = 16>
void setSize ( const label n,
const T & val )
inline

Alias for resize().

Definition at line 581 of file DynamicList.H.

◆ shrink()

◆ append() [1/8]

template<class T, int SizeMin = 16>
void append ( const T & val)
inline

Copy append an element to the end of this list.

FOAM_DEPRECATED_FOR(2022-10, "push_back()")

Definition at line 599 of file DynamicList.H.

Referenced by abaqusMeshSet::abaqusMeshSet(), ISAT< CompType, ThermoType >::add(), extendedEdgeMesh::add(), polyMeshAdder::add(), topOVariablesBase::addCuttingFaceToIsoline(), topOZones::addIOcellsZone(), polyTopoChange::addMesh(), fileOperation::addWatches(), decompositionGAMGAgglomeration::agglomerate(), extendedEdgeMesh::allNearestFeatureEdges(), extendedEdgeMesh::allNearestFeaturePoints(), advancingFrontAMI::appendNbrFaces(), Foam::appendTriLabels(), fileRegEx::apply(), cellToFaceZone::applyToSet(), faceZoneToFaceZone::applyToSet(), normalToFace::applyToSet(), searchableSurfaceToFaceZone::applyToSet(), setAndNormalToFaceZone::applyToSet(), setsToFaceZone::applyToSet(), setToFaceZone::applyToSet(), extendedEdgeMesh::autoMap(), PDRblock::blockMeshDict(), isoAdvection::boundFlux(), faceAreaWeightAMI::calcAddressing(), holeToFace::calcClosure(), enrichedPatch::calcEnrichedFaces(), polyDualMesh::calcFeatures(), cutCell::calcIsoFacePointsFromEdges(), mappedPatchBase::calcMapping(), faPatch::calcPointLabels(), createShellMesh::calcPointRegions(), cutFace::calcSubFace(), cutFace::calcSubFace(), cutFace::calcSubFace(), valueAverageBase::calculate(), viewFactor::calculate(), waveMethod::calculate(), mapNearestMethod::calculateAddressing(), calculatedProcessorGAMGInterface::calculatedProcessorGAMGInterface(), polyMeshTetDecomposition::cellTetIndices(), edgeCollapser::checkBadFaces(), refinementHistory::clone(), collectLibsCallback(), processorColour::colour(), triSurface::compactPoints(), removeFaces::compatibleRemoves(), hexRef8::consistentSlowRefinement(), hexRef8::consistentSlowRefinement2(), patchPatchDist::correct(), wallDistAddressing::correct(), epsilonWallFunctionFvPatchScalarField::createAveragingWeights(), omegaWallFunctionFvPatchScalarField::createAveragingWeights(), curvatureSeparation::curvatureSeparation(), extendedEdgeMesh::cut(), geomCellLooper::cut(), cyclicACMIGAMGInterface::cyclicACMIGAMGInterface(), cyclicACMIGAMGInterface::cyclicACMIGAMGInterface(), cyclicAMIGAMGInterface::cyclicAMIGAMGInterface(), cyclicAMIGAMGInterface::cyclicAMIGAMGInterface(), cyclicGAMGInterface::cyclicGAMGInterface(), refinementHistory::distribute(), Foam::dlLoaded(), snappySnapDriver::doSnap(), snappyLayerDriver::dupFaceZonePoints(), primitiveMesh::edgeFaces(), edgeSurface::edgeSurface(), ddt2::execute(), runTimeControl::execute(), zeroGradient::execute(), extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil(), extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil(), boundaryRadiationProperties::faceZoneIds(), pointMeshTools::featurePointsEdges(), pointNoise::filterTimeData(), shellSurfaces::findDirectionalLevel(), localPointRegion::findDuplicateFacePairs(), searchableBox::findLineAll(), searchableRotatedBox::findLineAll(), triSurfaceSearch::findLineAll(), mappedPatchBase::findSamples(), isoSurfacePoint::generateFaceTriPoints(), coordSetWriter::getBufferLine(), removeCells::getExposedFaces(), externalDisplacementMeshMover::getFixedValueBCs(), combineFaces::getMergeSets(), boundaryMesh::getNearest(), cellDistFuncs::getPointNeighbours(), undoableMeshCutter::getSplitFaces(), distributedTriSurfaceMesh::getVolumeType(), addPatchCellLayer::globalEdgeFaces(), triSurfaceTools::greenRefine(), chemPointISAT< CompType, ThermoType >::grow(), inverseDistance::holeExtrapolationStencil(), viewFactor::initialise(), fluxSummary::initialiseCellZoneAndDirection(), fluxSummary::initialiseFaceZone(), fluxSummary::initialiseFaceZoneAndDirection(), fluxSummary::initialiseSurface(), fluxSummary::initialiseSurfaceAndDirection(), meshSearch::intersections(), meshRefinement::mapBaffles(), snappyLayerDriver::mapFaceZonePoints(), inverseDistance::markDonors(), trackingInverseDistance::markDonors(), PatchTools::markZone(), triSurface::markZone(), momentOfInertia::massPropertiesPatch(), meshRefinement::mergePatchFacesUndo(), meshRefinement::mergeZoneBaffles(), chemistryReductionMethod< CompType, ThermoType >::New(), chemistryTabulationMethod< CompType, ThermoType >::New(), combustionModel::New(), fvMeshTools::newMesh(), faceShading::nonCoupledPatches(), properties::objectResultEntries(), noiseFFT::octaveBandInfo(), listOp< N >::result::operator+(), oversetGAMGInterface::oversetGAMGInterface(), sampledPatch::patchIDs(), lumpedPointDisplacementPointPatchVectorField::patchIds(), patchInteractionDataList::patchInteractionDataList(), processorGAMGInterface::processorGAMGInterface(), faceAreaWeightAMI::processSourceFace(), binModel::read(), ABAQUSsurfaceFormat< Face >::read(), AC3DsurfaceFormat< Face >::read(), OBJedgeFormat::read(), OBJsurfaceFormat< Face >::read(), OFFsurfaceFormat< Face >::read(), STARCDedgeFormat::read(), STARCDsurfaceFormat< Face >::read(), VTKsurfaceFormat< Face >::read(), solutionControl::read(), STARCDCore::readPoints(), FIREMeshReader::readSelections(), DAC< CompType, ThermoType >::reduceMechanism(), DRG< CompType, ThermoType >::reduceMechanism(), DRGEP< CompType, ThermoType >::reduceMechanism(), PFA< CompType, ThermoType >::reduceMechanism(), box::refineBox(), box::refineBox(), edgeMesh::regions(), searchableSurfaceCollection::regions(), regionSplit2D::regionSplit2D(), fvMeshSubset::reset(), triSurfaceLoader::select(), surfaceFeatures::selectFeatureEdges(), dynamicRefineFvMesh::selectRefineCells(), dynamicRefineFvMesh::selectUnrefinePoints(), boundaryMesh::setFeatureEdges(), noiseModel::setOctaveBands(), box::setRefineFlags(), boundaryCutter::setRefinement(), faceCollapser::setRefinement(), hexRef8::setRefinement(), propellerInfo::setSampleDiskGeometry(), shortestPathSet::shortestPathSet(), searchableSurfacesQueries::signedDistance(), Foam::fvc::smooth(), PatchTools::sortedPointEdges(), extendedEdgeMesh::sortPointsAndEdges(), meshRefinement::splitFacesUndo(), meshRefinement::splitMeshRegions(), Foam::fvc::spread(), faceAreaWeightAMI2D::storeInterArea(), meshRefinement::subsetBaffles(), reconstructionSchemes::surface(), surfaceFeatures::surfaceFeatures(), surfaceIntersection::surfaceIntersection(), Foam::fvc::sweep(), faceZoneSet::sync(), cutFaceAdvect::timeIntegratedArea(), cutFaceAdvect::timeIntegratedArea(), faceAreaIntersect::triangleFan(), refinementParameters::unzonedLocations(), CollisionRecordList< PairType, WallType >::update(), outletMappedUniformInletFvPatchField< Type >::updateCoeffs(), externalDisplacementMeshMover::updateMesh(), probeModel::updateMesh(), propellerInfo::updateSampleDiskCells(), cuttingSurfaceBase::walkCellCuts(), cellCellStencil::walkFront(), processorColour::walkFront(), wallLayerCells::wallLayerCells(), WallLocalSpringSliderDashpot< CloudType >::WallLocalSpringSliderDashpot(), ParticleZoneInfo< CloudType >::write(), csvWriter::writeBuffered(), externalCoupled::writeGeometry(), refinementParameters::zonedLocations(), and refinementParameters::zonePoints().

◆ append() [2/8]

template<class T, int SizeMin = 16>
void append ( T && val)
inline

Move append an element.

FOAM_DEPRECATED_FOR(2022-10, "push_back()")

Definition at line 606 of file DynamicList.H.

◆ append() [3/8]

template<class T, int SizeMin = 16>
void append ( const UList< T > & list)
inline

Append another list to the end of this list.

Definition at line 611 of file DynamicList.H.

◆ append() [4/8]

template<class T, int SizeMin = 16>
template<unsigned N>
void append ( const FixedList< T, N > & list)
inline

Append a FixedList to the end of this list.

FOAM_DEPRECATED_FOR(2022-10, "push_back()")

Definition at line 619 of file DynamicList.H.

◆ append() [5/8]

template<class T, int SizeMin = 16>
void append ( std::initializer_list< T > list)
inline

Append an initializer list at the end of this list.

FOAM_DEPRECATED_FOR(2022-10, "push_back()")

Definition at line 626 of file DynamicList.H.

◆ append() [6/8]

template<class T, int SizeMin = 16>
template<class Addr>
void append ( const IndirectListBase< T, Addr > & list)
inline

Append a IndirectList at the end of this list.

Definition at line 632 of file DynamicList.H.

◆ append() [7/8]

template<class T, int SizeMin = 16>
void append ( List< T > && list)
inline

Move append list.

FOAM_DEPRECATED_FOR(2022-10, "push_back()")

Definition at line 642 of file DynamicList.H.

◆ append() [8/8]

template<class T, int SizeMin = 16>
template<int AnySizeMin>
void append ( DynamicList< T, AnySizeMin > && list)
inline

Move append list.

Definition at line 648 of file DynamicList.H.

◆ appendUniq()

template<class T, int SizeMin = 16>
label appendUniq ( const T & val)
inline

Same as push_uniq().

Definition at line 657 of file DynamicList.H.

◆ operator>>

template<class T, int SizeMin = 16>
Istream & operator>> ( Istream & is,
DynamicList< T, SizeMin > & list )
friend

Use the readList() method to read contents from Istream.

Definition at line 667 of file DynamicList.H.

References DynamicList(), and readList().

◆ operator

template<class T, int SizeMin = 16>
Ostream & operator ( Ostream & os,
const DynamicList< T, SizeMin > & list )
friend

The documentation for this class was generated from the following files: