Go to the documentation of this file.
37 this->v_ =
new T[this->size_];
45 if (this->size_ != len)
58 const label len = this->size_;
60 for (label i=0; i<len; ++i)
62 this->operator[](i) = list[i];
68 template<
class InputIterator>
71 InputIterator begIter,
72 InputIterator endIter,
76 UList<
T>(nullptr, len)
82 InputIterator iter = begIter;
83 for (label i = 0; i < len; ++i)
85 this->operator[](i) = *iter;
111 return NullObjectRef<List<T>>();
133 this->
resize(newLen,
false);
155 label
n = this->size();
177 const label idx = this->size();
180 this->operator[](idx) = val;
187 const label idx = this->size();
190 this->operator[](idx) = std::move(val);
203 label idx = this->size();
204 const label
n = list.
size();
208 for (label i=0; i<
n; ++i)
210 this->operator[](idx++) = list[i];
219 label idx = this->size();
220 const label
n = list.
size();
224 for (label i=0; i<
n; ++i)
226 this->operator[](idx++) = list[i];
234 if (this->
found(val))
T & newElmt(const label i)
static const List< T > & null()
Return a null List.
void resize(const label len)
Adjust allocated size of list.
static constexpr const zero Zero
Global zero (0)
void append(const T &val)
Append an element at the end of the list.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
patchWriters resize(patchIds.size())
void operator=(const UList< T > &a)
Assignment to UList operator. Takes linear time.
label appendUniq(const T &val)
Append an element if not already in the list.
label size() const noexcept
The number of elements in the list.
errorManip< error > abort(error &err)
constexpr List() noexcept
Default construct.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#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...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void clear()
Clear the list, i.e. set size to zero.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
void size(const label n)
Older name for setAddressableSize.
autoPtr< List< T > > clone() const
Clone.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...