Go to the documentation of this file.
47 #include <type_traits>
57 template<
class T>
class List;
63 template<
class IntType>
66 static_assert(std::is_integral<IntType>::value,
"Integral required");
87 inline IntType
end_value()
const noexcept;
101 class const_iterator;
104 class const_reverse_iterator;
113 inline constexpr
IntRange() noexcept;
116 inline explicit constexpr
IntRange(const IntType len) noexcept;
131 inline IntType
start() const noexcept;
134 inline IntType
size() const noexcept;
137 inline IntType&
start() noexcept;
140 inline IntType&
size() noexcept;
143 inline
bool empty() const noexcept;
146 inline IntType
first() const noexcept;
149 inline IntType
last() const noexcept;
155 inline
void clear() noexcept;
158 inline
void reset(const IntType beg, const IntType len) noexcept;
161 inline
void setStart(const IntType i) noexcept;
164 inline
void setSize(const IntType
n) noexcept;
167 inline
void resize(const IntType
n) noexcept;
176 inline
bool found(const IntType value) const noexcept;
182 inline constexpr IntType operator[](const IntType i) const noexcept;
186 inline
bool operator()(const IntType value) const noexcept;
189 inline IntType operator++() noexcept;
190 inline IntType operator++(
int) noexcept;
193 inline IntType operator+=(const IntType
n) noexcept;
196 inline IntType operator--() noexcept;
197 inline IntType operator--(
int) noexcept;
200 inline IntType operator-=(const IntType
n) noexcept;
203 explicit operator
bool() const noexcept {
return bool(size_); }
212 inline const_iterator
at(
const IntType i)
const;
215 inline const_iterator
begin() const noexcept;
218 inline const_iterator
cbegin() const noexcept;
221 inline const_iterator
cend() const noexcept;
224 inline const_iterator
end() const noexcept;
230 inline const_reverse_iterator
rbegin() const noexcept;
233 inline const_reverse_iterator
crbegin() const noexcept;
236 inline const_reverse_iterator
rend() const noexcept;
239 inline const_reverse_iterator
crend() const noexcept;
258 typedef const IntType* pointer;
267 const IntType val = 0
274 inline constexpr IntType operator*() const noexcept;
277 inline constexpr IntType operator[](const IntType
n) const noexcept;
310 inline constexpr IntType operator-
332 return !(*
this == iter);
338 return !(iter < *
this);
344 return (iter < *
this);
350 return !(*
this < iter);
378 const IntType val = 0
385 inline constexpr IntType operator*() const noexcept;
388 inline constexpr IntType operator[](const IntType
n) const noexcept;
421 inline constexpr IntType operator-
443 return !(*
this == iter);
449 return !(iter < *
this);
455 return (iter < *
this);
461 return !(*
this < iter);
474 #if defined(WM_LABEL_SIZE) && (WM_LABEL_SIZE >= 64)
503 template<
class IntType>
504 inline constexpr
bool operator==
510 return (a.
first() ==
b.first() && a.
size() ==
b.size());
516 template<
class IntType>
517 inline constexpr
bool operator<
525 a.first() <
b.first()
528 !(
b.first() < a.first())
529 && a.size() <
b.size()
537 template<
class IntType>
538 inline constexpr
bool operator!=
547 template<
class IntType>
548 inline constexpr
bool operator<=
557 template<
class IntType>
558 inline constexpr
bool operator>
567 template<
class IntType>
568 inline constexpr
bool operator>=
const_reverse_iterator crbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
constexpr bool operator>(const const_reverse_iterator &iter) const noexcept
constexpr bool operator>=(const const_iterator &iter) const noexcept
IntType rend_value() const noexcept
The value 1 before the start of the range.
bool operator<=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or older than B.
const_iterator at(const IntType i) const
An interval of (signed) integers defined by a start and a size.
const_iterator end() const noexcept
A const_iterator set to 1 beyond the end of the range.
constexpr const_reverse_iterator(const IntType val=0) noexcept
Construct with specified value, or default construct.
const_reverse_iterator rbegin() const noexcept
A const_reverse_iterator set to 1 before the end of range.
std::random_access_iterator_tag iterator_category
void setStart(const IntType i) noexcept
Set the start position, no checks.
void clear() noexcept
Reset to zero start and zero size.
bool found(const IntType value) const noexcept
True if the (global) value is located within the range.
constexpr bool operator<=(const const_iterator &iter) const noexcept
const_reverse_iterator rend() const noexcept
A const_reverse_iterator set to 1 before the begin of range.
Istream & operator>>(Istream &, directionInfo &)
Random-access reverse input iterator with const access.
const_iterator cend() const noexcept
A const_iterator set to 1 beyond the end of the range.
constexpr bool operator<=(const const_reverse_iterator &iter) const noexcept
void resize(const IntType n) noexcept
Change the size, no checks. Identical to setSize()
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
IntType size() const noexcept
The size of the range.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
IntType end_value() const noexcept
The value 1 beyond the end of the range.
constexpr bool operator>(const const_iterator &iter) const noexcept
const_reverse_iterator crend() const noexcept
A const_reverse_iterator set to 1 before the begin of range.
bool empty() const noexcept
True if range is empty (zero-sized)
const typedef IntType * pointer
constexpr bool operator>=(const const_reverse_iterator &iter) const noexcept
Typedefs for label/uLabel without requiring label.H.
OBJstream os(runTime.globalPath()/outputName)
bool operator>=(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A same or newer than B.
const_iterator begin() const noexcept
A const_iterator set to the beginning of the range.
constexpr IntRange() noexcept
Default construct an empty range (0,0)
IntType size_type
The type that can represent the size of the range.
IntType first() const noexcept
The (inclusive) lower value of the range. Same as start()
const_iterator cbegin() const noexcept
A const_iterator set to the beginning of the range.
void reset(const IntType beg, const IntType len) noexcept
Reset start and length, no checks.
std::random_access_iterator_tag iterator_category
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
Random-access input iterator with const access.
IntType value_type
Type of values the range contains.
void clampSize() noexcept
Enforce non-negative size.
void setSize(const IntType n) noexcept
Change the size, no checks. Identical to resize()
IntType start() const noexcept
The (inclusive) lower value of the range.
const typedef IntType * pointer
IntType last() const noexcept
The (inclusive) upper value of the range.
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.