Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
IntRange< IntType > Class Template Reference

An interval of (signed) integers defined by a start and a size. More...

Inheritance diagram for IntRange< IntType >:
Inheritance graph
[legend]

Classes

class  const_iterator
 
class  const_reverse_iterator
 

Public Types

typedef IntType value_type
 
typedef IntType size_type
 

Public Member Functions

constexpr IntRange () noexcept
 
constexpr IntRange (const IntType len) noexcept
 
constexpr IntRange (const IntType beg, const IntType len) noexcept
 
IntType start () const noexcept
 
IntType size () const noexcept
 
IntType & start () noexcept
 
IntType & size () noexcept
 
bool empty () const noexcept
 
IntType first () const noexcept
 
IntType last () const noexcept
 
void clear () noexcept
 
void reset (const IntType beg, const IntType len) noexcept
 
void setStart (const IntType i) noexcept
 
void setSize (const IntType n) noexcept
 
void resize (const IntType n) noexcept
 
void clampSize () noexcept
 
bool found (const IntType value) const noexcept
 
constexpr IntType operator[] (const IntType i) const noexcept
 
bool operator() (const IntType value) const noexcept
 
IntType operator++ () noexcept
 
IntType operator++ (int) noexcept
 
IntType operator+= (const IntType n) noexcept
 
IntType operator-- () noexcept
 
IntType operator-- (int) noexcept
 
IntType operator-= (const IntType n) noexcept
 
 operator bool () const noexcept
 
