37 for (
const T* ptr : *
this)
52 return this->find_next(-1);
59 return this->find_next_not(-1);
66 const label len = this->size();
84 const label len = this->size();
103 const label len = ptrs.
size();
106 for (label i = len - 1; i >= 0; --i)
115 template<
class... Args>
120 const label len = ptrs.
size();
122 PtrListDetail<T> cloned(len);
124 for (label i = 0; i < len; ++i)
126 const T* ptr = ptrs[i];
130 cloned[i] = ptr->
clone(std::forward<Args>(
args)...).ptr();
void size(const label n)
Older name for setAddressableSize.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label find_first_not() const
Locate the first entry that is null, -1 if there are none (or empty list)
A rudimentary list of pointers used for PtrList, UPtrList, etc. This class is considered implementati...
dimensionedScalar pos(const dimensionedScalar &ds)
label count_nonnull() const noexcept
The number of non-nullptr entries in the list.
label find_next_not(label pos) const
Locate the next null entry, starting one beyond the specified position.
label find_first() const
Locate the first entry that is non-null.
autoPtr< List< T * > > clone() const
Clone.
void free()
Delete allocated entries and reassign to nullptr. Does not affect the list size.
Foam::argList args(argc, argv)
label find_next(label pos) const
Locate the next non-null entry, starting one beyond the specified position.