A List obtained as a section of another List. More...
Public Member Functions | |
SubList () noexcept=default | |
Default construct, zero-sized and nullptr. More... | |
SubList (const SubList &) noexcept=default | |
Copy construct, shallow copy. More... | |
SubList (const UList< T > &list) | |
Construct from UList, the entire size. More... | |
template<unsigned N> | |
SubList (const FixedList< T, N > &list) | |
Construct from FixedList, the entire size. More... | |
SubList (const UList< T > &list, const label subSize) | |
Construct from UList and sub-list size, start at 0. More... | |
SubList (const UList< T > &list, const label subSize, const label startIndex) | |
Construct from UList, sub-list size and start index. More... | |
SubList (const UList< T > &list, const labelRange &range) | |
Construct from UList and a (start,size) range. More... | |
SubList (const labelRange &range, const UList< T > &list) | |
operator const Foam::List< T > & () const | |
Allow cast to a const List<T>&. More... | |
void | operator= (const SubList< T > &list) |
Copy assign entries from given sub-list. Sizes must match! More... | |
void | operator= (const UList< T > &list) |
Copy assign entries from given list. Sizes must match! More... | |
template<class Addr > | |
void | operator= (const IndirectListBase< T, Addr > &list) |
Copy assign entries from given indirect list. Sizes must match! More... | |
void | operator= (const T &val) |
Assign all entries to the given value. More... | |
void | operator= (const Foam::zero) |
Assign all entries to zero. More... | |
Static Public Member Functions | |
static const SubList< T > & | null () |
Return a null SubList. More... | |
A List obtained as a section of another List.
Since the SubList is itself unallocated, no storage is allocated or de-allocated during its use. To achieve this behaviour, SubList is derived from UList rather than List.
|
defaultnoexcept |
Default construct, zero-sized and nullptr.
Construct from UList, the entire size.
Definition at line 33 of file SubListI.H.
Construct from FixedList, the entire size.
Definition at line 44 of file SubListI.H.
Construct from UList and sub-list size, start at 0.
Definition at line 54 of file SubListI.H.
References UList< T >::checkSize().
Construct from UList, sub-list size and start index.
Definition at line 69 of file SubListI.H.
References UList< T >::checkRange().
|
inline |
Construct from UList and a (start,size) range.
The range is subsetted with the list size itself to ensure that the result always addresses a valid section of the list.
Definition at line 85 of file SubListI.H.
References UList< T >::checkRange(), and range.
|
inline |
Construct from UList and a (start,size) range, but bypassing run-time range checking.
Definition at line 102 of file SubListI.H.
|
inlinestatic |
Return a null SubList.
Definition at line 114 of file SubListI.H.
|
inline |
Allow cast to a const List<T>&.
Definition at line 123 of file SubListI.H.
Copy assign entries from given sub-list. Sizes must match!
Definition at line 130 of file SubListI.H.
Copy assign entries from given list. Sizes must match!
Definition at line 137 of file SubListI.H.
|
inline |
Copy assign entries from given indirect list. Sizes must match!
Definition at line 145 of file SubListI.H.
|
inline |
Assign all entries to the given value.
Definition at line 152 of file SubListI.H.
|
inline |