const_iterator at (const IntType 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
 

Protected Member Functions

IntType rend_value () const noexcept
 
IntType end_value () const noexcept
 

Detailed Description

template<class IntType>
class Foam::IntRange< IntType >

An interval of (signed) integers defined by a start and a size.

Note
Only a minimum of IO operators are defined, to avoid incurring too many dependencies or cyclic dependencies.
Source files

Definition at line 59 of file IntRange.H.

Member Typedef Documentation

◆ value_type

typedef IntType value_type

Definition at line 90 of file IntRange.H.

◆ size_type

typedef IntType size_type

Definition at line 93 of file IntRange.H.

Constructor & Destructor Documentation

◆ IntRange() [1/3]

constexpr IntRange
inlineconstexprnoexcept

Definition at line 24 of file IntRangeI.H.

◆ IntRange() [2/3]

constexpr IntRange ( const IntType  len)
inlineexplicitconstexprnoexcept

Definition at line 33 of file IntRangeI.H.

◆ IntRange() [3/3]

constexpr IntRange ( const IntType  beg,
const IntType  len 
)
inlineconstexprnoexcept

Definition at line 44 of file IntRangeI.H.

Member Function Documentation

◆ rend_value()

IntType rend_value
inlineprotectednoexcept

Definition at line 450 of file IntRangeI.H.

Referenced by labelRange::before().

Here is the caller graph for this function:

◆ end_value()

IntType end_value
inlineprotectednoexcept

Definition at line 457 of file IntRangeI.H.

Referenced by labelRange::after().

Here is the caller graph for this function:

◆ start() [1/2]

IntType & start
inlinenoexcept

Definition at line 401 of file IntRangeI.H.

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

Here is the caller graph for this function:

◆ size() [1/2]

IntType & size
inlinenoexcept

Definition at line 408 of file IntRangeI.H.

Referenced by Foam::operator<(), and Foam::operator==().

Here is the caller graph for this function:

◆ start() [2/2]

IntType& start ( )
inlinenoexcept

◆ size() [2/2]

IntType& size ( )
inlinenoexcept

◆ empty()

bool empty
inlinenoexcept

Definition at line 429 of file IntRangeI.H.

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

Here is the caller graph for this function:

◆ first()

IntType first
inlinenoexcept

Definition at line 436 of file IntRangeI.H.

Referenced by Foam::operator<(), Foam::operator==(), labelRanges::remove(), Foam::BitOps::set(), bitSet::set(), and bitSet::unset().

Here is the caller graph for this function:

◆ last()

IntType last
inlinenoexcept

Definition at line 443 of file IntRangeI.H.

Referenced by labelRanges::remove(), and Foam::BitOps::set().

Here is the caller graph for this function:

◆ clear()

void clear
inlinenoexcept

Definition at line 464 of file IntRangeI.H.

Referenced by labelRanges::add().

Here is the caller graph for this function:

◆ reset()

void reset ( const IntType  beg,
const IntType  len 
)
inlinenoexcept

Definition at line 472 of file IntRangeI.H.

◆ setStart()

void setStart ( const IntType  i)
inlinenoexcept

Definition at line 483 of file IntRangeI.H.

◆ setSize()

void setSize ( const IntType  n)
inlinenoexcept

Definition at line 490 of file IntRangeI.H.

◆ resize()

void resize ( const IntType  n)
inlinenoexcept

Definition at line 497 of file IntRangeI.H.

◆ clampSize()

void clampSize
inlinenoexcept

Definition at line 504 of file IntRangeI.H.

Referenced by labelRange::join(), IntRange< label >::operator--(), IntRange< label >::operator-=(), and labelRanges::remove().

Here is the caller graph for this function:

◆ found()

bool found ( const IntType  value) const
inlinenoexcept

Definition at line 511 of file IntRangeI.H.

Referenced by IntRange< label >::operator()().

Here is the caller graph for this function:

◆ operator[]()

constexpr IntType operator[] ( const IntType  i) const
inlineconstexprnoexcept

Definition at line 524 of file IntRangeI.H.

◆ operator()()

bool operator() ( const IntType  value) const
inlinenoexcept

Definition at line 532 of file IntRangeI.H.

◆ operator++() [1/2]

IntType operator++
inlinenoexcept

Definition at line 540 of file IntRangeI.H.

◆ operator++() [2/2]

IntType operator++ ( int  )
inlinenoexcept

Definition at line 548 of file IntRangeI.H.

◆ operator+=()

IntType operator+= ( const IntType  n)
inlinenoexcept

Definition at line 577 of file IntRangeI.H.

◆ operator--() [1/2]

IntType operator--
inlinenoexcept

Definition at line 556 of file IntRangeI.H.

◆ operator--() [2/2]

IntType operator-- ( int  )
inlinenoexcept

Definition at line 566 of file IntRangeI.H.

◆ operator-=()

IntType operator-= ( const IntType  n)
inlinenoexcept

Definition at line 586 of file IntRangeI.H.

◆ operator bool()

operator bool ( ) const
inlineexplicitnoexcept

Definition at line 198 of file IntRange.H.

◆ at()

Foam::IntRange< IntType >::const_iterator at ( const IntType  i) const
inline

Definition at line 328 of file IntRangeI.H.

◆ begin()

Foam::IntRange< IntType >::const_iterator begin
inlinenoexcept

Definition at line 336 of file IntRangeI.H.

◆ cbegin()

Foam::IntRange< IntType >::const_iterator cbegin
inlinenoexcept

Definition at line 344 of file IntRangeI.H.

◆ cend()

Foam::IntRange< IntType >::const_iterator cend
inlinenoexcept

Definition at line 360 of file IntRangeI.H.

◆ end()

Foam::IntRange< IntType >::const_iterator end
inlinenoexcept

Definition at line 352 of file IntRangeI.H.

◆ rbegin()

Foam::IntRange< IntType >::const_reverse_iterator rbegin
inlinenoexcept

Definition at line 368 of file IntRangeI.H.

◆ crbegin()

Foam::IntRange< IntType >::const_reverse_iterator crbegin
inlinenoexcept

Definition at line 376 of file IntRangeI.H.

◆ rend()

Foam::IntRange< IntType >::const_reverse_iterator rend
inlinenoexcept

Definition at line 384 of file IntRangeI.H.

◆ crend()

Foam::IntRange< IntType >::const_reverse_iterator crend
inlinenoexcept

Definition at line 392 of file IntRangeI.H.


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