28 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
35 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
49 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
61 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
72 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
79 capacity_(lst.capacity_)
85 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
96 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
103 capacity_(lst.
size())
107 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
120 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
128 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
137 if (nextFree > capacity_)
140 nextFree = capacity_;
150 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
157 if (nElem > capacity_)
162 label(SizeInc + capacity_ * SizeMult / SizeDiv)
173 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
180 if (nElem > capacity_)
185 label(SizeInc + capacity_ * SizeMult / SizeDiv)
196 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
207 while (nextFree < nElem)
209 this->operator[](nextFree++) = t;
214 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
224 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
235 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
242 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
250 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
255 if (capacity_ > nextFree)
261 capacity_ = nextFree;
269 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
277 capacity_ = lst.capacity_;
283 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
288 capacity_ = lst.
size();
293 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
303 this->operator[](elemI) = t;
308 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
326 this->operator[](nextFree++) = lst[elemI];
332 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
344 this->operator[](nextFree++) = lst[elemI];
350 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
371 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
382 return this->operator[](elemI);
386 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
387 inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
396 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
397 inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
408 if (capacity_ >= lst.
size())
425 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
426 inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
438 capacity_ = lst.capacity_;
443 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
444 inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
460 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
461 inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
466 if (capacity_ >= lst.
size())
483 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
484 inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
489 if (capacity_ >= lst.
size())
508 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
518 if (iter != this->end())
522 while (iter != this->end())
524 *nextIter++ = *iter++;
527 this->
setSize(this->size() - 1);
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void resize(const label)
Alter the addressed list size.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
UList< T >::iterator erase(typename UList< T >::iterator)
Erase an element, move the remaining elements to fill the gap.
void size(const label)
Override size to be inconsistent with allocated storage.
T * iterator
Random access iterator for traversing UList.
void reserve(const label)
Reserve allocation space for at least this size.
points setSize(newPointi)
void setSize(const label)
Alter the addressed list size.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
DynamicList()
Construct null.
label size() const
Return the number of elements in the list.
void setCapacity(const label)
Alter the size of the underlying storage.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
T remove()
Remove and return the top element.
A List with indirect addressing.
void clearStorage()
Clear the list and delete storage.
label capacity() const
Size of the underlying storage.
label size() const
Return the number of elements in the UList.
void clear()
Clear the addressed list, i.e. set the size to zero.
void transfer(List< T > &)
Transfer contents of the argument List into this.
friend Ostream & operator(Ostream &, const DynamicList< T, SizeInc, SizeMult, SizeDiv > &)