35template<
class T,
unsigned N>
38 return NullObjectRef<FixedList<T, N>>();
44template<
class T,
unsigned N>
51template<
class T,
unsigned N>
58template<
class T,
unsigned N>
61 for (
unsigned i=0; i<
N; ++i)
68template<
class T,
unsigned N>
71 for (
unsigned i=0; i<
N; ++i)
78template<
class T,
unsigned N>
81 for (
unsigned i=0; i<
N; ++i)
83 v_[i] = std::move(list.v_[i]);
88template<
class T,
unsigned N>
91 checkSize(list.size());
93 auto iter = list.begin();
94 for (
unsigned i=0; i<
N; ++i)
102template<
class T,
unsigned N>
105 checkSize(list.
size());
107 for (
unsigned i=0; i<
N; ++i)
114template<
class T,
unsigned N>
115template<
unsigned AnyNum>
122 for (
unsigned i=0; i<
N; ++i)
124 v_[i] = list[indices[i]];
129template<
class T,
unsigned N>
136 for (
unsigned i=0; i<
N; ++i)
138 v_[i] = list[indices[i]];
143template<
class T,
unsigned N>
146 checkSize(list.size());
148 auto iter = list.
begin();
149 for (
unsigned i=0; i<
N; ++i)
157template<
class T,
unsigned N>
167template<
class T,
unsigned N>
175template<
class T,
unsigned N>
183template<
class T,
unsigned N>
187 return reinterpret_cast<const char*
>(v_);
191template<
class T,
unsigned N>
195 return reinterpret_cast<char*
>(v_);
199template<
class T,
unsigned N>
206template<
class T,
unsigned N>
213template<
class T,
unsigned N>
220template<
class T,
unsigned N>
227template<
class T,
unsigned N>
234template<
class T,
unsigned N>
237 return (i ==
N-1 ? 0 : i+1);
241template<
class T,
unsigned N>
244 return this->operator[](this->fcIndex(i));
248template<
class T,
unsigned N>
251 return this->operator[](this->fcIndex(i));
255template<
class T,
unsigned N>
258 return (i ? i-1 :
N-1);
262template<
class T,
unsigned N>
265 return this->operator[](this->rcIndex(i));
269template<
class T,
unsigned N>
272 return this->operator[](this->rcIndex(i));
276template<
class T,
unsigned N>
279 if (start < 0 || (start &&
unsigned(start) >=
N))
283 <<
"start " << start <<
" out of range [0," <<
N <<
")"
289template<
class T,
unsigned N>
292 if (
unsigned(size) !=
N)
295 <<
"size " << size <<
" != " <<
N
301template<
class T,
unsigned N>
304 if (i < 0 ||
unsigned(i) >=
N)
307 <<
"index " << i <<
" out of range [0," <<
N <<
")"
308 <<
abort(FatalError);
313template<
class T,
unsigned N>
316 if (empty())
return false;
318 for (
unsigned i=1; i<
N; ++i)
330template<
class T,
unsigned N>
337 return (this->find(val,
pos) >= 0);
341template<
class T,
unsigned N>
350template<
class T,
unsigned N>
359template<
class T,
unsigned N>
362 for (
unsigned i=0; i<
N; ++i)
369template<
class T,
unsigned N>
372 for (
unsigned i=0; i<
N; ++i)
379template<
class T,
unsigned N>
387 for (
unsigned i=0; i<
N; ++i)
394template<
class T,
unsigned N>
402 for (
unsigned i=0; i<
N; ++i)
404 v_[i] = std::move(list[i]);
411template<
class T,
unsigned N>
421template<
class T,
unsigned N>
431template<
class T,
unsigned N>
434 for (
unsigned i=0; i<
N; ++i)
440template<
class T,
unsigned N>
443 checkSize(list.
size());
445 for (
unsigned i=0; i<
N; ++i)
451template<
class T,
unsigned N>
454 checkSize(list.size());
456 auto iter = list.
begin();
457 for (
unsigned i=0; i<
N; ++i)
464template<
class T,
unsigned N>
467 checkSize(list.size());
469 auto iter = list.begin();
470 for (
unsigned i=0; i<
N; ++i)
477template<
class T,
unsigned N>
484template<
class T,
unsigned N>
491template<
class T,
unsigned N>
499 for (
unsigned i=0; i<
N; ++i)
505template<
class T,
unsigned N>
513 for (
unsigned i=0; i<
N; ++i)
515 v_[i] = std::move(list.v_[i]);
522template<
class T,
unsigned N>
530template<
class T,
unsigned N>
538template<
class T,
unsigned N>
546template<
class T,
unsigned N>
554template<
class T,
unsigned N>
562template<
class T,
unsigned N>
570template<
class T,
unsigned N>
578template<
class T,
unsigned N>
586template<
class T,
unsigned N>
594template<
class T,
unsigned N>
602template<
class T,
unsigned N>
610template<
class T,
unsigned N>
Non-intrusive singly-linked list.
virtual bool resize()
Resize the ODE solver.
A 1D vector of objects of type <T> with a fixed length <N>.
const_iterator cend() const noexcept
Return const_iterator to end traversing the constant FixedList.
void swap(FixedList< T, N > &other)
Swap lists by swapping the content of the individual list elements.
void resize_nocopy(const label n)
Dummy function, to make FixedList consistent with List.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
static std::streamsize size_bytes() noexcept
Number of contiguous bytes for the list data,.
char * data_bytes() noexcept
Return pointer to the underlying array serving as data storage,.
label rcIndex(const label i) const
const T * const_iterator
Random access iterator for traversing FixedList.
const_iterator cbegin() const noexcept
Return const_iterator to begin traversing the constant FixedList.
void checkIndex(const label i) const
Check index is within valid range [0,N)
T * iterator
Random access iterator for traversing FixedList.
T & first() noexcept
The first element of the list, position [0].
std::reverse_iterator< const_iterator > const_reverse_iterator
Reverse iterator (const access)
const T & rcValue(const label i) const
Return reverse circular value (ie, previous value in the list)
T & last() noexcept
The last element of the list, position [N-1].
label fcIndex(const label i) const
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
const T * cdata() const noexcept
Return pointer to the underlying array serving as data storage.
iterator end() noexcept
Return an iterator to end traversing the FixedList.
const T & fcValue(const label i) const
Return forward circular value (ie, next value in the list)
void operator=(const T list[N])
Assignment to array operator. Takes linear time.
std::reverse_iterator< iterator > reverse_iterator
Reverse iterator (non-const access)
T * data() noexcept
Return pointer to the underlying array serving as data storage.
bool uniform() const
True if all entries have identical values, and list is non-empty.
const char * cdata_bytes() const noexcept
Return pointer to the underlying array serving as data storage,.
static const FixedList< T, N > & null()
Return a null FixedList.
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
T & operator[](const label i)
Return element of FixedList.
FixedList()=default
Default construct.
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
iterator begin() noexcept
Return an iterator to begin traversing the FixedList.
void checkStart(const label start) const
Check start is within valid range [0,size)
autoPtr< FixedList< T, N > > clone() const
Clone.
Template class for non-intrusive linked lists.
iterator begin()
Iterator to first item in list with non-const access.
void checkSize() const
Check that dimensions are positive, non-zero.
virtual char fill() const =0
Get padding character.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
transferModelList & transfer()
Transfer.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar pos(const dimensionedScalar &ds)
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
errorManip< error > abort(error &err)
const Vector< label > N(dict.get< Vector< label > >("N"))