Public Member Functions | Protected Member Functions | Friends | List of all members
PtrList Class Reference

A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers. The operator[] returns a reference to the object, not the pointer. More...

Inherited by faBoundaryMesh, fvBoundaryMesh, pointBoundaryMesh, and polyBoundaryMesh.

Public Member Functions

constexpr PtrList () noexcept
 
 PtrList (const label len)
 
 PtrList (const PtrList< T > &list)
 
 PtrList (PtrList< T > &&list)
 
 PtrList (UList< T * > &list)
 
template<class CloneArg >
 PtrList (const PtrList< T > &list, const CloneArg &cloneArgs)
 
 PtrList (PtrList< T > &list, bool reuse)
 
 PtrList (const SLPtrList< T > &list)
 
template<class INew >
 PtrList (Istream &is, const INew &inew)
 
 PtrList (Istream &is)
 
 ~PtrList ()
 
template<class... Args>
PtrList< Tclone (Args &&... args) const
 
const Tset (const label i) const
 
void clear ()
 
void resize (const label newLen)
 
void setSize (const label newLen)
 
template<class... Args>
void emplace_append (Args &&... args)
 
void append (T *ptr)
 
void append (autoPtr< T > &ptr)
 
void append (autoPtr< T > &&ptr)
 
void append (std::unique_ptr< T > &&ptr)
 
void append (const refPtr< T > &ptr)
 
void append (const tmp< T > &ptr)
 
template<class... Args>
autoPtr< Templace (const label i, Args &&... args)
 
autoPtr< Tset (const label i, T *ptr)
 
autoPtr< Tset (const label i, autoPtr< T > &ptr)
 
autoPtr< Tset (const label i, autoPtr< T > &&ptr)
 
autoPtr< Tset (const label i, std::unique_ptr< T > &&ptr)
 
autoPtr< Tset (const label i, const refPtr< T > &ptr)
 
autoPtr< Tset (const label i, const tmp< T > &ptr)
 
autoPtr< Trelease (const label i)
 
void transfer (PtrList< T > &list)
 
void operator= (const PtrList< T > &list)
 
void operator= (PtrList< T > &&list)
 
template<class T >
 PtrList (PtrList< T > &list, bool reuse)
 
template<class T >
 PtrList (const SLPtrList< T > &list)
 
template<class... Args>
Foam::PtrList< Tclone (Args &&... args) const
 
template<class T >
constexpr PtrList () noexcept
 
template<class T >
 PtrList (const label len)
 
template<class T >
 PtrList (const PtrList< T > &list)
 
template<class T >
 PtrList (PtrList< T > &&list)
 
template<class T >
 PtrList (UList< T * > &list)
 
template<class... Args>
Foam::autoPtr< Templace (const label i, Args &&... args)
 
template<class T >
 PtrList (Istream &is)
 

Protected Member Functions

template<class INew >
void readIstream (Istream &is, const INew &inew)
 
void free ()
 

Friends

Istreamoperator>> (Istream &is, PtrList< T > &list)
 

Detailed Description

A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers. The operator[] returns a reference to the object, not the pointer.

See also
Foam::UPtrList Foam::PtrDynList
Source files

Definition at line 55 of file List.H.

Constructor & Destructor Documentation

◆ PtrList() [1/18]

constexpr PtrList ( )
inlineconstexprnoexcept

◆ PtrList() [2/18]

PtrList ( const label  len)
inlineexplicit

◆ PtrList() [3/18]

PtrList ( const PtrList< T > &  list)
inline

◆ PtrList() [4/18]

PtrList ( PtrList< T > &&  list)
inline

◆ PtrList() [5/18]

PtrList ( UList< T * > &  list)
inlineexplicit

◆ PtrList() [6/18]

PtrList ( const PtrList< T > &  list,
const CloneArg &  cloneArgs 
)
inline

Definition at line 78 of file PtrListI.H.

◆ PtrList() [7/18]

PtrList ( PtrList< T > &  list,
bool  reuse 
)

◆ PtrList() [8/18]

PtrList ( const SLPtrList< T > &  list)
explicit

