34template<
class MatchPredicate>
38 const MatchPredicate& matchName
46 const word& key = iter.key();
61template<
class MatchPredicate1,
class MatchPredicate2>
62Foam::label Foam::IOobjectList::countImpl
65 const MatchPredicate1& matchClass,
66 const MatchPredicate2& matchName
86template<
class Type,
class MatchPredicate>
87Foam::label Foam::IOobjectList::countTypeImpl
90 const MatchPredicate& matchName
110template<
class MatchPredicate1,
class MatchPredicate2>
114 const MatchPredicate1& matchClass,
115 const MatchPredicate2& matchName,
124 const word& key = iter.key();
129 objNames[count] = key;
146template<
class Type,
class MatchPredicate>
150 const MatchPredicate& matchName,
159 const word& key = iter.key();
164 objNames[count] = key;
181template<
class Type,
class MatchPredicate>
183Foam::IOobjectList::objectsTypeImpl
186 const MatchPredicate& matchName
194 const word& key = iter.key();
199 result.
set(count,
io);
213template<
class MatchPredicate>
217 const MatchPredicate& matchName
224 const word& key = iter.key();
243template<
class MatchPredicate1,
class MatchPredicate2>
247 const MatchPredicate1& matchClass,
248 const MatchPredicate2& matchName
255 const word& key = iter.key();
274template<
class Type,
class MatchPredicate>
278 const MatchPredicate& matchName
285 const word& key = iter.key();
326 else if (IOobject::debug)
329 <<
"Found " << objName <<
" of different type" <<
endl;
332 else if (IOobject::debug)
347 return cfindObject<Type>(objName);
354 return const_cast<IOobject*
>(cfindObject<Type>(objName));
361 return const_cast<IOobject*
>(cfindObject<Type>(objName));
365template<
class MatchPredicate>
368 const MatchPredicate& matchName
371 return lookupImpl(*
this, matchName);
375template<
class MatchPredicate>
378 const MatchPredicate& matchClass
385template<
class MatchPredicate1,
class MatchPredicate2>
388 const MatchPredicate1& matchClass,
389 const MatchPredicate2& matchName
392 return lookupClassImpl(*
this, matchClass, matchName);
403template<
class Type,
class MatchPredicate>
406 const MatchPredicate& matchName
409 return lookupClassImpl<Type>(*
this, matchName);
413template<
class MatchPredicate>
417 const MatchPredicate& matchName
420 return classesImpl(*
this, matchName);
424template<
class MatchPredicate>
427 const MatchPredicate& matchClass
434template<
class MatchPredicate1,
class MatchPredicate2>
437 const MatchPredicate1& matchClass,
438 const MatchPredicate2& matchName
441 return countImpl(*
this, matchClass, matchName);
452template<
class Type,
class MatchPredicate>
455 const MatchPredicate& matchName
458 return countTypeImpl<Type>(*
this, matchName);
482 checkObjectOrder(list, syncPar);
488template<
class Type,
class MatchPredicate>
492 const MatchPredicate& matchName
495 return objectsTypeImpl<Type>(*
this, matchName);
499template<
class Type,
class MatchPredicate>
503 const MatchPredicate& matchName,
509 objectsTypeImpl<Type>(*
this, matchName)
512 checkObjectOrder(list, syncPar);
520template<
class MatchPredicate>
523 const MatchPredicate& matchClass
530template<
class MatchPredicate>
533 const MatchPredicate& matchClass,
537 return sortedNames(matchClass, syncPar);
541template<
class MatchPredicate1,
class MatchPredicate2>
544 const MatchPredicate1& matchClass,
545 const MatchPredicate2& matchName
548 return namesImpl(*
this, matchClass, matchName,
false);
552template<
class MatchPredicate1,
class MatchPredicate2>
555 const MatchPredicate1& matchClass,
556 const MatchPredicate2& matchName,
560 return sortedNames(matchClass, matchName, syncPar);
574 return sortedNames<Type>(syncPar);
578template<
class Type,
class MatchPredicate>
581 const MatchPredicate& matchName
584 return namesTypeImpl<Type>(*
this, matchName,
false);
588template<
class Type,
class MatchPredicate>
591 const MatchPredicate& matchName,
595 return sortedNames<Type>(matchName, syncPar);
601template<
class MatchPredicate>
604 const MatchPredicate& matchClass
611template<
class MatchPredicate>
614 const MatchPredicate& matchClass,
623 checkNameOrder(objNames, syncPar);
628template<
class MatchPredicate1,
class MatchPredicate2>
631 const MatchPredicate1& matchClass,
632 const MatchPredicate2& matchName
635 return namesImpl(*
this, matchClass, matchName,
true);
639template<
class MatchPredicate1,
class MatchPredicate2>
642 const MatchPredicate1& matchClass,
643 const MatchPredicate2& matchName,
647 wordList objNames(namesImpl(*
this, matchClass, matchName,
true));
649 checkNameOrder(objNames, syncPar);
666 checkNameOrder(objNames, syncPar);
671template<
class Type,
class MatchPredicate>
674 const MatchPredicate& matchName
677 return namesTypeImpl<Type>(*
this, matchName,
true);
681template<
class Type,
class MatchPredicate>
684 const MatchPredicate& matchName,
688 wordList objNames(namesTypeImpl<Type>(*
this, matchName,
true));
690 checkNameOrder(objNames, syncPar);
697template<
class UnaryPredicate>
700 const UnaryPredicate& pred,
717 for (
iterator iter = begin(); iter != end(); ++iter)
722 (pred(iter.val()->headerClassName()) ? pruning : !pruning)
734template<
class UnaryPredicate>
737 const UnaryPredicate& pred,
750 for (
iterator iter = begin(); iter != end(); ++iter)
755 (pred(iter.key()) ? pruning : !pruning)
bool set(const Key &key, T *ptr)
Assign a new entry, overwriting existing entries.
bool found() const noexcept
True if iterator points to an entry - same as good()
Forward iterator with const access.
reference val() const
Const access to referenced object (value)
Forward iterator with non-const access.
A HashTable similar to std::unordered_map.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
label size() const noexcept
The number of elements in table.
List of IOobjects with searching and retrieving facilities.
const IOobject * findObject(const word &objName) const
Return const pointer to the object found by name.
wordList sortedNames() const
The sorted names of the IOobjects.
label filterClasses(const UnaryPredicate &pred, const bool pruning=false)
Filter to retain or prune given classes.
const IOobject * cfindObject(const word &objName) const
Return const pointer to the object found by name.
IOobject * getObject(const word &objName) const
HashTable< wordHashSet > classes() const
A summary hash of classes used and their associated object names.
label filterObjects(const UnaryPredicate &pred, const bool pruning=false)
Filter to retain or prune given object names.
wordList allNames() const
The sorted names of all objects (synchronised across processors)
label count() const
The number of objects with headerClassName == Type::typeName.
UPtrList< const IOobject > sorted() const
The sorted list of IOobjects.
IOobjectList lookupClass() const
The list of IOobjects with headerClassName == Type::typeName.
wordList names() const
The unsorted names of the IOobjects.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool isHeaderClass() const
Check if headerClassName() equals Type::typeName.
const word & name() const noexcept
Return the object name.
const word & headerClassName() const noexcept
Return name of the class name read from header.
void resize(const label len)
Adjust allocated size of list.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
const T * set(const label i) const
void resize(const label newLen)
Change the size of the list.
Lookup type of boundary radiation properties.
A class for handling words, derived from Foam::string.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
#define InfoInFunction
Report an information message using Foam::Info.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void sort(UList< T > &list)
Sort the list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
Extract name (as a word) from an object, typically using its name() method.
Unary and binary predicates that always return true, useful for templating.