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);
129 template<
class T,
unsigned Size>
132 if (start < 0 || (start &&
unsigned(start) >= Size))
134 FatalErrorIn(
"FixedList<T, Size>::checkStart(const label)")
135 <<
"start " << start <<
" out of range 0 ... " << (Size-1)
142 template<
class T,
unsigned Size>
145 if (size < 0 ||
unsigned(size) > Size)
147 FatalErrorIn(
"FixedList<T, Size>::checkSize(const label)")
148 <<
"size " << size <<
" out of range 0 ... " << (Size)
156 template<
class T,
unsigned Size>
159 if (i < 0 ||
unsigned(i) >= Size)
161 FatalErrorIn(
"FixedList<T, Size>::checkIndex(const label)")
162 <<
"index " << i <<
" out of range 0 ... " << (Size-1)
168 template<
class T,
unsigned Size>
176 template<
class T,
unsigned Size>
184 template<
class T,
unsigned Size>
187 for (
unsigned i=0; i<Size; i++)
194 template<
class T,
unsigned Size>
202 template<
class T,
unsigned Size>
210 template<
class T,
unsigned Size>
217 template<
class T,
unsigned Size>
224 template<
class T,
unsigned Size>
231 template<
class T,
unsigned Size>
241 template<
class T,
unsigned Size>
252 template<
class T,
unsigned Size>
262 template<
class T,
unsigned Size>
265 for (
unsigned i=0; i<Size; i++)
271 template<
class T,
unsigned Size>
274 checkSize(lst.
size());
276 for (
unsigned i=0; i<Size; i++)
282 template<
class T,
unsigned Size>
285 checkSize(lst.
size());
295 operator[](i++) = iter();
299 template<
class T,
unsigned Size>
302 for (
unsigned i=0; i<Size; i++)
311 template<
class T,
unsigned Size>
319 template<
class T,
unsigned Size>
327 template<
class T,
unsigned Size>
335 template<
class T,
unsigned Size>
343 template<
class T,
unsigned Size>
351 template<
class T,
unsigned Size>
359 template<
class T,
unsigned Size>
367 template<
class T,
unsigned Size>
375 template<
class T,
unsigned Size>
383 template<
class T,
unsigned Size>
391 template<
class T,
unsigned Size>
399 template<
class T,
unsigned Size>
407 template<
class T,
unsigned Size>
414 template<
class T,
unsigned Size>
421 template<
class T,
unsigned Size>
428 template<
class T,
unsigned Size>
429 template<
class HashT>
439 return Hasher(lst.v_,
sizeof(lst.v_), seed);
446 for (
unsigned i=0; i<Size; i++)
448 val = HashT()(lst[i], val);
bool empty() const
Return true if the FixedList is empty (ie, size() is zero).
Non-intrusive singly-linked list.
static const FixedList< T, Size > & null()
Return a null FixedList.
autoPtr< FixedList< T, Size > > clone() const
Clone.
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 ))
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
T * iterator
Random access iterator for traversing FixedList.
An STL-conforming const_iterator.
T & last()
Return the last element of the list.
const T * cdata() const
Return a const pointer to the first data element,.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing 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.
iterator begin()
Return an iterator to begin traversing the FixedList.
void setSize(const label)
Dummy setSize function.
void operator=(const T v[Size])
Assignment from array operator. Takes linear time.
A 1D vector of objects of type <T> with a fixed size <Size>.
label size() const
Return the number of elements in the FixedList.
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
FixedList()
Null constructor.
friend Ostream & operator(Ostream &, const FixedList< T, Size > &)
T * data()
Return a pointer to the first data element,.
T & operator[](const label)
Return element of FixedList.
const_iterator cend() const
Return const_iterator to end traversing the constant FixedList.
label max_size() const
Return size of the largest possible FixedList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1).
const_iterator cbegin() const
Return const_iterator to begin traversing the constant FixedList.
iterator end()
Return an iterator to end traversing the FixedList.
label size() const
Return the number of elements in the UList.
void resize(const label)
Dummy resize function.
const T * const_iterator
Random access iterator for traversing FixedList.
errorManip< error > abort(error &err)
Template function to specify if the data of a type are contiguous.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
void checkSize(const label size) const
Check size is within valid range (0 ... size).
void transfer(const FixedList< T, Size > &)
Copy (not transfer) the argument contents.
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
T & first()
Return the first element of the list.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
label size() const
Return number of elements in list.
void checkStart(const label start) const
Check start is within valid range (0 ... size-1).