PackedList< nBits >::const_iterator Class Reference

The const_iterator for PackedList. More...

Inheritance diagram for PackedList< nBits >::const_iterator:
Collaboration diagram for PackedList< nBits >::const_iterator:

Public Member Functions

 const_iterator ()
 Construct null. More...
 
 const_iterator (const iteratorBase &)
 Construct from iterator base, eg iter(packedlist[i]) More...
 
 const_iterator (const PackedList *, const label)
 Construct from base list and position index. More...
 
 const_iterator (const iterator &)
 Construct from iterator. More...
 
bool operator== (const iteratorBase &) const
 Compare positions (not values) More...
 
bool operator!= (const iteratorBase &) const
 
void operator= (const iteratorBase &)
 Assign from iteratorBase or derived. More...
 
unsigned int operator* () const
 Return referenced value directly. More...
 
unsigned int operator() () const
 Return referenced value directly. More...
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator-- ()
 
const_iterator operator-- (int)
 
- Public Member Functions inherited from PackedList< nBits >::iteratorBase
 iteratorBase (const iteratorBase &)=default
 Default copy constructor. More...
 
label key () const
 Return the element index corresponding to the iterator. More...
 
bool writeIfSet (Ostream &) const
 Write index/value for a non-zero entry. More...
 
bool operator== (const iteratorBase &) const
 Compare values (not positions) More...
 
bool operator!= (const iteratorBase &) const
 
void operator= (const iteratorBase &)
 Assign value, not position. More...
 
void operator= (const unsigned int val)
 Assign value. More...
 
 operator unsigned int () const
 Conversion operator. More...
 
OstreamprintInfo (Ostream &) const
 Print information and values. More...
 
bool writeIfSet (Ostream &os) const
 

Additional Inherited Members

- Protected Member Functions inherited from PackedList< nBits >::iteratorBase
unsigned int get () const
 Get value as unsigned, no range-checking. More...
 
bool set (unsigned int)
 Set value, returning true if changed, no range-checking. More...
 
 iteratorBase ()
 Construct null. More...
 
 iteratorBase (const PackedList *, const label)
 Construct from base list and position index. More...
 
- Protected Attributes inherited from PackedList< nBits >::iteratorBase
PackedListlist_
 Pointer to original list. More...
 
label index_
 Element index. More...
 

Detailed Description

template<unsigned nBits = 1>
class Foam::PackedList< nBits >::const_iterator

The const_iterator for PackedList.

Definition at line 560 of file PackedList.H.

Constructor & Destructor Documentation

◆ const_iterator() [1/4]

Construct null.

Definition at line 404 of file PackedListI.H.

◆ const_iterator() [2/4]

const_iterator ( const iteratorBase iter)
inline

Construct from iterator base, eg iter(packedlist[i])

but also "const_iterator iter = packedlist[i];" An out-of-range iterator is assigned cend()

Definition at line 428 of file PackedListI.H.

◆ const_iterator() [3/4]

const_iterator ( const PackedList ,
const  label 
)
inline

Construct from base list and position index.

◆ const_iterator() [4/4]

const_iterator ( const iterator iter)
inline

Construct from iterator.

Definition at line 467 of file PackedListI.H.

Member Function Documentation

◆ operator==()

bool operator== ( const iteratorBase iter) const
inline

Compare positions (not values)

Definition at line 497 of file PackedListI.H.

References PackedList< nBits >::iteratorBase::index_.

◆ operator!=()

bool operator!= ( const iteratorBase iter) const
inline

Definition at line 507 of file PackedListI.H.

◆ operator=()

void operator= ( const iteratorBase iter)
inline

Assign from iteratorBase or derived.

eg, iter = packedlist[i] or even iter = list.begin()

Definition at line 535 of file PackedListI.H.

◆ operator*()

unsigned int operator*
inline

Return referenced value directly.

Definition at line 646 of file PackedListI.H.

◆ operator()()

unsigned int operator()
inline

Return referenced value directly.

Definition at line 654 of file PackedListI.H.

◆ operator++() [1/2]

Definition at line 563 of file PackedListI.H.

◆ operator++() [2/2]

Foam::PackedList< nBits >::const_iterator operator++ ( int  )
inline

Definition at line 582 of file PackedListI.H.

◆ operator--() [1/2]

Definition at line 601 of file PackedListI.H.

◆ operator--() [2/2]

Foam::PackedList< nBits >::const_iterator operator-- ( int  )
inline

Definition at line 620 of file PackedListI.H.


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