OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

PackedList Class Template Reference

Inheritance diagram for PackedList:

Inheritance graph
[legend]
Collaboration diagram for PackedList:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 103 of file PackedList.H.


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.
inline::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 103 of file PackedListI.H.

PackedList ( const label  size  )  [inline]

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

Definition at line 112 of file PackedListI.H.

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

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

Clone.

Reimplemented from List< unsigned int >.

void setSize ( const   label  ) 

Reset size of List.

Reimplemented from List< unsigned int >.

void clear (  ) 

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

Reimplemented from List< unsigned int >.

void transfer ( PackedList< nBits > &   ) 

Transfer the contents of the argument List into this List.

and annull the argument list.

label size (  )  const [inline]

Number of packed elements.

Reimplemented from UList< unsigned int >.

Definition at line 122 of file PackedListI.H.

unsigned int get ( const label  i  )  const [inline]

Get value at index I.

Definition at line 130 of file PackedListI.H.

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

Set value at index I.

Definition at line 159 of file PackedListI.H.

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

Get value at index i.

Reimplemented from UList< unsigned int >.

Definition at line 151 of file PackedListI.H.

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

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

Reimplemented from UList< unsigned int >.

Definition at line 188 of file PackedListI.H.

void operator= ( const PackedList< nBits > &   ) 

Assignment operator. Takes linear time.

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

Assignment of all entries to the given value.

Definition at line 212 of file PackedListI.H.

labelList operator() (  )  const

Return as labelList.


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