OpenFOAM logo
Open Source CFD Toolkit

List Class Template Reference

Inheritance diagram for List:

Inheritance graph
[legend]
Collaboration diagram for List:

Collaboration graph
[legend]
List of all members.

template<class T>
class Foam::List< T >


Public Types

typedef SubList< T > subList
 Declare type of subList.

Public Member Functions

 List ()
 Null constructor.
 List (const label)
 Construct with given size.
 List (const label, const T &)
 Construct with given size and value for all elements.
 List (const List< T > &)
 Copy constructor.
 List (List< T > &, bool reUse)
 Construct as copy or re-use as specified.
template<class InputIterator>
 List (InputIterator first, InputIterator last)
 Construct given size and start and end iterators.
template<label Size>
 List (const FixedList< T, Size > &)
 Construct as copy of FixedList<T, Size>.
 List (const PtrList< T > &)
 Construct as copy of PtrList<T>.
 List (const SLList< T > &)
 Construct as copy of SLList<T>.
 List (const IndirectList< T > &)
 Construct as copy of IndirectList<T>.
 List (Istream &)
 Construct from Istream.
autoPtr< List< T > > clone () const
 Clone.
 ~List ()
void setSize (const label)
 Reset size of List.
void setSize (const label, const T &)
 Reset size of List and value for new elements.
void clear ()
 Clear the list, i.e. set size to zero.
void transfer (List< T > &)
 Transfer the contents of the argument List into this List.
T & newElmt (const label)
 Return subscript-checked element of UList.
void operator= (const UList< T > &)
 Assignment from UList operator. Takes linear time.
void operator= (const List< T > &)
 Assignment operator. Takes linear time.
void operator= (const SLList< T > &)
 Assignment from SLList operator. Takes linear time.
void operator= (const IndirectList< T > &)
 Assignment from IndirectList operator. Takes linear time.
void operator= (const T &)
 Assignment of all entries to the given value.

Static Public Member Functions

List< T > & null ()
 Return a null List.

Friends

Istreamoperator>> (Istream &, List< T > &)
 Read List from Istream, discarding contents of existing List.

Member Typedef Documentation

typedef SubList<T> subList
 

Declare type of subList.

Definition at line 134 of file List.H.


Constructor & Destructor Documentation

List  )  [inline]
 

Null constructor.

Definition at line 40 of file ListI.H.

List const   label  )  [explicit]
 

Construct with given size.

List const   label,
const T & 
 

Construct with given size and value for all elements.

List const List< T > &   ) 
 

Copy constructor.

List List< T > &  ,
bool  reUse
 

Construct as copy or re-use as specified.

List InputIterator  first,
InputIterator  last
 

Construct given size and start and end iterators.

List const FixedList< T, Size > &   ) 
 

Construct as copy of FixedList<T, Size>.

List const PtrList< T > &   ) 
 

Construct as copy of PtrList<T>.

List const SLList< T > &   ) 
 

Construct as copy of SLList<T>.

List const IndirectList< T > &   ) 
 

Construct as copy of IndirectList<T>.

List Istream  ) 
 

Construct from Istream.

~List  ) 
 


Member Function Documentation

void clear  ) 
 

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

Reimplemented in DynamicList, PackedList, DynamicList< procPointList >, DynamicList< polyAddCell >, DynamicList< label >, DynamicList< polyModifyPoint >, DynamicList< point >, DynamicList< polyAddPoint >, DynamicList< face >, DynamicList< word >, DynamicList< polyModifyCell >, DynamicList< polyModifyFace >, DynamicList< polyAddFace >, and PackedList< 1 >.

autoPtr< List< T > > clone  )  const [inline]
 

Clone.

Reimplemented in PackedList, primitiveEntry, Field, BasicSymmetryPointPatchField, FixedValuePointPatchField, MixedPointPatchField, ValueStoredPointPatchField, SlipPointPatchField, SymmetryPointPatchField, curve, cellShape, basicSymmetryFvPatchField, calculatedFvPatchField, coupledFvPatchField, defaultFvPatchField, emptyFvPatchField, fixedGradientFvPatchField, fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, transformFvPatchField, zeroGradientFvPatchField, cyclicFvPatchField, directionMixedFvPatchField, expDirectionMixedFvPatchField, freestreamFvPatchField, inletOutletFvPatchField, oscillatingFixedValueFvPatchField, outletInletFvPatchField, partialSlipFvPatchField, processorFvPatchField, slipFvPatchField, symmetryFvPatchField, timeVaryingUniformFixedValueFvPatchField, turbulentInletFvPatchField, uniformFixedValueFvPatchField, wedgeFvPatchField, fvPatchField, calculatedFaPatchField, coupledFaPatchField, emptyFaPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, zeroGradientFaPatchField, fixedValueOutflowFaPatchField, faPatchField, BasicSymmetryTetPointPatchField, FixedValueTetPointPatchField, MixedTetPointPatchField, ValueStoredTetPointPatchField, SlipTetPointPatchField, SymmetryTetPointPatchField, PackedList< 1 >, Field< tensor >, Field< scalar >, Field< label >, Field< vector >, Field< complexVector >, and Field< T >.

Definition at line 45 of file ListI.H.

References List::setSize(), UList::size(), and Foam::T().

Here is the call graph for this function:

T & newElmt const   label  )  [inline]
 

Return subscript-checked element of UList.

Definition at line 54 of file ListI.H.

List<T>& null  )  [static]
 

Return a null List.

Reimplemented from UList.

Reimplemented in Field, GeometricField, Field< tensor >, Field< scalar >, Field< label >, Field< vector >, Field< complexVector >, Field< T >, GeometricField< vector, fvPatchField, surfaceMesh >, GeometricField< scalar, fvPatchField, surfaceMesh >, GeometricField< Type, tetPolyPatchField, tetPointMesh >, GeometricField< Type, faPatchField, areaMesh >, GeometricField< vector, PatchField, surfaceMesh >, GeometricField< vector, PatchField, volMesh >, GeometricField< vector, faPatchField, edgeMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, faPatchField, edgeMesh >, GeometricField< Type, faPatchField, edgeMesh >, GeometricField< vector, faPatchField, areaMesh >, GeometricField< Type, fvPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, tetPolyPatchField, tetPointMesh >, GeometricField< scalar, tetPolyPatchField, elementMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< scalar, faPatchField, areaMesh >, and GeometricField< Type, fvPatchField, volMesh >.

void operator= const T &   )  [inline]
 

Assignment of all entries to the given value.

Reimplemented from UList.

Reimplemented in DynamicList, Field, FixedValuePointPatchField, ValueStoredPointPatchField, fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, directionMixedFvPatchField, expDirectionMixedFvPatchField, partialSlipFvPatchField, fvPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, fixedValueOutflowFaPatchField, faPatchField, FixedValueTetPointPatchField, ValueStoredTetPointPatchField, DynamicList< procPointList >, DynamicList< polyAddCell >, DynamicList< label >, DynamicList< polyModifyPoint >, DynamicList< point >, DynamicList< polyAddPoint >, DynamicList< face >, DynamicList< word >, DynamicList< polyModifyCell >, DynamicList< polyModifyFace >, DynamicList< polyAddFace >, Field< tensor >, Field< scalar >, Field< label >, Field< vector >, Field< complexVector >, and Field< T >.

Definition at line 68 of file ListI.H.

void operator= const IndirectList< T > &   ) 
 

Assignment from IndirectList operator. Takes linear time.

void operator= const SLList< T > &   ) 
 

Assignment from SLList operator. Takes linear time.

void operator= const List< T > &   ) 
 

Assignment operator. Takes linear time.

Reimplemented in IOList, IOList< label >, and IOList< face >.

void operator= const UList< T > &   ) 
 

Assignment from UList operator. Takes linear time.

Reimplemented in Field, fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, partialSlipFvPatchField, fvPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, fixedValueOutflowFaPatchField, faPatchField, Field< tensor >, Field< scalar >, Field< label >, Field< vector >, Field< complexVector >, and Field< T >.

void setSize const   label,
const T & 
 

Reset size of List and value for new elements.

void setSize const   label  ) 
 

Reset size of List.

Reimplemented in DynamicList, PackedList, SortableList, DynamicList< procPointList >, DynamicList< polyAddCell >, DynamicList< label >, DynamicList< polyModifyPoint >, DynamicList< point >, DynamicList< polyAddPoint >, DynamicList< face >, DynamicList< word >, DynamicList< polyModifyCell >, DynamicList< polyModifyFace >, DynamicList< polyAddFace >, and PackedList< 1 >.

Referenced by List::clone(), and cellShape::collapsedFaces().

void transfer List< T > &   ) 
 

Transfer the contents of the argument List into this List.

and annull the argument list.


Friends And Related Function Documentation

Istream& operator>> Istream ,
List< T > & 
[friend]
 

Read List from Istream, discarding contents of existing List.


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