57 template<
class T>
class List;
58 template<
class T>
class SubList;
61 template<
class T>
class UList;
62 template<
class T>
void writeEntry(Ostream& os,
const UList<T>&);
63 template<
class T> Ostream& operator<<(Ostream&, const UList<T>&);
64 template<
class T> Istream&
operator>>(Istream&, UList<T>&);
95 void operator=(
const UList<T>&) =
delete;
103 friend class List<
T>;
131 return values_[a] < values_[
b];
149 return values_[a] > values_[
b];
185 inline const T*
cdata()
const;
196 inline const T&
first()
const;
202 inline const T&
last()
const;
240 void operator=(
const T&);
243 void operator=(
const zero);
273 inline iterator
begin();
276 inline iterator
end();
285 inline const_iterator
cbegin()
const;
288 inline const_iterator
cend()
const;
291 inline const_iterator
begin()
const;
294 inline const_iterator
end()
const;
303 inline reverse_iterator
rbegin();
306 inline reverse_iterator
rend();
315 inline const_reverse_iterator
crbegin()
const;
318 inline const_reverse_iterator
crend()
const;
321 inline const_reverse_iterator
rbegin()
const;
324 inline const_reverse_iterator
rend()
const;
336 inline bool empty()
const;
353 bool operator<(const UList<T>&)
const;
359 bool operator<=(const UList<T>&)
const;
386 template<
class T,
class Cmp>
392 template<
class T,
class Cmp>
406 template<
class ListType>
409 template<
class ListType>
412 template<
class ListType>
435 #define forAll(list, i) \ 436 for (Foam::label i=0; i<(list).size(); i++) 447 #define forAllReverse(list, i) \ 448 for (Foam::label i=(list).size()-1; i>=0; i--) 460 #define forAllIter(Container,container,iter) \ 463 Container::iterator iter = (container).begin(); \ 464 iter != (container).end(); \ 478 #define forAllConstIter(Container,container,iter) \ 481 Container::const_iterator iter = (container).begin(); \ 482 iter != (container).end(); \
void shuffle(UList< T > &)
bool operator!=(const UList< T > &) const
The opposite of the equality operation. Takes linear time.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the UList.
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the UList.
void writeListEntries(Ostream &os, const ListType &l)
T & operator[](const label)
Return element of UList.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const T * cdata() const
Return a const pointer to the first data element,.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
const_iterator cbegin() const
Return const_iterator to begin traversing the constant UList.
T * iterator
Random access iterator for traversing UList.
iterator end()
Return an iterator to end traversing the UList.
T & first()
Return the first element of the list.
void deepCopy(const UList< T > &)
Copy elements of the given UList.
UList< label > labelUList
label difference_type
The type that can represent the difference between any two.
bool operator==(const UList< T > &) const
Equality operation on ULists of the same type.
A List obtained as a section of another List.
Less function class that can be used for sorting.
less(const UList< T > &values)
const dimensionedScalar & b
Wien displacement law constant: default SI units: [m K].
A class for handling words, derived from string.
bool operator>(const UList< T > &) const
Compare two ULists lexicographically. Takes linear time.
Istream & operator>>(Istream &, directionInfo &)
iterator begin()
Return an iterator to begin traversing the UList.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label max_size() const
Return size of the largest possible UList.
void swap(UList< T > &)
Swap two ULists of the same type in constant time.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool operator>=(const UList< T > &) const
Return true if !(a < b). Takes linear time.
void reverse(UList< T > &, const label n)
T * reverse_iterator
Reverse iterator for reverse traversal of UList.
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing the UList.
T & reference
Type that can be used for storing into.
static const UList< T > & null()
Return a null UList.
bool operator()(const label a, const label b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing the UList.
label size_type
The type that can represent the size of a UList.
T * data()
Return a pointer to the first data element,.
void shallowCopy(const UList< T > &)
Copy the pointer held by the given UList.
const T * const_iterator
Random access iterator for traversing UList.
const T * const_reverse_iterator
Reverse iterator for reverse traversal of constant UList.
std::streamsize byteSize() const
Return the binary size in number of characters of the UList.
const T & const_reference
Type that can be used for storing into.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
void checkSize(const label size) const
Check size is within valid range (0 ... size)
Greater function class that can be used for sorting.
const_iterator cend() const
Return const_iterator to end traversing the constant UList.
T & last()
Return the last element of the list.
label size() const
Return the number of elements in the UList.
void stableSort(UList< T > &)
void checkStart(const label start) const
Check start is within valid range (0 ... size-1)
void writeListEntry(Ostream &os, const ListType &l)
void checkIndex(const label i) const
Check index i is within valid range (0 ... size-1)
T value_type
Type of values the UList contains.