|
|
|
PtrList< T > Class Template ReferenceA templated 1D list of pointers to objects of type <T>, where the size of the array is known and used for subscript bounds checking, etc. More...
Collaboration diagram for PtrList< T >:
![]()
Detailed Descriptiontemplate<class T>
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used for subscript bounds checking, etc.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| typedef T value_type |
| 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.
objects.
Construct as copy or re-use as specified.
Definition at line 72 of file PtrList.C.
References PtrList< T >::transfer().

Construct from Istream using given Istream constructor class.
Definition at line 144 of file PtrListIO.C.
Construct from Istream using default Istream constructor class.
Definition at line 151 of file PtrListIO.C.
Read from Istream using given Istream constructor class.
Definition at line 28 of file PtrListIO.C.
References LList< SLListBase, T >::append(), SLListBase::begin(), SLListBase::end(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorIn, forAll, token::info(), token::isLabel(), token::isPunctuation(), token::labelToken(), token::pToken(), Istream::putBack(), Istream::readBeginList(), Istream::readEndList(), setSize(), SLListBase::size(), and T.

| Foam::label size | ( | ) | const [inline] |
Return the number of elements in the PtrList.
Definition at line 26 of file PtrListI.H.
Referenced by refinementSurfaces::refinementSurfaces(), and ensightParts::size().

| bool empty | ( | ) | const [inline] |
| void setSize | ( | const label | newSize | ) | [inline] |
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.
Definition at line 134 of file PtrList.C.
Referenced by GAMGAgglomeration::continueAgglomerating(), spray::evolve(), procLduMatrix::procLduMatrix(), and Foam::ReadFields().

| void resize | ( | const label | newSize | ) | [inline] |
| void clear | ( | ) | [inline] |
Clear the PtrList, i.e. set size to zero deleting all the.
allocated entries.
Reimplemented in functionObjectList, ZoneMesh< ZoneType, MeshType >, ZoneMesh< faceZone, polyMesh >, ZoneMesh< pointZone, polyMesh >, and ZoneMesh< cellZone, polyMesh >.
Definition at line 176 of file PtrList.C.
Referenced by PtrList< T >::reorder().

| void transfer | ( | PtrList< T > & | a | ) | [inline] |
Transfer the contents of the argument PtrList into this PtrList.
and annull the argument list.
Definition at line 191 of file PtrList.C.
Referenced by PtrList< T >::PtrList().

| Foam::Xfer< Foam::PtrList< T > > xfer | ( | ) | [inline] |
| bool set | ( | const label | i | ) | const [inline] |
Is element set.
Definition at line 47 of file PtrListI.H.
References setSize().
Referenced by GAMGAgglomeration::agglomerateLduAddressing(), basicMultiComponentMixture::basicMultiComponentMixture(), pairGAMGAgglomeration::combineLevels(), liquidMixture::liquidMixture(), ODEChemistryModel< CompType, ThermoType >::ODEChemistryModel(), procLduMatrix::procLduMatrix(), Foam::ReadFields(), and solidMixture::solidMixture().


| Foam::autoPtr< T > set | ( | const label | i, | |
| T * | ptr | |||
| ) | [inline] |
Set element. Return old element (can be NULL).
No checks on new element.
Definition at line 54 of file PtrListI.H.
| Foam::autoPtr< T > set | ( | const label | i, | |
| const autoPtr< T > & | aptr | |||
| ) | [inline] |
Definition at line 66 of file PtrListI.H.
| Foam::autoPtr< T > set | ( | const label | i, | |
| const tmp< T > & | t | |||
| ) | [inline] |
Definition at line 77 of file PtrListI.H.
Reorders elements. Ordering does not have to be done in.
ascending or descending order. Reordering has to be unique. (is shuffle)
Definition at line 199 of file PtrList.C.
References PtrList< T >::clear(), and List< T >::transfer().

| const T & operator[] | ( | const label | i | ) | const [inline] |
Return element const reference.
Definition at line 96 of file PtrListI.H.
References Foam::xferMove().

| T & operator[] | ( | const label | i | ) | [inline] |
| const T * operator() | ( | const label | i | ) | const [inline] |
| Foam::PtrList< T > & operator= | ( | const PtrList< T > & | a | ) | [inline] |
| Foam::PtrList< T >::iterator begin | ( | ) | [inline] |
| Foam::PtrList< T >::iterator end | ( | ) | [inline] |
Return an iterator to end traversing the PtrList.
Reimplemented in functionObjectList, sampledSets, and sampledSurfaces.
Definition at line 285 of file PtrListI.H.
References UList< T >::begin().
