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

SubList< T > Class Template Reference

A List obtained as a section of another List. More...

Inheritance diagram for SubList< T >:
Collaboration diagram for SubList< T >:

List of all members.


Public Member Functions

 SubList (const UList< T > &list, const label subSize)
 Construct from UList and sub-list size.
 SubList (const UList< T > &list, const label subSize, const label startIndex)
 Construct from UList, sub-list size and start index.
 operator const Foam::List< T > & () const
 Allow cast to a const List<T>&.
void operator= (const T &)
 Assignment of all entries to the given value.

Static Public Member Functions

static const SubList< T > & null ()
 Return a null SubList.

Detailed Description

template<class T>
class Foam::SubList< T >

A List obtained as a section of another List.

Since the SubList is itself unallocated, no storage is allocated or de-allocated during its use. To achieve this behaviour, SubList is derived from UList rather than List.

Source files

Definition at line 49 of file SubList.H.


Constructor & Destructor Documentation

SubList ( const UList< T > &  list,
const label  subSize 
) [inline]

Construct from UList and sub-list size.

Definition at line 22 of file SubListI.H.

SubList ( const UList< T > &  list,
const label  subSize,
const label  startIndex 
) [inline]

Construct from UList, sub-list size and start index.

Definition at line 37 of file SubListI.H.

References UList< T >::checkSize().

Here is the call graph for this function:


Member Function Documentation

const Foam::SubList< T > & null (  )  [inline, static]

Return a null SubList.

Reimplemented from UList< T >.

Reimplemented in SubDimensionedField< Type, GeoMesh >, SubField< Type >, SubField< Type >, and SubField< point >.

Definition at line 67 of file SubListI.H.

operator const Foam::List< T > & (  )  const [inline]

Allow cast to a const List<T>&.

Reimplemented from UList< T >.

Definition at line 76 of file SubListI.H.

void operator= ( const T &  t  )  [inline]

Assignment of all entries to the given value.

Reimplemented from UList< T >.

Definition at line 83 of file SubListI.H.


The documentation for this class was generated from the following files:
  • src/OpenFOAM/containers/Lists/SubList/SubList.H
  • src/OpenFOAM/containers/Lists/SubList/SubListI.H
Copyright © 2000-2009 OpenCFD Ltd