◆ PtrList() [9/18]

PtrList ( Istream is,
const INew inew 
)

Definition at line 138 of file PtrListIO.C.

◆ PtrList() [10/18]

PtrList ( Istream is)

◆ ~PtrList()

~PtrList ( )

Definition at line 65 of file PtrList.C.

◆ PtrList() [11/18]

PtrList ( PtrList< T > &  list,
bool  reuse 
)

Definition at line 29 of file PtrList.C.

◆ PtrList() [12/18]

PtrList ( const SLPtrList< T > &  list)

Definition at line 47 of file PtrList.C.

◆ PtrList() [13/18]

constexpr PtrList ( )
inlineconstexprnoexcept

Definition at line 38 of file PtrListI.H.

◆ PtrList() [14/18]

PtrList ( const label  len)
inline

Definition at line 45 of file PtrListI.H.

◆ PtrList() [15/18]

PtrList ( const PtrList< T > &  list)
inline

Definition at line 52 of file PtrListI.H.

◆ PtrList() [16/18]

PtrList ( PtrList< T > &&  list)
inline

Definition at line 59 of file PtrListI.H.

◆ PtrList() [17/18]

PtrList ( UList< T * > &  list)
inline

Definition at line 66 of file PtrListI.H.

◆ PtrList() [18/18]

PtrList ( Istream is)

Definition at line 145 of file PtrListIO.C.

Member Function Documentation

◆ readIstream()

void readIstream ( Istream is,
const INew inew 
)
protected

Definition at line 31 of file PtrListIO.C.

◆ free()

void free ( )
inlineprotected

Definition at line 29 of file PtrListI.H.

◆ clone() [1/2]

PtrList<T> clone ( Args &&...  args) const

◆ set() [1/7]

const T* set ( const label  i) const
inline

Definition at line 134 of file PtrList.H.

