Go to the documentation of this file.
53 template<
class T, label staticSize>
56 template<
class T, label staticSize>
62 template<
class T, label staticSize>
74 template<
class T, label staticSize = 16>
95 inline const T*
data()
const;
123 template<
class ListType>
124 inline DynList(
const ListType&);
202 const label offset = 1
208 const label offset = 1
218 template<
class ListType>
229 friend Ostream& operator<< <T, staticSize>
236 friend Istream&
operator>> <
T, staticSize>
T & newElmt(const label)
return a refence to the element. Resize the list if necessary
T * data()
access to the data pointer
T & operator()(const label)
T removeElement(const label i)
label fcIndex(const label index, const label offset=1) const
return forward and reverse circular indices
bool operator!=(const DynList< T, staticSize > &) const
T removeLastElement()
Return and remove the last element.
void shrink()
Shrink the List<T> to the number of elements used.
bool contains(const T &e) const
check if the element is in the list (takes linear time)
const T & rcElement(const label index, const label offset=1) const
void allocateSize(const label)
allocate list 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.
bool operator==(const DynList< T, staticSize > &) const
Compare the list with the another one.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void operator=(const T &)
Assignment of all entries to the given value.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void appendIfNotIn(const T &e)
label nextFree_
Number of next free element.
T staticData_[staticSize]
statically allocated data (used for short lists)
const double e
Elementary charge.
void checkIndex(const label) const
check if index is inside the scope (used for debugging only)
label nAllocated_
size of the allocated data
label rcIndex(const label index, const label offset=1) const
label containsAtPosition(const T &e) const
const T & lastElement() const
return a const reference to the last element
void setSize(const label)
Reset size of List.
void checkAllocation() const
check if nAllocated_ is greater or equal to nextFree_
const T & fcElement(const label index, const label offset=1) const
return forward and reverse circular elements
T * dataPtr_
pointer to the data
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const T & operator[](const label) const
return access to an element
void clear()
Clear the list, i.e. set next free to zero.
void append(const T &e)
Append an element at the end of the list.