57 template<
class T>
class List;
58 template<
class T>
class SubList;
61 template<
class T>
class UList;
62 template<
class T> Ostream& operator<<(Ostream&, const UList<T>&);
63 template<
class T> Istream&
operator>>(Istream&, UList<T>&);
93 void operator=(
const UList<T>&) =
delete;
101 friend class List<
T>;
129 return values_[a] < values_[
b];
147 return values_[a] > values_[
b];
184 inline const T*
cdata()
const;
195 inline const T&
first()
const;
201 inline const T&
last()
const;
243 void operator=(
const T&);
246 void operator=(
const zero);
276 inline iterator
begin();
279 inline iterator
end();
288 inline const_iterator
cbegin()
const;
291 inline const_iterator
cend()
const;
294 inline const_iterator
begin()
const;
297 inline const_iterator
end()
const;
306 inline reverse_iterator
rbegin();
309 inline reverse_iterator
rend();
318 inline const_reverse_iterator
crbegin()
const;
321 inline const_reverse_iterator
crend()
const;
324 inline const_reverse_iterator
rbegin()
const;
327 inline const_reverse_iterator
rend()
const;
339 inline bool empty()
const;
356 bool operator<(const UList<T>&)
const;
362 bool operator<=(const UList<T>&)
const;
389 template<
class T,
class Cmp>
395 template<
class T,
class Cmp>
429 #define forAll(list, i) \ 430 for (Foam::label i=0; i<(list).size(); i++) 441 #define forAllReverse(list, i) \ 442 for (Foam::label i=(list).size()-1; i>=0; i--) 454 #define forAllIter(Container,container,iter) \ 457 Container::iterator iter = (container).begin(); \ 458 iter != (container).end(); \ 472 #define forAllConstIter(Container,container,iter) \ 475 Container::const_iterator iter = (container).begin(); \ 476 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.
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)
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 checkIndex(const label i) const
Check index i is within valid range (0 ... size-1)
T value_type
Type of values the UList contains.
void writeEntry(Ostream &) const
Write the UList as a dictionary entry.