Go to the documentation of this file.
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());
77 typename SLList<T>::const_iterator iter = lst.begin();
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))
135 <<
"start " << start <<
" out of range 0 ... " << (Size-1)
142 template<
class T,
unsigned Size>
145 if (size < 0 ||
unsigned(size) > Size)
148 <<
"size " << size <<
" out of range 0 ... " << (Size)
156 template<
class T,
unsigned Size>
159 if (i < 0 ||
unsigned(i) >= Size)
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());
290 typename SLList<T>::const_iterator iter = lst.begin();
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>
446 for (
unsigned i=0; i<Size; i++)
448 val = HashT()(lst[i], val);
autoPtr< FixedList< T, Size > > clone() const
Clone.
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
T v_[Size]
Vector of values of type T of size Size.
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1).
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
T & operator[](const label)
Return element of FixedList.
void checkStart(const label start) const
Check start is within valid range (0 ... size-1).
const_iterator cend() const
Return const_iterator to end traversing the constant FixedList.
const T * cdata() const
Return a const pointer to the first data element,.
T & first()
Return the first element of the list.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
static const FixedList< T, Size > & null()
Return a null FixedList.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
T & last()
Return the last element of the list.
friend Ostream & operator(Ostream &, const FixedList< T, Size > &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void resize(const label)
Dummy resize function.
label max_size() const
Return size of the largest possible FixedList.
T * iterator
Random access iterator for traversing FixedList.
iterator end()
Return an iterator to end traversing the FixedList.
const_iterator cbegin() const
Return const_iterator to begin traversing the constant FixedList.
T * data()
Return a pointer to the first data element,.
void setSize(const label)
Dummy setSize function.
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
errorManip< error > abort(error &err)
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))
void transfer(const FixedList< T, Size > &)
Copy (not transfer) the argument contents.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void operator=(const T v[Size])
Assignment from array operator. Takes linear time.
Template function to specify if the data of a type are contiguous.
label size() const
Return the number of elements in the FixedList.
A 1D vector of objects of type <T> with a fixed size <Size>.
bool empty() const
Return true if the FixedList is empty (ie, size() is zero).
iterator begin()
Return an iterator to begin traversing the FixedList.
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
void checkSize(const label size) const
Check size is within valid range (0 ... size).
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
FixedList()
Null constructor.