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. More...
Inherited by blockMesh, fvBoundaryMesh, pointBoundaryMesh, and polyBoundaryMesh.
Data Structures | |
class | const_iterator |
An STL-conforming const_iterator. More... | |
class | iterator |
An STL-conforming iterator. More... | |
Public Types | |
typedef T | value_type |
Type of values the PtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into PtrList::value_type objects. More... | |
Public Member Functions | |
PtrList () | |
Null Constructor. More... | |
PtrList (const label) | |
Construct with size specified. More... | |
PtrList (const PtrList< T > &) | |
Copy constructor. More... | |
template<class CloneArg > | |
PtrList (const PtrList< T > &, const CloneArg &) | |
Copy constructor with additional argument for clone. More... | |
PtrList (const Xfer< PtrList< T > > &) | |
Construct by transferring the parameter contents. More... | |
PtrList (PtrList< T > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
PtrList (const SLPtrList< T > &) | |
Construct as copy of SLPtrList<T> More... | |
template<class INew > | |
PtrList (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. More... | |
PtrList (Istream &) | |
Construct from Istream using default Istream constructor class. More... | |
~PtrList () | |
Destructor. More... | |
label | size () const |
Return the number of elements in the PtrList. More... | |
bool | empty () const |
Return true if the PtrList is empty (ie, size() is zero). More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of PtrList. If extending the PtrList, new entries are. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | clear () |
Clear the PtrList, i.e. set size to zero deleting all the. More... | |
void | append (T *) |
Append an element at the end of the list. More... | |
void | append (const autoPtr< T > &) |
void | append (const tmp< T > &) |
void | transfer (PtrList< T > &) |
Transfer the contents of the argument PtrList into this PtrList. More... | |
Xfer< PtrList< T > > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | set (const label) const |
Is element set. More... | |
autoPtr< T > | set (const label, T *) |
Set element. Return old element (can be NULL). More... | |
autoPtr< T > | set (const label, const autoPtr< T > &) |
autoPtr< T > | set (const label, const tmp< T > &) |
void | reorder (const labelUList &) |
Reorders elements. Ordering does not have to be done in. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
PtrList< T > & | operator= (const PtrList< T > &) |
Assignment. More... | |
iterator | begin () |
Return an iterator to begin traversing the PtrList. More... | |
iterator | end () |
Return an iterator to end traversing the PtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the PtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the PtrList. More... | |
template<class T > | |
PtrList () | |
template<class T > | |
PtrList (const label s) | |
template<class T > | |
PtrList (const PtrList< T > &a) | |
template<class T > | |
PtrList (const Xfer< PtrList< T > > &lst) | |
template<class T > | |
PtrList (PtrList< T > &a, bool reUse) | |
template<class T > | |
PtrList (const SLPtrList< T > &sll) | |
template<class T > | |
PtrList (Istream &is) | |
Data Fields | |
const typedef T & | const_reference |
Type that can be used for storing into constant PtrList::value_type. More... | |
Protected Member Functions | |
template<class INew > | |
void | read (Istream &, const INew &inewt) |
Read from Istream using given Istream constructor class. More... | |
Private Attributes | |
List< T * > | ptrs_ |
Friends | |
class | iterator |
class | const_iterator |
Istream & | operator>> (Istream &, PtrList< T > &) |
Read List from Istream, discarding contents of existing List. More... | |
Ostream & | operator (Ostream &, const PtrList< 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.
The element operator [] returns a reference to the object rather than a pointer.
typedef T value_type |
Type that can be used for storing into PtrList::value_type objects.
PtrList | ( | ) |
Null Constructor.
|
explicit |
Construct with size specified.
Construct from Istream using given Istream constructor class.
Definition at line 160 of file PtrListIO.C.
Definition at line 167 of file PtrListIO.C.
Read from Istream using given Istream constructor class.
Definition at line 36 of file PtrListIO.C.
|
inline |
Return the number of elements in the PtrList.
Definition at line 32 of file PtrListI.H.
Referenced by singleProcessorFaceSetsConstraint::add(), polyMeshAdder::add(), surfaceZonesInfo::addCellZonesToMesh(), surfaceZonesInfo::addFaceZonesToMesh(), boundaryLayers::addLayerForPatch(), autoLayerDriver::addLayers(), fvMeshTools::addPatch(), meshRefinement::addPatch(), fvBoundaryMesh::addPatches(), polyMeshGenModifier::addProcessorFaces(), linearValveLayersFvMesh::addZonesAndModifiers(), linearValveFvMesh::addZonesAndModifiers(), mixerFvMesh::addZonesAndModifiers(), movingConeTopoFvMesh::addZonesAndModifiers(), singleCellFvMesh::agglomerateMesh(), extendedEdgeMesh::allNearestFeatureEdges(), detectBoundaryLayers::analyseLayers(), meshRefinement::appendPatch(), attachPolyTopoChanger::attach(), boundaryLayers::boundaryLayers(), meshSurfaceEngine::calcGlobalBoundaryEdgeLabels(), polyMeshGenAddressing::calcGlobalFaceLabels(), polyMeshGenAddressing::calcGlobalPointLabels(), blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), autoSnapDriver::calcNearestSurface(), meshSurfaceEngine::calculateBoundaryFaces(), polyTopoChange::changeMesh(), motionSmootherAlgo::checkConstraints(), polyBoundaryMesh::checkDefinition(), Foam::polyMeshGenChecks::checkFaceFlatness(), coordinateModifier::checkForValidInverse(), checkMeshDict::checkObjectRefinements(), polyBoundaryMesh::checkParallelSync(), polyMeshAdder::combinePatches(), polyTopoChange::compactAndReorder(), meshToMesh::constructNoCuttingPatches(), LUscalarMatrix::convert(), inverseFaceDistanceDiffusivity::correct(), nearWallDist::correct(), pointPatchDist::correct(), directionalPressureGradientExplicitSource::correct(), blockMesh::createCellShapes(), createFundamentalSheetsJFS::createInitialSheet(), createFundamentalSheetsFJ::createInitialSheet(), blockMesh::createPatches(), parFvFieldReconstructor::createPatchFaceMaps(), blockMesh::createPatchFaces(), createReconstructMap(), createRefinementSurfaces(), createFundamentalSheetsJFS::createSheetsAtFeatureEdges(), blockMesh::createTopology(), motionSmootherAlgo::curPoints(), structuredDecomp::decompose(), decompositionMethod::decompose(), autoLayerDriver::determineSidePatches(), fvMeshDistribute::distribute(), autoLayerDriver::doLayers(), autoSnapDriver::featureAttractionUsingFeatureEdges(), checkNonMappableCellConnections::findCells(), patchProbes::findElements(), polyBoundaryMesh::findPatchIDs(), fvFieldReconstructor::fvFieldReconstructor(), GAMGSolver::GAMGSolver(), surfaceZonesInfo::getAllClosedNamedSurfaces(), surfaceZonesInfo::getClosedNamedSurfaces(), surfaceZonesInfo::getInsidePointNamedSurfaces(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getStandaloneNamedSurfaces(), surfaceZonesInfo::getUnclosedNamedSurfaces(), surfaceZonesInfo::getUnnamedSurfaces(), immersedBoundarySolidBodyMotionFvMesh::immersedBoundarySolidBodyMotionFvMesh(), injectionModelList::info(), thermalBaffleModel::init(), viewFactor::initialise(), streamLineBase::initInterpolations(), globalMeshData::initProcAddr(), regionModel::interRegionAMI(), createFundamentalSheetsJFS::isTopologyOk(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::loadOrCreateMesh(), LUscalarMatrix::LUscalarMatrix(), main(), meshRefinement::makeDisplacementField(), autoLayerDriver::makeLayerDisplacementField(), polyTopoChange::makeMesh(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), polyMeshAdder::mergePatchNames(), polyMeshAdder::mergePrimitives(), MeshedSurface< Foam::face >::MeshedSurface(), polyTopoChanger::names(), ZoneMesh< cellZone, polyMesh >::names(), regionModel::nbrCoupledPatchID(), extendedEdgeMesh::nearestFeatureEdgeByType(), fvMeshTools::newMesh(), PtrList< injectionModel >::operator=(), blockMesh::patchDicts(), patchInjection::patchInjection(), pointFieldReconstructor::pointFieldReconstructor(), polyBoundaryMesh::polyBoundaryMesh(), polyTopoChange::polyTopoChange(), print(), printMesh(), ZoneMesh< cellZone, polyMesh >::read(), functionObjectList::read(), boundaryMesh::read(), blockMesh::readBoundary(), polyTopoChanger::readModifiers(), readProcAddressing(), polyMesh::readUpdate(), ensightParts::recalculate(), fvMeshDistribute::receiveMesh(), pointFieldReconstructor::reconstructField(), parFvFieldReconstructor::reconstructFvSurfaceField(), parFvFieldReconstructor::reconstructFvVolumeField(), redistributeLagrangian(), meshOctreeCreator::refineBoxesContainedInObjects(), fvMeshTools::removeEmptyPatches(), polyMeshGenModifier::removeEmptyProcessorPatches(), polyMeshGenModifier::removeFaces(), structuredRenumber::renumber(), polyMeshGenModifier::reorderBoundaryFaces(), polyMeshGenModifier::reorderProcBoundaryFaces(), polyMeshGenModifier::replaceBoundary(), sampledSets::sampleAndWrite(), fvMeshDistribute::sendMesh(), fvMeshSubset::setCellSubset(), fvMeshSubset::setLargeCellSubset(), singleCellFvMesh::singleCellFvMesh(), surfacePatchIOList::surfacePatchIOList(), surfZoneIOList::surfZoneIOList(), lduPrimitiveMesh::totalSize(), fvMeshTools::trimPatches(), streamLineBase::trimToBox(), polyTopoChanger::types(), ZoneMesh< cellZone, polyMesh >::types(), valveBank::valveBank(), vtkSetWriter< Type >::write(), xmgraceSetWriter< Type >::write(), gnuplotSetWriter< Type >::write(), domainDecomposition::writeDecomposition(), externalCoupledFunctionObject::writeGeometry(), writeProcAddressing(), Foam::writeSurfFields(), and meshRefinement::zonify().
|
inline |
Return true if the PtrList is empty (ie, size() is zero).
Definition at line 39 of file PtrListI.H.
Referenced by fvMeshTools::trimPatches().
|
inline |
Return reference to the first element of the list.
Definition at line 46 of file PtrListI.H.
Referenced by symmetryPlaneOptimisation::detectSymmetryPlanes().
|
inline |
Return reference to first element of the list.
Definition at line 53 of file PtrListI.H.
|
inline |
Return reference to the last element of the list.
Definition at line 60 of file PtrListI.H.
Referenced by main().
|
inline |
Return reference to the last element of the list.
Definition at line 67 of file PtrListI.H.
void setSize | ( | const label | newSize | ) |
Reset size of PtrList. If extending the PtrList, new entries are.
set to NULL. If truncating the PtrList, removed entries are deleted.
Definition at line 142 of file PtrList.C.
Referenced by fvMeshAdder::add(), polyMeshAdder::add(), fvMeshTools::addPatch(), fvBoundaryMesh::addPatches(), polyMeshGenModifier::addProcessorPatch(), linearValveFvMesh::addZonesAndModifiers(), mixerFvMesh::addZonesAndModifiers(), singleCellFvMesh::agglomerateMesh(), meshRefinement::appendPatch(), boundaryLayers::boundaryLayers(), planeScaling::boundingPlanes(), boxScaling::boundingPlanes(), renameBoundaryPatches::calculateNewBoundary(), checkMeshDict::checkAnisotropicSources(), checkMeshDict::checkObjectRefinements(), polyTopoChange::compactAndReorder(), coordinateModifier::coordinateModifier(), cartesianMeshExtractor::createPolyMesh(), blockMesh::createTopology(), lduPrimitiveMesh::gather(), GAMGSolver::gatherMatrices(), GAMGSolver::initVcycle(), main(), patchInjection::patchInjection(), GAMGSolver::procAgglomerateMatrix(), PtrList< injectionModel >::PtrList(), ZoneMesh< cellZone, polyMesh >::read(), functionObjectList::read(), polyTopoChanger::readModifiers(), meshOctreeCreator::refineBoxesContainedInObjects(), polyMesh::removeBoundary(), meshSurfaceEdgeExtractor::removeOldBoundaryFaces(), polyMeshGenModifier::reorderBoundaryFaces(), polyMeshGenModifier::reorderProcBoundaryFaces(), polyMeshGenModifier::replaceBoundary(), searchableSurfaces::searchableSurfaces(), MGridGenGAMGAgglomeration::swap(), and fvMeshTools::trimPatches().
|
inline |
Alias for setSize(const label)
Definition at line 74 of file PtrListI.H.
void clear | ( | ) |
Clear the PtrList, i.e. set size to zero deleting all the.
allocated entries.
Definition at line 185 of file PtrList.C.
Referenced by planeScaling::boundingPlanes(), functionObjectList::clear(), functionObjectList::read(), runTimePostProcessing::readObjects(), meshOctreeCreator::refineBoxesContainedInObjects(), polyMesh::removeBoundary(), polyMeshGenModifier::reorderBoundaryFaces(), polyMeshGenModifier::reorderProcBoundaryFaces(), polyMeshGenModifier::replaceBoundary(), and decompositionMethod::setConstraints().
|
inline |
Append an element at the end of the list.
Referenced by singleProcessorFaceSetsConstraint::add(), meshOctreeCube::findCoordinatesOfMissingCubes(), main(), runTimePostProcessing::readObjects(), streamLineBase::trimToBox(), and domainDecomposition::writeDecomposition().
Transfer the contents of the argument PtrList into this PtrList.
and annul the argument list.
Definition at line 200 of file PtrList.C.
Referenced by renameBoundaryPatches::calculateNewBoundary(), main(), functionObjectList::read(), polyMeshGenModifier::removeEmptyProcessorPatches(), and streamLineBase::write().
|
inline |
Transfer contents to the Xfer container.
Definition at line 145 of file PtrListI.H.
Referenced by main().
|
inline |
Is element set.
Referenced by fvMeshAdder::add(), polyMeshAdder::add(), fvMeshTools::addPatch(), fvBoundaryMesh::addPatches(), polyMeshGenModifier::addProcessorPatch(), linearValveFvMesh::addZonesAndModifiers(), mixerFvMesh::addZonesAndModifiers(), GAMGSolver::agglomerateInterfaceCoefficients(), GAMGSolver::agglomerateMatrix(), meshRefinement::appendPatch(), planeScaling::boundingPlanes(), boxScaling::boundingPlanes(), renameBoundaryPatches::calculateNewBoundary(), displacementLayeredMotionMotionSolver::cellZoneSolve(), boundaryMesh::changeFaces(), boundaryMesh::changePatchType(), checkMeshDict::checkAnisotropicSources(), checkMeshDict::checkObjectRefinements(), Foam::checkTopology(), sampledSets::combineSampledSets(), vtkPV4Foam::convertDimFields(), coordinateModifier::coordinateModifier(), diffusionMulticomponent< CombThermoType, ThermoType >::correct(), cartesianMeshExtractor::createPolyMesh(), createRefinementSurfaces(), blockMesh::createTopology(), pointFieldDecomposer::decomposeField(), fvFieldDecomposer::decomposeField(), boundaryMesh::deletePatch(), extrudePatchMesh::extrudePatchMesh(), forAll(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), GAMGSolver::gatherMatrices(), surfaceZonesInfo::getAllClosedNamedSurfaces(), surfaceZonesInfo::getClosedNamedSurfaces(), surfaceZonesInfo::getInsidePointNamedSurfaces(), surfaceZonesInfo::getNamedSurfaces(), surfaceZonesInfo::getStandaloneNamedSurfaces(), surfaceZonesInfo::getUnclosedNamedSurfaces(), GAMGProcAgglomeration::globalCellCells(), GAMGSolver::initVcycle(), singleCellFvMesh::interpolate(), fvMeshSubset::interpolate(), meshToMesh0::interpolate(), LUscalarMatrix::LUscalarMatrix(), main(), immersedBoundaryFvPatch::makeInvDirichletMatrices(), immersedBoundaryFvPatch::makeInvNeumannMatrices(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), pointBoundaryMesh::pointBoundaryMesh(), procAddressing(), GAMGSolver::procAgglomerateMatrix(), ZoneMesh< cellZone, polyMesh >::read(), functionObjectList::read(), boundaryMesh::read(), readLagrangian(), polyTopoChanger::readModifiers(), ensightParts::recalculate(), pointFieldReconstructor::reconstructField(), parFvFieldReconstructor::reconstructFvSurfaceField(), fvFieldReconstructor::reconstructFvSurfaceField(), parFvFieldReconstructor::reconstructFvVolumeField(), fvFieldReconstructor::reconstructFvVolumeField(), fvFieldReconstructor::reconstructFvVolumeInternalField(), processorMeshes::reconstructPoints(), meshOctreeCreator::refineBoxesContainedInObjects(), meshOctreeCreator::refineBoxesIntersectingEdgeMeshes(), meshOctreeCreator::refineBoxesIntersectingSurfaces(), refinementSurfaces::refinementSurfaces(), refinementFeatures::regionEdgeTrees(), polyMeshGenModifier::removeEmptyProcessorPatches(), polyMeshGenModifier::reorderBoundaryFaces(), polyMeshGenModifier::reorderProcBoundaryFaces(), polyMeshGenModifier::replaceBoundary(), sampledSets::sampleAndWrite(), MGridGenGAMGAgglomeration::swap(), isoSurface::trimToBox(), GAMGSolver::Vcycle(), polyMeshGenFaces::write(), and streamLineBase::write().
Set element. Return old element (can be NULL).
No checks on new element.
void reorder | ( | const labelUList & | oldToNew | ) |
Reorders elements. Ordering does not have to be done in.
ascending or descending order. Reordering has to be unique. (is shuffle)
Definition at line 208 of file PtrList.C.
Referenced by fvMeshTools::addPatch(), meshRefinement::addPatch(), polyBoundaryMesh::reorder(), and fvMeshTools::reorderPatches().
Return element const pointer.
Definition at line 188 of file PtrListI.H.
Foam::PtrList< T > & operator= | ( | const PtrList< T > & | a | ) |
|
inline |
Return an iterator to begin traversing the PtrList.
Definition at line 361 of file PtrListI.H.
|
inline |
Return an iterator to end traversing the PtrList.
Definition at line 368 of file PtrListI.H.
|
inline |
Return an const_iterator to begin traversing the PtrList.
Definition at line 583 of file PtrListI.H.
|
inline |
Return an const_iterator to end traversing the PtrList.
Definition at line 591 of file PtrListI.H.
|
inline |
Return an const_iterator to begin traversing the PtrList.
Definition at line 567 of file PtrListI.H.
|
inline |
Return an const_iterator to end traversing the PtrList.
Definition at line 575 of file PtrListI.H.
|
friend |
const typedef T& const_reference |
Type that can be used for storing into constant PtrList::value_type.
objects.
Definition at line 130 of file PtrList.H.
Referenced by PtrList< injectionModel >::begin(), PtrList< injectionModel >::cbegin(), PtrList< injectionModel >::cend(), PtrList< injectionModel >::end(), PtrList< injectionModel >::PtrList(), and PtrList< injectionModel >::transfer().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.