FreeFOAM The Cross-Platform CFD Toolkit
LPtrList< LListBase, T > Class Template Reference

Template class for non-intrusive linked PtrLists. More...

#include <OpenFOAM/LPtrList.H>


Detailed Description

template<class LListBase, class T>
class Foam::LPtrList< LListBase, T >

Template class for non-intrusive linked PtrLists.

Source files

Definition at line 70 of file LPtrList.H.

+ Inheritance diagram for LPtrList< LListBase, T >:
+ Collaboration diagram for LPtrList< LListBase, T >:

List of all members.

Classes

class  const_iterator
 An STL-conforming const_iterator. More...
class  iterator
 An STL-conforming iterator. More...

Public Types

typedef Treference
 Type that can be used for storing into LPtrList::value_type.
typedef Tconst_reference
 Type that can be used for storing into constant.
typedef LListBase::iterator LListBase_iterator
typedef LListBase::const_iterator LListBase_const_iterator
- Public Types inherited from LList< LListBase, T * >
typedef Tvalue_type
 Type of values the LList contains.
typedef label size_type
 The type that can represent the size of a LList.

Public Member Functions

 LPtrList ()
 Null construct.
 LPtrList (T *a)
 Construct given initial T.
template<class INew >
 LPtrList (Istream &, const INew &)
 Construct from Istream using given Istream constructor class.
 LPtrList (Istream &)
 Construct from Istream using default Istream constructor class.
 LPtrList (const LPtrList &)
 Construct as copy.
 ~LPtrList ()
Tfirst ()
 Return the first entry added.
const Tfirst () const
 Return const access to the first entry added.
Tlast ()
 Return the last entry added.
const Tlast () const
 Return const access to the last entry added.
bool eraseHead ()
 Remove the head element from the list and delete the pointer.
void clear ()
 Clear the contents of the list.
void transfer (LPtrList< LListBase, T > &)
 Transfer the contents of the argument into this List.
void operator= (const LPtrList< LListBase, T > &)
 Assign copy.
- Public Member Functions inherited from LList< LListBase, T * >
 LList ()
 Null construct.
 LList (T *a)
 Construct given initial T.
 LList (Istream &)
 Construct from Istream.
 LList (const LList< LListBase, T * > &)
 Construct as copy.
 ~LList ()
void insert (const T *&a)
 Add at head of list.
void append (const T *&a)
 Add at tail of list.
TremoveHead ()
 Remove and return head.
Tremove (link *l)
 Remove and return element.
Tremove (iterator &it)
 Remove and return element specified by iterator.
void transfer (LList< LListBase, T * > &)
 Transfer the contents of the argument into this List.
void operator= (const LList< LListBase, T * > &)

Friends

class iterator
class const_iterator
Istreamoperator>> (Istream &, LPtrList< LListBase, T > &)
Ostreamoperator (Ostream &, const LPtrList< LListBase, T > &)

Member Typedef Documentation

typedef T& reference

Type that can be used for storing into LPtrList::value_type.

objects.

Reimplemented from LList< LListBase, T * >.

Definition at line 172 of file LPtrList.H.

typedef T& const_reference

Type that can be used for storing into constant.

LPtrList::value_type objects.

Reimplemented from LList< LListBase, T * >.

Definition at line 176 of file LPtrList.H.

typedef LListBase::iterator LListBase_iterator

Reimplemented from LList< LListBase, T * >.

Definition at line 181 of file LPtrList.H.

typedef LListBase::const_iterator LListBase_const_iterator

Reimplemented from LList< LListBase, T * >.

Definition at line 217 of file LPtrList.H.


Constructor & Destructor Documentation

LPtrList ( )
inline

Null construct.

Definition at line 95 of file LPtrList.H.

LPtrList ( T a)
inline

Construct given initial T.

Definition at line 99 of file LPtrList.H.

LPtrList ( Istream is,
const INew iNew 
)

Construct from Istream using given Istream constructor class.

Definition at line 145 of file LPtrListIO.C.

LPtrList ( Istream is)

Construct from Istream using default Istream constructor class.

Definition at line 152 of file LPtrListIO.C.

LPtrList ( const LPtrList< LListBase, T > &  )

Construct as copy.

~LPtrList ( )

Definition at line 45 of file LPtrList.C.

References clear().


Member Function Documentation

T& first ( )
inline

Return the first entry added.

Reimplemented from LList< LListBase, T * >.

Definition at line 125 of file LPtrList.H.

Referenced by LPtrList< DLListBase, phase >::first().

const T& first ( ) const
inline

Return const access to the first entry added.

Reimplemented from LList< LListBase, T * >.

Definition at line 131 of file LPtrList.H.

T& last ( )
inline

Return the last entry added.

Reimplemented from LList< LListBase, T * >.

Definition at line 137 of file LPtrList.H.

Referenced by LPtrList< DLListBase, phase >::last().

const T& last ( ) const
inline

Return const access to the last entry added.

Reimplemented from LList< LListBase, T * >.

Definition at line 143 of file LPtrList.H.

bool eraseHead ( )

Remove the head element from the list and delete the pointer.

Definition at line 54 of file LPtrList.C.

References T.

void clear ( )

Clear the contents of the list.

Reimplemented from LList< LListBase, T * >.

Reimplemented in DictionaryBase< DLPtrList< phase >, phase >, and DictionaryBase< DLPtrList< T >, T >.

Definition at line 70 of file LPtrList.C.

References clear().

Referenced by Foam::operator>>().

void transfer ( LPtrList< LListBase, T > &  lst)

Transfer the contents of the argument into this List.

and annull the argument list.

Definition at line 83 of file LPtrList.C.

References clear().

void operator= ( const LPtrList< LListBase, T > &  lst)

Assign copy.

Definition at line 93 of file LPtrList.C.

References append(), and clear().


Friends And Related Function Documentation

friend class iterator
friend

Reimplemented from LList< LListBase, T * >.

Definition at line 85 of file LPtrList.H.

friend class const_iterator
friend

Reimplemented from LList< LListBase, T * >.

Definition at line 88 of file LPtrList.H.

Istream& operator>> ( Istream ,
LPtrList< LListBase, T > &   
)
friend
Ostream& operator ( Ostream ,
const LPtrList< LListBase, T > &   
)
friend

The documentation for this class was generated from the following files: