Classes | Public Member Functions | Friends | List of all members
labelRanges Class Reference

A list of labelRange. More...

Inheritance diagram for labelRanges:
Inheritance graph
[legend]
Collaboration diagram for labelRanges:
Collaboration graph
[legend]

Classes

class  const_iterator
 Forward input iterator with const access. More...
 

Public Member Functions

 labelRanges ()=default
 Default construct. More...
 
 labelRanges (const label nElem)
 Construct given size. More...
 
 labelRanges (Istream &is)
 Construct from Istream. More...
 
bool contains (const label value) const
 True if the value is contained within any of the sub-ranges. More...
 
bool found (const label value) const
 True if the value is contained within any of the sub-ranges. More...
 
bool add (const labelRange &range)
 Add the range to the list. More...
 
bool remove (const labelRange &range)
 Remove the range from the list. More...
 
const_iterator cbegin () const noexcept
 A const_iterator set to the beginning of the list. More...
 
const const_iterator cend () const noexcept
 A const_iterator set to beyond the end of the list. More...
 
const_iterator begin () const noexcept
 A const_iterator set to the beginning of the list. More...
 
const const_iterator end () const noexcept
 A const_iterator set to beyond the end of the list. More...
 

Friends

Istreamoperator>> (Istream &is, labelRanges &ranges)
 
Ostreamoperator<< (Ostream &os, const labelRanges &ranges)
 

Detailed Description

A list of labelRange.

Source files

Definition at line 55 of file labelRanges.H.

Constructor & Destructor Documentation

◆ labelRanges() [1/3]

labelRanges ( )
default

Default construct.

◆ labelRanges() [2/3]

labelRanges ( const label  nElem)
inlineexplicit

Construct given size.

Definition at line 24 of file labelRangesI.H.

◆ labelRanges() [3/3]

labelRanges ( Istream is)

Construct from Istream.

Definition at line 121 of file labelRanges.C.

Member Function Documentation

◆ contains()

bool contains ( const label  value) const
inline

True if the value is contained within any of the sub-ranges.

Definition at line 133 of file labelRangesI.H.

References range.

Referenced by labelRanges::found().

Here is the caller graph for this function:

◆ found()

bool found ( const label  value) const
inline

True if the value is contained within any of the sub-ranges.

Definition at line 124 of file labelRanges.H.

References labelRanges::contains().

Here is the call graph for this function:

◆ add()

bool add ( const labelRange range)

Add the range to the list.

Definition at line 129 of file labelRanges.C.

References append(), IntRange< IntType >::clear(), forAll, labelRange::join(), labelRange::overlaps(), and range.

Here is the call graph for this function:

◆ remove()

bool remove ( const labelRange range)

◆ cbegin()

Foam::labelRanges::const_iterator cbegin ( ) const
inlinenoexcept

A const_iterator set to the beginning of the list.

Definition at line 106 of file labelRangesI.H.

◆ cend()

const Foam::labelRanges::const_iterator cend ( ) const
inlinenoexcept

A const_iterator set to beyond the end of the list.

Definition at line 113 of file labelRangesI.H.

◆ begin()

Foam::labelRanges::const_iterator begin ( ) const
inlinenoexcept

A const_iterator set to the beginning of the list.

Definition at line 120 of file labelRangesI.H.

◆ end()

const Foam::labelRanges::const_iterator end ( ) const
inlinenoexcept

A const_iterator set to beyond the end of the list.

Definition at line 127 of file labelRangesI.H.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
labelRanges ranges 
)
friend

◆ operator<<

Ostream& operator<< ( Ostream os,
const labelRanges ranges 
)
friend

The documentation for this class was generated from the following files: