40 List<
T*>(len, static_cast<
T*>(nullptr))
60 List<
T*>(static_cast<const List<
T*>&>(list))
70 List<
T*>(std::move(static_cast<List<
T*>&>(list)))
81 List<
T*>(static_cast<List<
T*>&>(list), reuse)
90 return (i >= 0 && i < this->
size()) ? (*this)[i] :
nullptr;
97 return (i >= 0 && i < this->
size()) ? (*this)[i] :
nullptr;
144 const label idx = this->find_first_not();
149 <<
"Element " << idx <<
" is null" <<
nl
160 const PtrListDetail<T>& list
A rudimentary list of pointers used for PtrList, UPtrList, etc. This class is considered implementati...
void operator=(const PtrListDetail< T > &list)
Copy assignment (shallow copies addresses).
label find_first_not() const
Locate the first entry that is null, -1 if there are none (or empty list).
const T * get(const label i) const
Return const pointer to element or nullptr for out-of-range access.
void resize_null(const label newLen)
Set the list to the given size and set all entries to nullptr.
void checkNonNull() const
FatalError if any null exists in the list.
constexpr PtrListDetail() noexcept
Default construct.
void setAddressableSize(const label n) noexcept
Set addressed size to be inconsistent with allocated storage.
void resize(const label newLen)
Reset size of list.
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void operator=(const UList< T > &list)
Assignment to UList operator. Takes linear time.
void resize(const label len)
Adjust allocated size of list.
void clear()
Clear the list, i.e. set size to zero.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
UList(const UList< T > &) noexcept=default
Copy construct, shallow copy.
void size(const label n)
Older name for setAddressableSize.
void setAddressableSize(const label n) noexcept
Set addressed size to be inconsistent with allocated storage.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
constexpr char nl
The newline '\n' character (0x0a).