Various utility functions to operate on Pointer Lists. More...
Classes | |
struct | greater |
A UPtrList compare binary predicate for reverse sort. More... | |
struct | less |
A UPtrList compare binary predicate for normal sort. More... | |
Functions | |
template<class ReturnType , class T , class AccessOp > | |
List< ReturnType > | get (const UPtrList< T > &list, const AccessOp &aop) |
template<class T , class UnaryMatchPredicate > | |
List< word > | names (const UPtrList< T > &list, const UnaryMatchPredicate &matcher) |
template<class T > | |
List< word > | names (const UPtrList< T > &list) |
template<class T , class UnaryMatchPredicate > | |
label | firstMatching (const UPtrList< T > &list, const UnaryMatchPredicate &matcher) |
Find first list item with 'name()' that matches, -1 on failure. More... | |
template<class T , class UnaryMatchPredicate > | |
labelList | findMatching (const UPtrList< T > &list, const UnaryMatchPredicate &matcher) |
Extract list indices for all items with 'name()' that matches. More... | |
Various utility functions to operate on Pointer Lists.
List of values generated by applying the access operation to each list item.
For example,
Referenced by PtrDynList< Foam::profilingInformation >::get(), Enum< faceAction >::getOrDefault(), IFstream::IFstream(), OFstream::OFstream(), ISstream::read(), SloanRenumber::renumber(), HashPtrTable< exprResult >::set(), PackedList< 2 >::uniform(), and PackedList< 2 >::unpack().
List<word> Foam::PtrListOps::names | ( | const UPtrList< T > & | list, |
const UnaryMatchPredicate & | matcher | ||
) |
List of names generated by calling name()
for each list item and filtered for matches
For example,
Referenced by fileFieldSelection::addFromFile(), fieldSelection::addRegistered(), MeshedSurface< Foam::face >::addZones(), Switch::c_str(), searchableSurfaces::checkClosed(), searchableSurfaces::checkIntersection(), searchableSurfaces::checkNormalOrientation(), ZoneMesh< cellZone, polyMesh >::checkParallelSync(), polyBoundaryMesh::checkParallelSync(), searchableSurfaces::checkQuality(), searchableSurfaces::checkSizes(), cellTable::combine(), profileModelList::connectBlades(), Foam::filteredName(), polyTopoChanger::findModifierID(), polyBoundaryMesh::findPatchID(), ZoneMesh< cellZone, polyMesh >::findZoneID(), Foam::FOAM_DEPRECATED_FOR(), MRFZoneList::getFromName(), if(), KinematicSurfaceFilm< CloudType >::initFilmModels(), fluxSummary::initialiseCellZoneAndDirection(), fluxSummary::initialiseFaceZone(), fluxSummary::initialiseFaceZoneAndDirection(), fluxSummary::initialiseSurface(), fluxSummary::initialiseSurfaceAndDirection(), SurfaceFilmModel< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >::inject(), coordinateSystems::lookup(), Switch::name(), coordinateSystems::names(), ZoneMesh< cellZone, polyMesh >::names(), objectRegistry::names(), IOobjectList::names(), combustionModel::New(), chemistryTabulationMethod< ReactionThermo, ThermoType >::New(), chemistryReductionMethod< ReactionThermo, ThermoType >::New(), ZoneMesh< cellZone, polyMesh >::operator[](), polyBoundaryMesh::operator[](), boundaryMesh::patchNames(), polyBoundaryMesh::patchSet(), polyMeshAdder::procPatchPairs(), projectCurveEdge::projectCurveEdge(), projectEdge::projectEdge(), projectVertex::projectVertex(), AC3DsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), cloudInfo::read(), STLsurfaceFormat< Face >::read(), triSurfaceLoader::readDir(), fieldSelection::resetFieldFilters(), logFiles::resetNames(), fieldSelection::selectionNames(), UnsortedMeshedSurface< Face >::setZones(), ZoneMesh< cellZone, polyMesh >::sortedNames(), IOobjectList::sortedNames(), Switch::str(), mappedPatchBase::subRegistry(), pointToPointPlanarInterpolation::timeNames(), uniformInterpolatedDisplacementPointPatchVectorField::uniformInterpolatedDisplacementPointPatchVectorField(), sampledFaceZone::update(), ZoneMesh< cellZone, polyMesh >::updateMetaData(), polyBoundaryMesh::whichPatch(), cloudInfo::write(), multiFieldValue::write(), and searchableSurfaces::writeStats().
List of names generated by calling name()
for each list item no filtering (ie, predicates::always)
label Foam::PtrListOps::firstMatching | ( | const UPtrList< T > & | list, |
const UnaryMatchPredicate & | matcher | ||
) |
Find first list item with 'name()' that matches, -1 on failure.
Referenced by coordinateSystems::cfind(), coordinateSystems::findIndex(), faBoundaryMesh::findIndex(), ZoneMesh< cellZone, polyMesh >::findIndex(), polyBoundaryMesh::findIndex(), faBoundaryMesh::findPatchID(), polyBoundaryMesh::findPatchID(), ZoneMesh< cellZone, polyMesh >::findZoneID(), faBoundaryMesh::indices(), ZoneMesh< cellZone, polyMesh >::indices(), and polyBoundaryMesh::indices().
labelList Foam::PtrListOps::findMatching | ( | const UPtrList< T > & | list, |
const UnaryMatchPredicate & | matcher | ||
) |
Extract list indices for all items with 'name()' that matches.
Referenced by surfaceFormatsCore::getSelectedPatches(), coordinateSystems::indices(), faBoundaryMesh::indices(), ZoneMesh< cellZone, polyMesh >::indices(), and polyBoundaryMesh::indices().