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

PtrList Class Template Reference

Inheritance diagram for PtrList:

Inheritance graph
[legend]
Collaboration diagram for PtrList:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class Foam::PtrList< T >

Definition at line 106 of file PtrList.H.


Public Types

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

Public Member Functions

 PtrList ()
 Null Constructor.
 PtrList (const label)
 Construct with length specified.
 PtrList (const PtrList< T > &)
 Copy constructor.
template<class CloneArg>
 PtrList (const PtrList< T > &, const CloneArg &)
 Copy constructor with additional argument for clone.
 PtrList (PtrList< T > &, bool reUse)
 Construct as copy or re-use as specified.
 PtrList (const SLPtrList< T > &)
 Construct as copy of SLPtrList<T>.
template<class INew>
 PtrList (Istream &, const INew &)
 Construct from Istream using given Istream constructor class.
 PtrList (Istream &)
 Construct from Istream using default Istream constructor class.
 ~PtrList ()
label size () const
 Return the number of elements in the PtrList.
void setSize (const label)
 Reset size of PtrList. This can only be used to set the size.
void clear ()
 Clear the PtrList, i.e. set size to zero deleting all the.
void transfer (PtrList< T > &)
 Transfer the contents of the argument PtrList into this PtrList.
autoPtr< T > set (const label, T *)
 Set element. Return old element (can be NULL).
autoPtr< T > set (const label, const autoPtr< T > &)
autoPtr< T > set (const label, const tmp< T > &)
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.
PtrList< T > & operator= (const PtrList< T > &)
 Assignment.
iterator begin ()
 Return an iterator to begin traversing the PtrList.
iterator end ()
 Return an iterator to end traversing the PtrList.

Protected Member Functions

template<class INew>
void read (Istream &, const INew &inewt)
 Read from Istream using given Istream constructor class.

Friends

class iterator
Istream & operator>> (Istream &, PtrList< T > &)
 Read List from Istream, discarding contents of existing List.
Ostream & operator (Ostream &, const PtrList< T > &)

Classes

class  iterator

Member Typedef Documentation

typedef T value_type

Type of values the PtrList contains.

Definition at line 223 of file PtrList.H.

typedef T& reference

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

Definition at line 226 of file PtrList.H.

typedef const T& const_reference

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

objects.

Definition at line 232 of file PtrList.H.


Constructor & Destructor Documentation

PtrList (  ) 

Null Constructor.

PtrList ( const   label  )  [explicit]

Construct with length specified.

PtrList ( const PtrList< T > &   ) 

Copy constructor.

PtrList ( const PtrList< T > &  ,
const CloneArg &   
)

Copy constructor with additional argument for clone.

PtrList ( PtrList< T > &  ,
bool  reUse 
)

Construct as copy or re-use as specified.

PtrList ( const SLPtrList< T > &   ) 

Construct as copy of SLPtrList<T>.

PtrList ( Istream &  ,
const INew &   
)

Construct from Istream using given Istream constructor class.

PtrList ( Istream &   ) 

Construct from Istream using default Istream constructor class.

~PtrList (  ) 


Member Function Documentation

void read ( Istream &  ,
const INew &  inewt 
) [protected]

Read from Istream using given Istream constructor class.

label size (  )  const [inline]

Return the number of elements in the PtrList.

Definition at line 45 of file PtrListI.H.

void setSize ( const   label  ) 

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

of an empty PtrList, extend a PtrList, remove entries from the end of a PtrList. If the entries are non-empty they are deleted.

void clear (  ) 

Clear the PtrList, i.e. set size to zero deleting all the.

allocated entries.

Reimplemented in ZoneMesh.

void transfer ( PtrList< T > &   ) 

Transfer the contents of the argument PtrList into this PtrList.

and annull the argument list.

autoPtr< T > set ( const   label,
T *   
) [inline]

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

No checks on new element.

Definition at line 52 of file PtrListI.H.

Referenced by fvBoundaryMeshMapper::fvBoundaryMeshMapper(), and PtrList::set().

Here is the caller graph for this function:

autoPtr< T > set ( const   label,
const autoPtr< T > &   
) [inline]

Definition at line 63 of file PtrListI.H.

References PtrList::set().

Here is the call graph for this function:

autoPtr< T > set ( const   label,
const tmp< T > &   
) [inline]

Definition at line 70 of file PtrListI.H.

References FatalErrorIn.

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)

Reimplemented in polyBoundaryMesh.

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

Return element const reference.

Definition at line 79 of file PtrListI.H.

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

Return element reference.

Definition at line 93 of file PtrListI.H.

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

Return element const pointer.

Definition at line 107 of file PtrListI.H.

PtrList<T>& operator= ( const PtrList< T > &   ) 

Assignment.

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

Return an iterator to begin traversing the PtrList.

Definition at line 260 of file PtrListI.H.

References UList::end().

Here is the call graph for this function:

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

Return an iterator to end traversing the PtrList.

Definition at line 266 of file PtrListI.H.


Friends And Related Function Documentation

friend class iterator [friend]

Definition at line 238 of file PtrList.H.

Istream& operator>> ( Istream &  ,
PtrList< T > &   
) [friend]

Read List from Istream, discarding contents of existing List.

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


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