OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

iteratorBase Class Reference

The iterator base for PackedList. More...

Inheritance diagram for iteratorBase:
Collaboration diagram for iteratorBase:

List of all members.


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

Detailed Description

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

The iterator base for PackedList.

Note: data and functions are protected, to allow reuse by iterator and prevent most external usage.

Definition at line 321 of file PackedList.H.


Constructor & Destructor Documentation

iteratorBase (  )  [inline, protected]

Construct null.

Definition at line 108 of file PackedListI.H.

iteratorBase ( const PackedList *  ,
const   label 
) [inline, protected]

Construct from base list and position index.


Member Function Documentation

unsigned int get (  )  const [inline, protected]

Get value as unsigned, no range-checking.

Definition at line 129 of file PackedListI.H.

Referenced by iteratorBase::operator=().

Here is the caller graph for this function:

bool set ( unsigned int  val  )  [inline, protected]

Set value, returning true if changed, no range-checking.

Definition at line 141 of file PackedListI.H.

bool operator== ( const iteratorBase &  iter  )  const [inline]

Compare values (not positions).

Reimplemented in iterator, and const_iterator.

Definition at line 169 of file PackedListI.H.

bool operator!= ( const iteratorBase &  iter  )  const [inline]

Reimplemented in iterator, and const_iterator.

Definition at line 179 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 iterator, and const_iterator.

Definition at line 189 of file PackedListI.H.

unsigned int operator= ( const unsigned int  val  )  [inline]

Assign value.

A non-existent entry will be auto-vivified.

Definition at line 199 of file PackedListI.H.

References iteratorBase::get().

Here is the call graph for this function:

operator unsigned int (  )  const [inline]

Conversion operator.

Never auto-vivify entries.

Definition at line 214 of file PackedListI.H.

Foam::Ostream & print ( Ostream &  os  )  const [inline]

Print value and information.

Definition at line 182 of file PackedList.C.


Friends And Related Function Documentation

friend class PackedList [friend]

Definition at line 323 of file PackedList.H.


Member Data Documentation

PackedList* list_ [protected]

Pointer to original list.

This also lets us use the default bitwise copy/assignment

Definition at line 333 of file PackedList.H.

Referenced by const_iterator::const_iterator().


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd