The iterator base for PackedList. More...
#include <src/OpenFOAM/containers/Lists/PackedList/PackedList.H>
The iterator base for PackedList.
Note: data and functions are protected, to allow reuse by iterator and prevent most external usage.
Definition at line 304 of file PackedList.H.
Public Member Functions | |
bool | operator== (const iteratorBase &) const |
Compare values (not positions) | |
bool | operator!= (const iteratorBase &) const |
unsigned int | operator= (const iteratorBase &) |
Assign value, not position. | |
unsigned int | operator= (const unsigned int val) |
Assign value. | |
operator unsigned int () const | |
Conversion operator. | |
Ostream & | print (Ostream &) const |
Print value and information. |
Protected Member Functions | |
unsigned int | get () const |
Get value as unsigned, no range-checking. | |
bool | set (unsigned int) |
Set value, returning true if changed, no range-checking. | |
iteratorBase () | |
Construct null. | |
iteratorBase (const PackedList *, const label) | |
Construct from base list and position index. |
Protected Attributes | |
PackedList * | list_ |
Pointer to original list. | |
label | index_ |
Element index. |
Friends | |
class | PackedList |
|
inlineprotected |
Construct null.
Definition at line 116 of file PackedListI.H.
|
inlineprotected |
Construct from base list and position index.
|
inlineprotected |
Get value as unsigned, no range-checking.
Definition at line 137 of file PackedListI.H.
References PackedList< nBits >::max_value(), and PackedList< nBits >::packing().
Referenced by PackedList< nBits >::get(), PackedList< nBits >::iteratorBase::operator=(), PackedList< nBits >::operator[](), and PackedList< nBits >::remove().
|
inlineprotected |
Set value, returning true if changed, no range-checking.
Definition at line 149 of file PackedListI.H.
References PackedList< nBits >::max_value(), and PackedList< nBits >::packing().
Referenced by PackedList< nBits >::append(), PackedList< nBits >::set(), and PackedList< nBits >::unset().
|
inline |
Compare values (not positions)
Reimplemented in PackedList< nBits >::const_iterator, and PackedList< nBits >::iterator.
Definition at line 177 of file PackedListI.H.
References PackedList< nBits >::get().
|
inline |
Reimplemented in PackedList< nBits >::const_iterator, and PackedList< nBits >::iterator.
Definition at line 187 of file PackedListI.H.
|
inline |
Assign value, not position.
This allows packed[0] = packed[3] for assigning values
Reimplemented in PackedList< nBits >::const_iterator, and PackedList< nBits >::iterator.
Definition at line 197 of file PackedListI.H.
References PackedList< nBits >::iteratorBase::get().
|
inline |
Assign value.
A non-existent entry will be auto-vivified.
Definition at line 207 of file PackedListI.H.
|
inline |
Foam::Ostream & print | ( | Ostream & | os | ) | const |
|
friend |
Definition at line 306 of file PackedList.H.
|
protected |
Pointer to original list.
This also lets us use the default bitwise copy/assignment
Definition at line 314 of file PackedList.H.
Referenced by PackedList< nBits >::iterator::operator=(), and PackedList< nBits >::const_iterator::operator=().
|
protected |
Element index.
Definition at line 317 of file PackedList.H.
Referenced by PackedList< nBits >::iterator::operator!=(), PackedList< nBits >::const_iterator::operator!=(), PackedList< nBits >::iterator::operator=(), PackedList< nBits >::const_iterator::operator=(), PackedList< nBits >::iterator::operator==(), and PackedList< nBits >::const_iterator::operator==().