Public Member Functions | Static Public Attributes | List of all members
labelRange Class Reference

A range or interval of labels defined by a start and a size. More...

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

Public Member Functions

constexpr labelRange () noexcept
 
constexpr labelRange (const label len) noexcept
 
 labelRange (const label beg, const label len) noexcept
 
 labelRange (const label beg, const label len, const bool adjustStart) noexcept
 
 labelRange (const MinMax< label > &range) noexcept
 
 labelRange (Istream &is)
 
label min () const noexcept
 
label max () const noexcept
 
label before () const noexcept
 
label after () const noexcept
 
void adjust () noexcept
 
void reset (const label beg, const label end, const bool adjustStart) noexcept
 
List< label > labels () const
 
bool overlaps (const labelRange &range, bool touches=false) const
 
labelRange join (const labelRange &range) const
 
labelRange subset (const labelRange &range) const
 
labelRange subset (const label start, const label size) const
 
labelRange subset0 (const label size) const
 
bool valid () const noexcept
 
- Public Member Functions inherited from IntRange< label >
constexpr IntRange () noexcept
 
constexpr IntRange (const label len) noexcept
 
constexpr IntRange (const label beg, const label len) noexcept
 
label start () const noexcept
 
label & start () noexcept
 
label size () const noexcept
 
label & size () noexcept
 
bool empty () const noexcept
 
label first () const noexcept
 
label last () const noexcept
 
void clear () noexcept
 
void reset (const label beg, const label len) noexcept
 
void setStart (const label i) noexcept
 
void setSize (const label n) noexcept
 
void resize (const label n) noexcept
 
void clampSize () noexcept
 
bool found (const label value) const noexcept
 
constexpr label operator[] (const label i) const noexcept
 
bool operator() (const label value) const noexcept
 
label operator++ () noexcept
 
label operator++ (int) noexcept
 
label operator+= (const label n) noexcept
 
label operator-- () noexcept
 
label operator-- (int) noexcept
 
label operator-= (const label n) noexcept
 
 operator bool () const noexcept
 
const_iterator at (const label i) const
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_iterator end () const noexcept
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crend () const noexcept
 

Static Public Attributes

static int debug
 

Additional Inherited Members

- Public Types inherited from IntRange< label >
typedef label value_type
 
typedef label size_type
 
- Protected Member Functions inherited from IntRange< label >
label rend_value () const noexcept
 
label end_value () const noexcept
 

Detailed Description

A range or interval of labels defined by a start and a size.

Source files

Definition at line 51 of file labelRange.H.

Constructor & Destructor Documentation

◆ labelRange() [1/6]

constexpr labelRange ( )
inlineconstexprnoexcept

Definition at line 24 of file labelRangeI.H.

◆ labelRange() [2/6]

constexpr labelRange ( const label  len)
inlineexplicitconstexprnoexcept

Definition at line 30 of file labelRangeI.H.

◆ labelRange() [3/6]

labelRange ( const label  beg,
const label  len 
)
inlinenoexcept

Definition at line 37 of file labelRangeI.H.

◆ labelRange() [4/6]

labelRange ( const label  beg,
const label  len,
const bool  adjustStart 
)
inlinenoexcept

Definition at line 49 of file labelRangeI.H.

◆ labelRange() [5/6]

labelRange ( const MinMax< label > &  range)
explicitnoexcept

Definition at line 37 of file labelRange.C.

References range.

◆ labelRange() [6/6]

labelRange ( Istream is)
explicit

Definition at line 49 of file labelRange.C.

Member Function Documentation

◆ min()

Foam::label min ( ) const
inlinenoexcept

Definition at line 70 of file labelRangeI.H.

◆ max()

Foam::label max ( ) const
inlinenoexcept

Definition at line 76 of file labelRangeI.H.

◆ before()

Foam::label before ( ) const
inlinenoexcept

Definition at line 82 of file labelRangeI.H.

References IntRange< IntType >::rend_value().

Here is the call graph for this function:

◆ after()

Foam::label after ( ) const
inlinenoexcept

Definition at line 88 of file labelRangeI.H.

References IntRange< IntType >::end_value().

Referenced by Foam::BitOps::set(), bitSet::set(), and bitSet::unset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjust()

void adjust ( )
noexcept

Definition at line 74 of file labelRange.C.

Referenced by Foam::BitOps::set(), and bitSet::set().

Here is the caller graph for this function:

◆ reset()

void reset ( const label  beg,
const label  end,
const bool  adjustStart 
)
inlinenoexcept

Definition at line 95 of file labelRangeI.H.

References reset().

Referenced by labelRanges::remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ labels()

Foam::List< Foam::label > labels ( ) const

Definition at line 59 of file labelRange.C.

◆ overlaps()

bool overlaps ( const labelRange range,
bool  touches = false 
) const

Definition at line 89 of file labelRange.C.

References range.

Referenced by labelRanges::add().

Here is the caller graph for this function:

◆ join()

Foam::labelRange join ( const labelRange range) const

Definition at line 112 of file labelRange.C.

References IntRange< IntType >::clampSize(), Foam::stringOps::lower(), Foam::max(), Foam::min(), range, and Foam::stringOps::upper().

Referenced by labelRanges::add().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subset() [1/2]

Foam::labelRange subset ( const labelRange range) const

Definition at line 137 of file labelRange.C.

References Foam::stringOps::lower(), Foam::max(), Foam::min(), range, and Foam::stringOps::upper().

Here is the call graph for this function:

◆ subset() [2/2]

Foam::labelRange subset ( const label  start,
const label  size 
) const

Definition at line 155 of file labelRange.C.

References Foam::stringOps::lower(), Foam::max(), Foam::min(), and Foam::stringOps::upper().

Here is the call graph for this function:

◆ subset0()

Foam::labelRange subset0 ( const label  size) const

Definition at line 175 of file labelRange.C.

References Foam::stringOps::lower(), Foam::max(), Foam::min(), and Foam::stringOps::upper().

Referenced by UList< Foam::wordRe >::validateRange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid()

bool valid ( ) const
inlinenoexcept

Definition at line 179 of file labelRange.H.

References bool, and IntRange< label >::size().

Here is the call graph for this function:

Member Data Documentation

◆ debug

int debug
static

Definition at line 69 of file labelRange.H.

Referenced by labelRanges::remove().


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