A List obtained as a section of another List. More...
Public Member Functions | |
SubList (const SubList &)=default | |
Copy construct. More... | |
SubList (const UList< T > &list) | |
Construct from UList, 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. More... | |
void | operator= (const UList< T > &list) |
Copy assign entries from given list. 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.
Construct from UList, the entire size.
Definition at line 33 of file SubListI.H.
Construct from UList and sub-list size, start at 0.
Definition at line 43 of file SubListI.H.
References UList< T >::checkSize().
Construct from UList, sub-list size and start index.
Definition at line 58 of file SubListI.H.
References UList< T >::checkSize(), and UList< T >::checkStart().
|
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 86 of file SubListI.H.
|
inline |
Construct from UList and a (start,size) range, but bypassing run-time range checking.
Definition at line 97 of file SubListI.H.
|
inlinestatic |
Return a null SubList.
Definition at line 109 of file SubListI.H.
|
inline |
Allow cast to a const List<T>&.
Definition at line 118 of file SubListI.H.
Copy assign entries from given sub-list.
Definition at line 125 of file SubListI.H.
Copy assign entries from given list.
Definition at line 132 of file SubListI.H.
|
inline |
Assign all entries to the given value.
Definition at line 139 of file SubListI.H.
|
inline |