A list of labelRange. More...
Data Structures | |
class | const_iterator |
An STL const_iterator. More... | |
Public Member Functions | |
labelRanges () | |
Construct null. More... | |
labelRanges (const label) | |
Construct given size. More... | |
labelRanges (Istream &) | |
Construct from Istream. More... | |
bool | contains (const label) const |
Return true if the value is within any of the ranges. More... | |
bool | add (const labelRange &) |
Add the range to the list. More... | |
bool | remove (const labelRange &) |
Remove the range from the list. More... | |
const_iterator | cbegin () const |
const_iterator set to the beginning of the list More... | |
const const_iterator & | cend () const |
const_iterator set to beyond the end of the list More... | |
const_iterator | begin () const |
const_iterator set to the beginning of the list More... | |
const const_iterator & | end () const |
const_iterator set to beyond the end of the list More... | |
Private Types | |
typedef DynamicList< labelRange > | ParentType |
Private Member Functions | |
void | insertBefore (const label, const labelRange &) |
Insert range before specified insertion index, by copying up. More... | |
void | purgeEmpty () |
Purge empty ranges, by copying down. More... | |
Ostream & | printRange (Ostream &, const labelRange &) const |
Print the range for debugging purposes. More... | |
![]() | |
DynamicList () | |
Construct null. More... | |
DynamicList (const label) | |
Construct given size. More... | |
DynamicList (const DynamicList< T, SizeInc, SizeMult, SizeDiv > &) | |
Construct copy. More... | |
DynamicList (const UList< T > &) | |
Construct from UList. Size set to UList size. More... | |
DynamicList (const UIndirectList< T > &) | |
Construct from UIndirectList. Size set to UIndirectList size. More... | |
DynamicList (const Xfer< List< T > > &) | |
Construct by transferring the parameter contents. More... | |
DynamicList (Istream &) | |
Construct from Istream. Size set to size of list read. More... | |
label | capacity () const |
Size of the underlying storage. More... | |
void | setCapacity (const label) |
Alter the size of the underlying storage. More... | |
void | setSize (const label) |
Alter the addressed list size. More... | |
void | setSize (const label, const T &) |
Alter the addressed list size and fill new space with a. More... | |
void | resize (const label) |
Alter the addressed list size. More... | |
void | resize (const label, const T &) |
Alter the addressed list size and fill new space with a. More... | |
void | reserve (const label) |
Reserve allocation space for at least this size. More... | |
void | clear () |
Clear the addressed list, i.e. set the size to zero. More... | |
void | clearStorage () |
Clear the list and delete storage. More... | |
DynamicList< T, SizeInc, SizeMult, SizeDiv > & | shrink () |
Shrink the allocated space to the number of elements used. More... | |
void | transfer (List< T > &) |
Transfer contents of the argument List into this. More... | |
void | transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &) |
Transfer contents of the argument DynamicList into this. More... | |
Xfer< List< T > > | xfer () |
Transfer contents to the Xfer container as a plain List. More... | |
DynamicList< T, SizeInc, SizeMult, SizeDiv > & | append (const T &) |
Append an element at the end of the list. More... | |
DynamicList< T, SizeInc, SizeMult, SizeDiv > & | append (const UList< T > &) |
Append a List at the end of this list. More... | |
DynamicList< T, SizeInc, SizeMult, SizeDiv > & | append (const UIndirectList< T > &) |
Append a UIndirectList at the end of this list. More... | |
T | remove () |
Remove and return the top element. More... | |
T & | operator() (const label) |
Return non-const access to an element, resizing list if. More... | |
void | operator= (const T &) |
Assignment of all addressed entries to the given value. More... | |
void | operator= (const DynamicList< T, SizeInc, SizeMult, SizeDiv > &) |
Assignment from DynamicList. More... | |
void | operator= (const UList< T > &) |
Assignment from UList. More... | |
void | operator= (const UIndirectList< T > &) |
Assignment from UIndirectList. More... | |
Static Private Attributes | |
static const const_iterator | endIter_ |
const_iterator returned by end(), cend() More... | |
Friends | |
Istream & | operator>> (Istream &, labelRanges &) |
Ostream & | operator<< (Ostream &, const labelRanges &) |
|
private |
Definition at line 64 of file labelRanges.H.
|
inline |
Construct null.
Definition at line 29 of file labelRangesI.H.
|
inlineexplicit |
Construct given size.
Definition at line 35 of file labelRangesI.H.
labelRanges | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 119 of file labelRanges.C.
|
private |
Insert range before specified insertion index, by copying up.
Definition at line 37 of file labelRanges.C.
References Foam::endl(), Foam::Info, insert(), Foam::nl, range, and setSize().
|
private |
Purge empty ranges, by copying down.
Definition at line 78 of file labelRanges.C.
References forAll, DynamicList< labelRange >::operator, and DynamicList< labelRange >::setSize().
|
private |
Print the range for debugging purposes.
Definition at line 100 of file labelRanges.C.
References range.
|
inline |
Return true if the value is within any of the ranges.
Definition at line 152 of file labelRangesI.H.
References forAll, and DynamicList< labelRange >::operator.
bool add | ( | const labelRange & | range | ) |
Add the range to the list.
Definition at line 127 of file labelRanges.C.
References labelRange::clear(), forAll, labelRange::intersects(), and range.
Referenced by main().
bool remove | ( | const labelRange & | range | ) |
Remove the range from the list.
Definition at line 185 of file labelRanges.C.
References labelRange::debug, Foam::endl(), labelRange::first(), forAll, Foam::Info, labelRange::last(), and range.
Referenced by main().
|
inline |
const_iterator set to the beginning of the list
Definition at line 126 of file labelRangesI.H.
|
inline |
const_iterator set to beyond the end of the list
Definition at line 132 of file labelRangesI.H.
References labelRanges::endIter_.
|
inline |
const_iterator set to the beginning of the list
Definition at line 138 of file labelRangesI.H.
|
inline |
const_iterator set to beyond the end of the list
Definition at line 144 of file labelRangesI.H.
References labelRanges::endIter_.
|
friend |
|
friend |
|
staticprivate |
const_iterator returned by end(), cend()
Definition at line 173 of file labelRanges.H.
Referenced by labelRanges::cend(), and labelRanges::end().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.