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 |
iteratorBase | ( | ) | [inline, protected]
|
Construct null.
Definition at line 116 of file PackedListI.H.
iteratorBase | ( | const PackedList * | , |
const | label | ||
) | [inline, protected]
|
Construct from base list and position index.
unsigned int get | ( | ) | const [inline, protected]
|
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().
bool set | ( | unsigned int | val ) | [inline, protected]
|
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().
bool operator== | ( | const iteratorBase & | iter ) | const [inline]
|
Compare values (not positions)
Reimplemented in PackedList< nBits >::iterator, and PackedList< nBits >::const_iterator.
Definition at line 177 of file PackedListI.H.
References PackedList< nBits >::get().
bool operator!= | ( | const iteratorBase & | iter ) | const [inline]
|
Reimplemented in PackedList< nBits >::iterator, and PackedList< nBits >::const_iterator.
Definition at line 187 of file PackedListI.H.
unsigned int operator= | ( | const iteratorBase & | iter ) | [inline]
|
Assign value, not position.
This allows packed[0] = packed[3] for assigning values
Reimplemented in PackedList< nBits >::iterator, and PackedList< nBits >::const_iterator.
Definition at line 197 of file PackedListI.H.
References PackedList< nBits >::iteratorBase::get().
unsigned int operator= | ( | const unsigned int | val ) | [inline]
|
Assign value.
A non-existent entry will be auto-vivified.
Definition at line 207 of file PackedListI.H.
operator unsigned int | ( | ) | const [inline]
|
Foam::Ostream & print | ( | Ostream & | os ) | const |
friend class PackedList [friend]
|
Definition at line 306 of file PackedList.H.
PackedList* list_ [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 >::const_iterator::operator=(), and PackedList< nBits >::iterator::operator=().
label index_ [protected]
|
Element index.
Definition at line 317 of file PackedList.H.
Referenced by PackedList< nBits >::const_iterator::operator!=(), PackedList< nBits >::iterator::operator!=(), PackedList< nBits >::const_iterator::operator=(), PackedList< nBits >::iterator::operator=(), PackedList< nBits >::const_iterator::operator==(), and PackedList< nBits >::iterator::operator==().