Referenced by fvMeshAdder::add(), polyMeshAdder::add(), phaseSystem::addField(), fvMeshTools::addPatch(), meshRefinement::appendPatch(), boundaryMesh::changeFaces(), boundaryMesh::changePatchType(), adjointSolverManager::constraintSensitivities(), diffusionMulticomponent< ReactionThermo, ThermoType >::correct(), MomentumTransferPhaseSystem< BasePhaseSystem >::ddtCorrByAs(), pointFieldDecomposer::decomposeField(), faFieldDecomposer::decomposeField(), fvFieldDecomposer::decomposeField(), boundaryMesh::deletePatch(), fvMeshDistribute::distribute(), extrudePatchMesh::extrudePatchMesh(), phaseSystem::fillFields(), meshRefinement::findRegions(), forAll(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), surfaceZonesInfo::getAllClosedNamedSurfaces(), surfaceZonesInfo::getClosedNamedSurfaces(), surfaceZonesInfo::getInsidePointNamedSurfaces(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getStandaloneNamedSurfaces(), surfaceZonesInfo::getUnclosedNamedSurfaces(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), PDRblock::innerMesh(), singleCellFvMesh::interpolate(), meshToMesh0::interpolate(), LUscalarMatrix::LUscalarMatrix(), fvMeshAdder::MapDimFields(), meshToMesh::mapSrcToTgt(), fvMeshAdder::MapSurfaceFields(), meshToMesh::mapTgtToSrc(), fvMeshAdder::MapVolFields(), MomentumTransferPhaseSystem< BasePhaseSystem >::momentumTransferf(), MomentumTransferPhaseSystem< BasePhaseSystem >::partialElimination(), MomentumTransferPhaseSystem< BasePhaseSystem >::partialEliminationf(), pointBoundaryMesh::pointBoundaryMesh(), polyBoundaryMesh::polyBoundaryMesh(), multiRegion::read(), boundaryMesh::read(), functionObjectList::read(), sampledSurfaces::read(), externalCoupled::readDataMaster(), polyMesh::readUpdate(), faFieldReconstructor::reconstructFaAreaField(), faFieldReconstructor::reconstructFaEdgeField(), pointFieldReconstructor::reconstructField(), fvFieldReconstructor::reconstructFvSurfaceField(), fvFieldReconstructor::reconstructFvVolumeField(), fvFieldReconstructor::reconstructFvVolumeInternalField(), processorMeshes::reconstructPoints(), refinementSurfaces::refinementSurfaces(), refinementFeatures::regionEdgeTrees(), multiphaseSystem::solve(), MultiComponentPhaseModel< BasePhaseModel, phaseThermo >::solveYi(), syncTools::syncFaceList(), blockMesh::topology(), trackingInverseDistance::update(), inverseDistance::update(), optimisationType::updateGradientsAndValues(), OFstreamCollator::write(), externalCoupled::writeDataMaster(), faMeshDecomposition::writeDecomposition(), streamLineBase::writeToFile(), and ZoneMesh< cellZone, polyMesh >::ZoneMesh().

◆ clear()

void clear ( )
inline

◆ resize()

void resize ( const label  newLen)

◆ setSize()

void setSize ( const label  newLen)
inline

◆ emplace_append()

void emplace_append ( Args &&...  args)
inline

Definition at line 99 of file PtrListI.H.

◆ append() [1/6]

void append ( T ptr)
inline

Definition at line 106 of file PtrListI.H.

Referenced by singleProcessorFaceSets::add(), triSurfaceLoader::load(), and streamLineBase::trimToBox().

Here is the caller graph for this function:

◆ append() [2/6]

void append ( autoPtr< T > &  ptr)
inline

Definition at line 113 of file PtrListI.H.

◆ append() [3/6]

void append ( autoPtr< T > &&  ptr)
inline

Definition at line 120 of file PtrListI.H.

◆ append() [4/6]

void append ( std::unique_ptr< T > &&  ptr)
inline

Definition at line 127 of file PtrListI.H.

◆ append() [5/6]

void append ( const refPtr< T > &  ptr)
inline

Definition at line 134 of file PtrListI.H.

◆ append() [6/6]

void append ( const tmp< T > &  ptr)
inline

Definition at line 141 of file PtrListI.H.

◆ emplace() [1/2]

autoPtr<T> emplace ( const label  i,
Args &&...  args 
)
inline

◆ set() [2/7]

Foam::autoPtr< T > set ( const label  i,
T ptr 
)
inline

Definition at line 160 of file PtrListI.H.

◆ set() [3/7]

Foam::autoPtr< T > set ( const label  i,
autoPtr< T > &  ptr 
)
inline

Definition at line 172 of file PtrListI.H.

◆ set() [4/7]

Foam::autoPtr< T > set ( const label  i,
autoPtr< T > &&  ptr 
)
inline

Definition at line 183 of file PtrListI.H.

◆ set() [5/7]

Foam::autoPtr< T > set ( const label  i,
std::unique_ptr< T > &&  ptr 
)
inline

Definition at line 194 of file PtrListI.H.

◆ set() [6/7]

Foam::autoPtr< T > set ( const label  i,
const refPtr< T > &  ptr 
)
inline

Definition at line 205 of file PtrListI.H.

◆ set() [7/7]

Foam::autoPtr< T > set ( const label  i,
const tmp< T > &  ptr 
)
inline

Definition at line 216 of file PtrListI.H.

◆ release()

Foam::autoPtr< T > release ( const label  i)
inline

Definition at line 226 of file PtrListI.H.

◆ transfer()

void transfer ( PtrList< T > &  list)
inline

Definition at line 238 of file PtrListI.H.

Referenced by IATE::read(), and functionObjectList::read().

Here is the caller graph for this function:

◆ operator=() [1/2]

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

Definition at line 126 of file PtrList.C.

◆ operator=() [2/2]

void operator= ( PtrList< T > &&  list)
inline

Definition at line 248 of file PtrListI.H.

◆ clone() [2/2]

Foam::PtrList<T> clone ( Args &&...  args) const

Definition at line 75 of file PtrList.C.

◆ emplace() [2/2]

Foam::autoPtr<T> emplace ( const label  i,
Args &&...  args 
)
inline

Definition at line 150 of file PtrListI.H.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
PtrList< T > &  list 
)
friend

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