SizeRange
class SizeRange
Represents a possibly unbounded range of sizes.
constructor SizeRange
Construct a SizeRange representing unknown size.
| SizeRange | ( | ); |
constructor SizeRange
Construct a SizeRange with a minimum and optional maximum.
| SizeRange | ( | uint64_t minimum, | |
| std::optional< uint64_t > maximum | ); |
| PARAMETER | DESCRIPTION |
|---|---|
minimum |
The minimum size. |
maximum |
The maximum size. If not set, the range is unbounded. |
constructor SizeRange
Construct a SizeRange representing a known size.
| SizeRange | ( | uint64_t size | ); |
| PARAMETER | DESCRIPTION |
|---|---|
size |
The size of the range. |
method has_sizeconst
Check if the size of the range is known.
| bool has_size | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
|
method max
Get the maximum of this size range and another.
It takes the maximum of the minimums and maximums of the two ranges.
| SizeRange max | ( | const SizeRange & other | ); |
| PARAMETER | DESCRIPTION |
|---|---|
other |
The other size range to compare with. |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
A new SizeRange representing the maximum of the two ranges. |
method maximum_valueconst
Get the maximum value of the size range.
| std::optional< Value > maximum_value | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Value > |
The maximum value, if any. |
method minimum_valueconst
Get the minimum value of the size range.
| Value minimum_value | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
Value |
The minimum value. |
method operator!=const
Compare two size ranges for inequality.
| bool operator!= | ( | const SizeRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
The size range to compare with. |
| RETURNS | DESCRIPTION |
|---|---|
bool |
|
method operator*const
Multiply this size range by a constant.
| SizeRange operator* | ( | uint64_t multiplier | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
multiplier |
The constant to multiply by. |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
The resulting size range. |
method operator*const
Multiply this size range by another size range.
| SizeRange operator* | ( | const SizeRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
The size range to multiply with. |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
The resulting size range. |
method operator+const
Add another size range to this one.
| SizeRange operator+ | ( | const SizeRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
The size range to add. |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
The resulting size range. |
method operator+=
Add another size range to this one and assign the result to this range.
| SizeRange operator+= | ( | const SizeRange & other | ); |
| PARAMETER | DESCRIPTION |
|---|---|
other |
The size range to add. |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
The resulting size range. |
method operator-const
Subtract another size range from this one.
| SizeRange operator- | ( | const SizeRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
The size range to subtract. |
| RETURNS | DESCRIPTION |
|---|---|
SizeRange |
The resulting size range. |
method operator==const
Compare two size ranges for equality.
| bool operator== | ( | const SizeRange & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
The size range to compare with. |
| RETURNS | DESCRIPTION |
|---|---|
bool |
|
method sizeconst
Get the size of the range, if it is known.
| std::optional< uint64_t > size | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint64_t > |
The size of the range, {} if it is unknown. |
method valueconst
If the size range has a known size, return it as a Value.
| std::optional< Value > value | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Value > |
The size of the range as a Value, {} if it is unknown. |
member maximum
The maximum size of the range. If not set, the range is unbounded.
member minimum
The minimum size of the range.
class formatter< SizeRange >
method formatconst
| auto format | ( | const SizeRange & size_range, | |
| format_context & ctx | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
size_range |
|
ctx |
| RETURNS | DESCRIPTION |
|---|---|
auto |