32 template<
class T,
unsigned Size>
37 template<
class T,
unsigned Size>
40 for (
unsigned i=0; i<Size; i++)
47 template<
class T,
unsigned Size>
50 for (
unsigned i=0; i<Size; i++)
57 template<
class T,
unsigned Size>
60 checkSize(lst.
size());
62 for (
unsigned i=0; i<Size; i++)
69 template<
class T,
unsigned Size>
72 checkSize(lst.
size());
82 operator[](i++) = iter();
87 template<
class T,
unsigned Size>
90 for (
unsigned i=0; i<Size; i++)
97 template<
class T,
unsigned Size>
107 template<
class T,
unsigned Size>
110 return NullObjectRef<FixedList<T, Size>>();
114 template<
class T,
unsigned Size>
117 return (i == Size-1 ? 0 : i+1);
121 template<
class T,
unsigned Size>
124 return (i ? i-1 : Size-1);
128 template<
class T,
unsigned Size>
131 if (start < 0 || (start &&
unsigned(start) >= Size))
134 <<
"start " << start <<
" out of range 0 ... " << (Size-1)
140 template<
class T,
unsigned Size>
143 if (size < 0 ||
unsigned(size) > Size)
146 <<
"size " << size <<
" out of range 0 ... " << (Size)
152 template<
class T,
unsigned Size>
155 if (i < 0 ||
unsigned(i) >= Size)
158 <<
"index " << i <<
" out of range 0 ... " << (Size-1)
164 template<
class T,
unsigned Size>
172 template<
class T,
unsigned Size>
180 template<
class T,
unsigned Size>
183 for (
unsigned i=0; i<Size; i++)
190 template<
class T,
unsigned Size>
198 template<
class T,
unsigned Size>
206 template<
class T,
unsigned Size>
213 template<
class T,
unsigned Size>
220 template<
class T,
unsigned Size>
227 template<
class T,
unsigned Size>
236 template<
class T,
unsigned Size>
246 template<
class T,
unsigned Size>
256 template<
class T,
unsigned Size>
259 for (
unsigned i=0; i<Size; i++)
265 template<
class T,
unsigned Size>
268 checkSize(lst.
size());
270 for (
unsigned i=0; i<Size; i++)
276 template<
class T,
unsigned Size>
279 checkSize(lst.
size());
289 operator[](i++) = iter();
293 template<
class T,
unsigned Size>
296 for (
unsigned i=0; i<Size; i++)
305 template<
class T,
unsigned Size>
313 template<
class T,
unsigned Size>
321 template<
class T,
unsigned Size>
329 template<
class T,
unsigned Size>
337 template<
class T,
unsigned Size>
345 template<
class T,
unsigned Size>
353 template<
class T,
unsigned Size>
361 template<
class T,
unsigned Size>
369 template<
class T,
unsigned Size>
377 template<
class T,
unsigned Size>
385 template<
class T,
unsigned Size>
393 template<
class T,
unsigned Size>
401 template<
class T,
unsigned Size>
408 template<
class T,
unsigned Size>
415 template<
class T,
unsigned Size>
422 template<
class T,
unsigned Size>
423 template<
class HashT>
433 return Hasher(lst.v_,
sizeof(lst.v_), seed);
440 for (
unsigned i=0; i<Size; i++)
442 val = HashT()(lst[i], val);
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
static const FixedList< T, Size > & null()
Return a null FixedList.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A 1D vector of objects of type <T> with a fixed size <Size>.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1).
Template function to specify if the data of a type are contiguous.
const_iterator cbegin() const
Return const_iterator to begin traversing the constant FixedList.
An STL-conforming const_iterator.
bool empty() const
Return true if the FixedList is empty (ie, size() is zero).
friend Ostream & operator(Ostream &, const FixedList< T, Size > &)
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
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))
label size() const
Return number of elements in list.
void operator=(const T v[Size])
Assignment from array operator. Takes linear time.
const T * const_iterator
Random access iterator for traversing FixedList.
T & operator[](const label)
Return element of FixedList.
const_iterator cend() const
Return const_iterator to end traversing the constant FixedList.
void transfer(const FixedList< T, Size > &)
Copy (not transfer) the argument contents.
T & first()
Return the first element of the list.
label max_size() const
Return size of the largest possible FixedList.
T & last()
Return the last element of the list.
Non-intrusive singly-linked list.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
errorManip< error > abort(error &err)
label size() const
Return the number of elements in the FixedList.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void resize(const label)
Dummy resize function.
T * iterator
Random access iterator for traversing FixedList.
iterator end()
Return an iterator to end traversing the FixedList.
iterator begin()
Return an iterator to begin traversing the FixedList.
void checkSize(const label size) const
Check size is within valid range (0 ... size).
FixedList()
Null constructor.
label size() const
Return the number of elements in the UList.
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
T * data()
Return a pointer to the first data element,.
void checkStart(const label start) const
Check start is within valid range (0 ... size-1).
void setSize(const label)
Dummy setSize function.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
const T * cdata() const
Return a const pointer to the first data element,.
autoPtr< FixedList< T, Size > > clone() const
Clone.