39#ifndef Foam_IOobjectList_H
40#define Foam_IOobjectList_H
68 static void checkNameOrder(
const wordList& objectNames,
bool syncPar);
75 static void checkObjectOrder
82 static void syncNames(
wordList& objNames);
85 template<
class MatchPredicate>
89 const MatchPredicate& matchName
94 template<
class MatchPredicate1,
class MatchPredicate2>
95 static label countImpl
98 const MatchPredicate1& matchClass,
99 const MatchPredicate2& matchName
103 template<
class Type,
class MatchPredicate>
104 static label countTypeImpl
107 const MatchPredicate& matchName
111 template<
class MatchPredicate1,
class MatchPredicate2>
115 const MatchPredicate1& matchClass,
116 const MatchPredicate2& matchName,
121 template<
class Type,
class MatchPredicate>
125 const MatchPredicate& matchName,
130 template<
class Type,
class MatchPredicate>
134 const MatchPredicate& matchName
138 template<
class MatchPredicate>
142 const MatchPredicate& matchName
146 template<
class MatchPredicate1,
class MatchPredicate2>
150 const MatchPredicate1& matchClass,
151 const MatchPredicate2& matchName
155 template<
class Type,
class MatchPredicate>
159 const MatchPredicate& matchName
187 bool registerObject =
true
292 template<
class MatchPredicate>
299 template<
class MatchPredicate>
304 template<
class MatchPredicate1,
class MatchPredicate2>
307 const MatchPredicate1& matchClass,
308 const MatchPredicate2& matchName
320 template<
class Type,
class MatchPredicate>
400 template<
class MatchPredicate>
436 template<
class Type,
class MatchPredicate>
444 template<
class Type,
class MatchPredicate>
447 const MatchPredicate& matchName,
456 label
count(
const char* clsName)
const;
459 template<
class MatchPredicate>
462 const MatchPredicate& matchClass
467 template<
class MatchPredicate1,
class MatchPredicate2>
470 const MatchPredicate1& matchClass,
471 const MatchPredicate2& matchName
483 template<
class Type,
class MatchPredicate>
484 label
count(
const MatchPredicate& matchName)
const;
508 wordList names(
const char* clsName,
const bool syncPar)
const;
511 template<
class MatchPredicate>
519 template<
class MatchPredicate>
522 const MatchPredicate& matchClass,
528 template<
class MatchPredicate1,
class MatchPredicate2>
531 const MatchPredicate1& matchClass,
532 const MatchPredicate2& matchName
541 template<
class MatchPredicate1,
class MatchPredicate2>
544 const MatchPredicate1& matchClass,
545 const MatchPredicate2& matchName,
566 template<
class Type,
class MatchPredicate>
575 template<
class Type,
class MatchPredicate>
578 const MatchPredicate& matchName,
603 template<
class MatchPredicate>
609 template<
class MatchPredicate>
612 const MatchPredicate& matchClass,
618 template<
class MatchPredicate1,
class MatchPredicate2>
621 const MatchPredicate1& matchClass,
622 const MatchPredicate2& matchName
629 template<
class MatchPredicate1,
class MatchPredicate2>
632 const MatchPredicate1& matchClass,
633 const MatchPredicate2& matchName,
650 template<
class Type,
class MatchPredicate>
657 template<
class Type,
class MatchPredicate>
660 const MatchPredicate& matchName,
669 template<
class UnaryPredicate>
672 const UnaryPredicate& pred,
673 const bool pruning =
false
678 template<
class UnaryPredicate>
681 const UnaryPredicate& pred,
682 const bool pruning =
false
702 void checkNames(
const bool syncPar =
true)
const;
735Ostream&
operator<<(Ostream&
os,
const IOobjectList& list);
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
A HashTable similar to std::unordered_map.
List of IOobjects with searching and retrieving facilities.
wordList sortedNames(bool syncPar) const
The sorted names of objects with headerClassName == Type::typeName.
label count(const MatchPredicate &matchClass) const
The number of objects of the given headerClassName.
wordList sortedNames(const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
IOobject * findObject(const word &objName)
label count(const MatchPredicate &matchName) const
const IOobject * findObject(const word &objName) const
Return const pointer to the object found by name.
const IOobject * cfindObject(const word &objName) const
UPtrList< const IOobject > sorted(const bool syncPar) const
label append(const IOobjectList &other)
IOobjectList()
Construct null with default (128) table capacity.
IOobjectList lookup(const MatchPredicate &matchName) const
The list of IOobjects that have a matching object name.
wordList sortedNames() const
The sorted names of the IOobjects.
IOobjectList lookupClass(const MatchPredicate &matchName) const
IOobjectList lookupClass(const MatchPredicate &matchClass) const
The list of IOobjects with matching headerClassName.
wordList names(const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName, const bool syncPar) const
wordList sortedNames(const MatchPredicate &matchName, const bool syncPar) const
wordList names(const MatchPredicate &matchClass, const bool syncPar) const
The sorted names of the IOobjects with the given headerClassName.
label filterClasses(const UnaryPredicate &pred, const bool pruning=false)
Filter to retain or prune given classes.
void operator=(const IOobjectList &)=delete
No copy assignment.
const IOobject * findObject(const word &objName) const
const IOobject * cfindObject(const word &objName) const
Return const pointer to the object found by name.
wordList names(const MatchPredicate &matchClass) const
The unsorted names of IOobjects with the given headerClassName.
IOobject * getObject(const word &objName) const
wordList names(bool syncPar) const
HashTable< wordHashSet > classes() const
A summary hash of classes used and their associated object names.
IOobjectList lookupClass(const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
void checkNames(const bool syncPar=true) const
Verify that object names are synchronised across processors.
UPtrList< const IOobject > sorted(const MatchPredicate &matchName) const
UPtrList< const IOobject > sorted(const MatchPredicate &matchName, const bool syncPar) const
IOobject * getObject(const word &objName) const
wordList sortedNames(const MatchPredicate &matchClass, const bool syncPar) const
The sorted names of the IOobjects with the given headerClassName.
label prune_0()
Remove objects with names ending with "_0" (restart fields)
wordList names(const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
label filterObjects(const UnaryPredicate &pred, const bool pruning=false)
Filter to retain or prune given object names.
wordList names(const MatchPredicate &matchName) const
HashTable< wordHashSet > classes(const MatchPredicate &matchName) const
wordList allNames() const
The sorted names of all objects (synchronised across processors)
label count() const
The number of objects with headerClassName == Type::typeName.
wordList sortedNames(const MatchPredicate &matchName) const
wordList sortedNames() const
The sorted names of objects with headerClassName == Type::typeName.
UPtrList< const IOobject > sorted() const
The sorted list of IOobjects.
bool remove(const IOobject &io)
Remove IOobject from the list.
wordList sortedNames(const MatchPredicate &matchClass) const
The sorted names of IOobjects with the given headerClassName.
IOobjectList lookupClass() const
The list of IOobjects with headerClassName == Type::typeName.
UPtrList< const IOobject > sorted() const
The sorted list of IOobjects with headerClassName == Type::typeName.
bool add(autoPtr< IOobject > &objectPtr)
Add IOobject to the list.
wordList names() const
The unsorted names of the IOobjects.
label count(const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName) const
~IOobjectList()=default
Destructor.
wordList sortedNames(const MatchPredicate1 &matchClass, const MatchPredicate2 &matchName, const bool syncPar) const
wordList allNames() const
wordList names(const MatchPredicate &matchName, const bool syncPar) const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
writeOption
Enumeration defining the write options.
readOption
Enumeration defining the read options.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A class for handling file names.
Registry of regIOobjects.
Lookup type of boundary radiation properties.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)