42 #ifndef Foam_IOobjectList_H 43 #define Foam_IOobjectList_H 71 static void checkNameOrder(
const wordList& objectNames,
bool syncPar);
78 static void checkObjectOrder
85 static void syncNames(
wordList& objNames);
88 template<
class MatchPredicate>
92 const MatchPredicate& matchName
97 template<
class MatchPredicate1,
class MatchPredicate2>
98 static label countImpl
101 const MatchPredicate1& matchClass,
102 const MatchPredicate2& matchName
106 template<
class Type,
class MatchPredicate>
107 static label countTypeImpl
110 const MatchPredicate& matchName
114 template<
class MatchPredicate1,
class MatchPredicate2>
118 const MatchPredicate1& matchClass,
119 const MatchPredicate2& matchName,
124 template<
class Type,
class MatchPredicate>
128 const MatchPredicate& matchName,
133 template<
class Type,
class MatchPredicate>
137 const MatchPredicate& matchName
141 template<
class MatchPredicate>
145 const MatchPredicate& matchName
149 template<
class MatchPredicate1,
class MatchPredicate2>
153 const MatchPredicate1& matchClass,
154 const MatchPredicate2& matchName
158 template<
class Type,
class MatchPredicate>
162 const MatchPredicate& matchName
243 return remove(
io.name());
309 template<
class MatchPredicate>
316 template<
class MatchPredicate>
321 template<
class MatchPredicate1,
class MatchPredicate2>
324 const MatchPredicate1& matchClass,
325 const MatchPredicate2& matchName
337 template<
class Type,
class MatchPredicate>
417 template<
class MatchPredicate>
453 template<
class Type,
class MatchPredicate>
461 template<
class Type,
class MatchPredicate>
464 const MatchPredicate& matchName,
473 label
count(
const char* clsName)
const;
476 template<
class MatchPredicate>
479 const MatchPredicate& matchClass
484 template<
class MatchPredicate1,
class MatchPredicate2>
487 const MatchPredicate1& matchClass,
488 const MatchPredicate2& matchName
500 template<
class Type,
class MatchPredicate>
501 label
count(
const MatchPredicate& matchName)
const;
525 wordList names(
const char* clsName,
const bool syncPar)
const;
528 template<
class MatchPredicate>
536 template<
class MatchPredicate>
539 const MatchPredicate& matchClass,
545 template<
class MatchPredicate1,
class MatchPredicate2>
548 const MatchPredicate1& matchClass,
549 const MatchPredicate2& matchName
558 template<
class MatchPredicate1,
class MatchPredicate2>
561 const MatchPredicate1& matchClass,
562 const MatchPredicate2& matchName,
583 template<
class Type,
class MatchPredicate>
592 template<
class Type,
class MatchPredicate>
595 const MatchPredicate& matchName,
620 template<
class MatchPredicate>
626 template<
class MatchPredicate>
629 const MatchPredicate& matchClass,
635 template<
class MatchPredicate1,
class MatchPredicate2>
638 const MatchPredicate1& matchClass,
639 const MatchPredicate2& matchName
646 template<
class MatchPredicate1,
class MatchPredicate2>
649 const MatchPredicate1& matchClass,
650 const MatchPredicate2& matchName,
667 template<
class Type,
class MatchPredicate>
674 template<
class Type,
class MatchPredicate>
677 const MatchPredicate& matchName,
686 template<
class UnaryPredicate>
689 const UnaryPredicate& pred,
690 const bool pruning =
false 695 template<
class UnaryPredicate>
698 const UnaryPredicate& pred,
699 const bool pruning =
false 719 void checkNames(
const bool syncPar =
true)
const;
742 bool registerObject =
true 765 IOobject*
lookup(
const word& objName)
const 773 Ostream&
operator<<(Ostream&
os,
const IOobjectList& list);
IOobjectList()
Default construct (empty) with default (128) table capacity.
label filterClasses(const UnaryPredicate &pred, const bool pruning=false)
Filter to retain or prune given classes.
writeOption
Enumeration defining write preferences.
label prune_0()
Remove objects with names ending with "_0" (restart fields)
A class for handling file names.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable, so the various sorted methods should be used if traversing in parallel.
UPtrList< const IOobject > sorted() const
The sorted list of IOobjects.
IOobjectList lookupClass() const
The list of IOobjects with headerClassName == Type::typeName.
bool add(autoPtr< IOobject > &objectPtr)
Move insert IOobject into the list.
wordList sortedNames() const
The sorted names of the IOobjects.
wordList names() const
The unsorted names of the IOobjects.
IOobjectList lookup(const MatchPredicate &matchName) const
The list of IOobjects that have a matching object name.
Ignore writing from objectRegistry::writeObject()
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers...
A class for handling words, derived from Foam::string.
const IOobject * findObject(const word &objName) const
Return const pointer to the object found by name.
wordList allNames() const
The sorted names of all objects (synchronised across processors)
A HashTable similar to std::unordered_map.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
OBJstream os(runTime.globalPath()/outputName)
~IOobjectList()=default
Destructor.
IOobject * getObject(const word &objName) const
Return non-const pointer to the object found by name, using a const-cast to have it behave like a mut...
registerOption
Enumeration for use with registerObject(). Values map to bool (false/true)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
void checkNames(const bool syncPar=true) const
Verify that object names are synchronised across processors.
label count() const
The number of objects with headerClassName == Type::typeName.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
void operator=(const IOobjectList &)=delete
No copy assignment.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
label filterObjects(const UnaryPredicate &pred, const bool pruning=false)
Filter to retain or prune given object names.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Registry of regIOobjects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Request registration (bool: true)
HashTable< wordHashSet > classes() const
A summary hash of classes used and their associated object names.
const IOobject * cfindObject(const word &objName) const
Return const pointer to the object found by name.
readOption
Enumeration defining read preferences.