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

UPtrList Class Template Reference

Collaboration diagram for UPtrList:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class Foam::UPtrList< T >

Definition at line 104 of file UPtrList.H.


Public Types

typedef T value_type
 Type of values the UPtrList contains.
typedef T & reference
 Type that can be used for storing into UPtrList::value_type objects.
typedef const T & const_reference
 Type that can be used for storing into constant UPtrList::value_type.

Public Member Functions

 UPtrList ()
 Null Constructor.
 UPtrList (const label)
 Construct with length specified.
 UPtrList (UPtrList< T > &, bool reUse)
 Construct as copy or re-use as specified.
label size () const
 Return the number of elements in the UPtrList.
void setSize (const label)
 Reset size of UPtrList. This can only be used to set the size.
void clear ()
 Clear the UPtrList, i.e. set size to zero.
void transfer (UPtrList< T > &)
 Transfer the contents of the argument UPtrList into this.
bool set (const label) const
 Is element set.
T * set (const label, T *)
 Set element. Return old element (can be NULL).
void reorder (const UList< label > &)
 Reorders elements. Ordering does not have to be done in.
const T & operator[] (const label) const
 Return element const reference.
T & operator[] (const label)
 Return element reference.
const T * operator() (const label) const
 Return element const pointer.
iterator begin ()
 Return an iterator to begin traversing the UPtrList.
iterator end ()
 Return an iterator to end traversing the UPtrList.

Friends

class iterator
Ostream & operator (Ostream &, const UPtrList< T > &)

Classes

class  iterator

Member Typedef Documentation

typedef T value_type

Type of values the UPtrList contains.

Definition at line 183 of file UPtrList.H.

typedef T& reference

Type that can be used for storing into UPtrList::value_type objects.

Definition at line 186 of file UPtrList.H.

typedef const T& const_reference

Type that can be used for storing into constant UPtrList::value_type.

objects.

Definition at line 192 of file UPtrList.H.


Constructor & Destructor Documentation

UPtrList (  ) 

Null Constructor.

UPtrList ( const   label  )  [explicit]

Construct with length specified.

UPtrList ( UPtrList< T > &  ,
bool  reUse 
)

Construct as copy or re-use as specified.


Member Function Documentation

label size (  )  const [inline]

Return the number of elements in the UPtrList.

Definition at line 42 of file UPtrListI.H.

void setSize ( const   label  ) 

Reset size of UPtrList. This can only be used to set the size.

of an empty UPtrList, extend a UPtrList, remove entries from the end of a UPtrList.

void clear (  ) 

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

void transfer ( UPtrList< T > &   ) 

Transfer the contents of the argument UPtrList into this.

UPtrList and annull the argument list.

bool set ( const   label  )  const [inline]

Is element set.

Definition at line 49 of file UPtrListI.H.

References Foam::T().

Here is the call graph for this function:

T * set ( const   label,
T *   
) [inline]

Set element. Return old element (can be NULL).

No checks on new element.

Definition at line 56 of file UPtrListI.H.

void reorder ( const UList< label > &   ) 

Reorders elements. Ordering does not have to be done in.

ascending or descending order. Reordering has to be unique. (is shuffle)

const T & operator[] ( const   label  )  const [inline]

Return element const reference.

Definition at line 67 of file UPtrListI.H.

T & operator[] ( const   label  )  [inline]

Return element reference.

Definition at line 81 of file UPtrListI.H.

const T * operator() ( const   label  )  const [inline]

Return element const pointer.

Definition at line 95 of file UPtrListI.H.

UPtrList< T >::iterator begin (  )  [inline]

Return an iterator to begin traversing the UPtrList.

Definition at line 248 of file UPtrListI.H.

References UList::end().

Here is the call graph for this function:

UPtrList< T >::iterator end (  )  [inline]

Return an iterator to end traversing the UPtrList.

Definition at line 254 of file UPtrListI.H.


Friends And Related Function Documentation

friend class iterator [friend]

Definition at line 198 of file UPtrList.H.

Ostream& operator ( Ostream &  ,
const UPtrList< T > &   
) [friend]


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