OpenFOAM logo
Open Source CFD Toolkit

PackedList Class Template Reference

Inheritance diagram for PackedList:

Inheritance graph
[legend]
Collaboration diagram for PackedList:

Collaboration graph
[legend]
List of all members.

template<int nBits>
class Foam::PackedList< nBits >


Public Member Functions

 PackedList ()
 Null constructor.
 PackedList (const label size)
 Construct with given size. Note: initializes intList to 0.
 PackedList (const label size, const unsigned int val)
 Construct with given size and value for all elements.
 PackedList (const PackedList< nBits > &PList)
 Copy constructor.
 PackedList (const labelList &)
 Construct from labelList.
autoPtr< PackedList< nBits > > clone () const
 Clone.
void setSize (const label)
 Reset size of List.
void clear ()
 Clear the list, i.e. set size to zero.
void transfer (PackedList< nBits > &)
 Transfer the contents of the argument List into this List.
label size () const
 Number of packed elements.
unsigned int get (const label i) const
 Get value at index I.
void set (const label i, const unsigned int val)
 Set value at index I.
unsigned int operator[] (const label i) const
 Get value at index i.
::Foam::reference operator[] (const label i)
 Set value at index i. Returns proxy which does actual operation.
void operator= (const PackedList< nBits > &)
 Assignment operator. Takes linear time.
void operator= (const unsigned int val)
 Assignment of all entries to the given value.
labelList operator() () const
 Return as labelList.

Constructor & Destructor Documentation

PackedList  )  [inline]
 

Null constructor.

Definition at line 91 of file PackedListI.H.

References Foam::size().

Here is the call graph for this function:

PackedList const label  size  )  [inline]
 

Construct with given size. Note: initializes intList to 0.

Definition at line 100 of file PackedListI.H.

References Foam::label.

PackedList const label  size,
const unsigned int  val
 

Construct with given size and value for all elements.

PackedList const PackedList< nBits > &  PList  ) 
 

Copy constructor.

PackedList const labelList  ) 
 

Construct from labelList.


Member Function Documentation

void clear  ) 
 

Clear the list, i.e. set size to zero.

Reimplemented from List< unsigned int >.

autoPtr<PackedList<nBits> > clone  )  const [inline]
 

Clone.

Reimplemented from List< unsigned int >.

unsigned int get const label  i  )  const [inline]
 

Get value at index I.

Definition at line 118 of file PackedListI.H.

References Foam::label.

labelList operator()  )  const
 

Return as labelList.

void operator= const unsigned int  val  )  [inline]
 

Assignment of all entries to the given value.

Definition at line 200 of file PackedListI.H.

void operator= const PackedList< nBits > &   ) 
 

Assignment operator. Takes linear time.

Foam::reference operator[] const label  i  )  [inline]
 

Set value at index i. Returns proxy which does actual operation.

Definition at line 176 of file PackedListI.H.

References Foam::label.

unsigned int operator[] const label  i  )  const [inline]
 

Get value at index i.

Definition at line 139 of file PackedListI.H.

References UList< unsigned int >::checkIndex().

Here is the call graph for this function:

void set const label  i,
const unsigned int  val
[inline]
 

Set value at index I.

Definition at line 147 of file PackedListI.H.

References Foam::label.

void setSize const   label  ) 
 

Reset size of List.

Reimplemented from List< unsigned int >.

label size  )  const [inline]
 

Number of packed elements.

Reimplemented from UList< unsigned int >.

Definition at line 110 of file PackedListI.H.

References UList< unsigned int >::checkIndex().

Here is the call graph for this function:

void transfer PackedList< nBits > &   ) 
 

Transfer the contents of the argument List into this List.

and annull the argument list.


The documentation for this class was generated from the following files:
For further information go to www.openfoam.org