A list of labelRange with constrained list capabilities. More...
#include <labelRanges.H>
Classes | |
| class | const_iterator |
| Forward input iterator with const access. More... | |
Public Types | |
| typedef labelRange | value_type |
| The value type the list contains. | |
Public Member Functions | |
| labelRanges ()=default | |
| Default construct. | |
| labelRanges (const labelRanges &)=default | |
| Default copy construct. | |
| labelRanges (labelRanges &&)=default | |
| Default move construct. | |
| labelRanges & | operator= (const labelRanges &)=default |
| Default copy assignment. | |
| labelRanges & | operator= (labelRanges &&)=default |
| Default move assignment. | |
| labelRanges (const label initialCapacity) | |
| Construct an empty list with given initial capacity. | |
| labelRanges (const UList< labelRange > &list) | |
| Copy construct from list of ranges. | |
| labelRanges (List< labelRange > &&list) | |
| Move construct from list of ranges. | |
| template<int AnySizeMin> | |
| labelRanges (DynamicList< labelRange, AnySizeMin > &&list) | |
| Move construct from list of ranges. | |
| labelRanges (Istream &is) | |
| Construct from Istream. | |
| const UList< labelRange > & | ranges () const noexcept |
| The list of ranges. | |
| void | clear () noexcept |
| Clear the addressable list of ranges. | |
| bool | empty () const noexcept |
| True if list of ranges is empty. | |
| void | reserve (const label len) |
| Reserve space for at least this size. | |
| label | totalSize () const noexcept |
| The linear size (sum of all the element sizes). | |
| bool | contains (const label value) const noexcept |
| True if the value is contained within any of the sub-ranges. | |
| bool | add (const labelRange &range) |
| Add the range to the list. | |
| bool | remove (const labelRange &range) |
| Remove the range from the list. | |
| template<class... Args> | |
| labelRange & | emplace_back (Args &&... args) |
| Construct a range element at the end of the list, return reference to the new element. | |
| void | sort () |
| Inplace sort of the range elements. | |
| List< label > | labels () const |
| Return flattened list of all range labels. | |
| label | operator[] (const label i) const |
| Return the value at linear index 'i', -1 for out-of-range. | |
| const_iterator | cbegin () const noexcept |
| A const_iterator set to the beginning of the list. | |
| const const_iterator | cend () const noexcept |
| A const_iterator set to beyond the end of the list. | |
| const_iterator | begin () const noexcept |
| A const_iterator set to the beginning of the list. | |
| const const_iterator | end () const noexcept |
| A const_iterator set to beyond the end of the list. | |
| const_iterator | cbegin (const label i) const |
| Return const_iterator at linear offset i from begin, clamped to [0,size] range. | |
| const_iterator | begin (const label i) const |
| Return const_iterator at linear offset i from begin, clamped to [0,size] range. | |
| Istream & | readList (Istream &is) |
| Read List of labelRange from Istream, discarding contents. | |
| Ostream & | writeList (Ostream &os, const label shortLen=0) const |
| Write List of labelRange, with line-breaks in ASCII when length exceeds shortLen. | |
| bool | found (const label value) const |
| Same as contains(). | |
| template<class... Args> | |
| Foam::labelRange & | emplace_back (Args &&... args) |
Friends | |
| Istream & | operator>> (Istream &is, labelRanges &list) |
| Use the readList() method to read contents from Istream. | |
| Ostream & | operator<< (Ostream &os, const labelRanges &list) |
| Write to Ostream. Uses the writeList() method. | |
A list of labelRange with constrained list capabilities.
Definition at line 54 of file labelRanges.H.
| typedef labelRange value_type |
The value type the list contains.
Definition at line 83 of file labelRanges.H.
|
default |
Default construct.
Referenced by labelRanges(), labelRanges(), operator<<, operator=(), operator=(), and operator>>.

|
default |
|
default |
|
inlineexplicit |
Construct an empty list with given initial capacity.
Definition at line 24 of file labelRangesI.H.
|
inlineexplicit |
Copy construct from list of ranges.
Definition at line 30 of file labelRangesI.H.
|
inline |
Move construct from list of ranges.
Definition at line 36 of file labelRangesI.H.
|
inline |
Move construct from list of ranges.
Definition at line 43 of file labelRangesI.H.
|
default |
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
Clear the addressable list of ranges.
Definition at line 158 of file labelRanges.H.
References Foam::noexcept.
|
inlinenoexcept |
True if list of ranges is empty.
Definition at line 163 of file labelRanges.H.
References Foam::noexcept.
|
inline |
Reserve space for at least this size.
Definition at line 168 of file labelRanges.H.
|
inlinenoexcept |
The linear size (sum of all the element sizes).
Definition at line 129 of file labelRangesI.H.
References Foam::noexcept, and range.
|
inlinenoexcept |
True if the value is contained within any of the sub-ranges.
Definition at line 143 of file labelRangesI.H.
References range.
Referenced by found().

| bool add | ( | const labelRange & | range | ) |
| bool remove | ( | const labelRange & | range | ) |
|
inline |
Construct a range element at the end of the list, return reference to the new element.
References args, emplace_back(), and sort().
Referenced by emplace_back().


|
inline |
Inplace sort of the range elements.
Definition at line 164 of file labelRangesI.H.
References Foam::sort().
Referenced by emplace_back().


| List< label > labels | ( | ) | const |
| label operator[] | ( | const label | i | ) | const |
Return the value at linear index 'i', -1 for out-of-range.
|
inlinenoexcept |
A const_iterator set to the beginning of the list.
Definition at line 173 of file labelRangesI.H.
References Foam::noexcept.
Referenced by begin(), and cbegin().

|
inlinenoexcept |
A const_iterator set to beyond the end of the list.
Definition at line 180 of file labelRangesI.H.
References Foam::noexcept.
Referenced by cbegin().

|
inlinenoexcept |
A const_iterator set to the beginning of the list.
Definition at line 187 of file labelRangesI.H.
References Foam::noexcept.
|
inlinenoexcept |
A const_iterator set to beyond the end of the list.
Definition at line 194 of file labelRangesI.H.
References Foam::noexcept.
|
inline |
Return const_iterator at linear offset i from begin, clamped to [0,size] range.
Definition at line 201 of file labelRangesI.H.
References cbegin(), cend(), and range.

|
inline |
Return const_iterator at linear offset i from begin, clamped to [0,size] range.
Definition at line 229 of file labelRangesI.H.
References cbegin().

Read List of labelRange from Istream, discarding contents.
References readList().
Referenced by readList().


Write List of labelRange, with line-breaks in ASCII when length exceeds shortLen.
Using '0' suppresses line-breaks entirely.
References os(), and writeList().
Referenced by writeList().


|
inline |
Same as contains().
Definition at line 339 of file labelRanges.H.
References contains(), and found().
Referenced by found().


|
inline |
Definition at line 158 of file labelRangesI.H.
References args.
|
friend |
Use the readList() method to read contents from Istream.
References labelRanges().
|
friend |
Write to Ostream. Uses the writeList() method.
References labelRanges(), and os().