| 49 | \*---------------------------------------------------------------------------*/ |
| 50 | |
| 51 | class IOobjectList |
| 52 | : |
| 53 | public HashPtrTable<IOobject> |
| 54 | { |
| 55 | // Private Member Functions |
| 56 | |
| 57 | //- Disallow default bitwise assignment |
| 58 | void operator=(const IOobjectList&); |
| 59 | |
| 60 | |
| 61 | public: |
| 62 | |
| 63 | // Constructors |
| 64 | |
| 65 | //- Construct given an initial estimate for the number of entries |
| 66 | explicit IOobjectList(const label nIoObjects = 128); |
| 67 | |
| 68 | //- Construct from objectRegistry and instance path |
| 69 | IOobjectList |
| 70 | ( |
| 71 | const objectRegistry& db, |
| 72 | const fileName& instance, |
| 73 | const fileName& local = "", |
| 74 | IOobject::readOption r = IOobject::MUST_READ, |
| 75 | IOobject::writeOption w = IOobject::NO_WRITE, |
| 76 | bool registerObject = true |
| 77 | ); |
| 78 | |
| 79 | //- Construct as copy |
| 80 | IOobjectList(const IOobjectList&); |
| 81 | |
| 82 | |
| 83 | //- Destructor |
| 84 | ~IOobjectList(); |
| 85 | |
| 86 | |
| 87 | // Member functions |
| 88 | |
| 89 | //- Add an IOobject to the list |
| 90 | bool add(IOobject&); |
| 91 | |
| 92 | //- Remove an IOobject from the list |
| 93 | bool remove(IOobject&); |
| 94 | |
| 95 | //- Lookup a given name and return IOobject ptr if found else nullptr |
| 96 | IOobject* lookup(const word& name) const; |
| 97 | |
| 98 | //- Return the list for all IOobects whose name matches name |
| 99 | IOobjectList lookup(const wordRe& name) const; |
| 100 | |
| 101 | //- Return the list for all IOobects whose name matches name |
| 102 | IOobjectList lookup(const wordReList& patterns) const; |
| 103 | |
| 104 | //- Return the list for all IOobjects of a given class |
| 105 | IOobjectList lookupClass(const word& className) const; |
| 106 | |
| 107 | //- Return the list of names of the IOobjects |
| 108 | wordList names() const; |