33 this->v_ =
new T[this->size_];
58 this->operator[](i) = lst[i];
77 template<
class InputIterator>
91 InputIterator iter = first;
94 this->operator[](i) = *iter++;
119 return NullObjectRef<List<T>>();
153 if (i >= this->size())
199 label nextFree = this->size();
204 this->operator[](nextFree++) = lst[elemI];
212 label nextFree = this->size();
217 this->operator[](nextFree++) = lst[elemI];
A simple container for copying or transferring objects of type <T>.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Xfer< List< T > > xfer()
Transfer contents to the Xfer container.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T & newElmt(const label)
Return subscript-checked element of UList.
static const List< T > & null()
Return a null List.
void resize(const label)
Alias for setSize(const label)
points setSize(newPointi)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Xfer< T > xferMove(T &)
Construct by transferring the contents of the arg.
void clear()
Clear the list, i.e. set size to zero.
label size() const
Return the number of elements in the list.
void 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...
void operator=(const UList< T > &)
Assignment to UList operator. Takes linear time.
A List with indirect addressing.
autoPtr< List< T > > clone() const
Clone.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
label size() const
Return the number of elements in the UList.
label size() const
Return the number of elements in the UList.