36 Foam::objectRegistry::objectRegistry
39 const label nIoObjects
46 string::validate<word>(t.
caseName()),
63 Foam::objectRegistry::objectRegistry
66 const label nIoObjects
73 dbDir_(parent_.dbDir()/local()/
name()),
76 writeOpt() = IOobject::AUTO_WRITE;
89 if (iter()->ownedByRegistry())
91 myObjects[nMyObjects++] = iter();
95 for (label i=0; i<nMyObjects; i++)
109 for (const_iterator iter = cbegin(); iter != cend(); ++iter)
111 objectNames[count++] = iter()->name();
123 for (const_iterator iter = cbegin(); iter != cend(); ++iter)
127 objectNames[count++] = iter()->name();
142 return lookupObject<objectRegistry>(
name);
148 label curEvent = event_++;
150 if (event_ == labelMax)
152 WarningIn(
"objectRegistry::getEvent() const")
153 <<
"Event counter has overflowed. Resetting counter on all"
154 <<
" dependent objects." <<
endl
155 <<
"This might cause extra evaluations." <<
endl;
161 for (const_iterator iter = begin(); iter != end(); ++iter)
165 if (objectRegistry::debug)
167 Pout<<
"objectRegistry::getEvent() : "
168 <<
"resetting count on " << iter.key() <<
endl;
184 if (objectRegistry::debug)
186 Pout<<
"objectRegistry::checkIn(regIOobject&) : "
187 <<
name() <<
" : checking in " << io.
name()
201 if (objectRegistry::debug)
203 Pout<<
"objectRegistry::checkOut(regIOobject&) : "
204 <<
name() <<
" : checking out " << io.
name()
210 if (objectRegistry::debug)
212 WarningIn(
"objectRegistry::checkOut(regIOobject&)")
213 <<
name() <<
" : attempt to checkOut copy of " << io.
name()
235 if (objectRegistry::debug)
237 Pout<<
"objectRegistry::checkOut(regIOobject&) : "
238 <<
name() <<
" : could not find " << io.
name()
239 <<
" in registry " <<
name()
253 string::size_type i = dbDir_.rfind(
'/');
255 if (i == string::npos)
261 dbDir_.
replace(i+1, string::npos, newName);
268 for (const_iterator iter = cbegin(); iter != cend(); ++iter)
270 if (iter()->modified())
282 for (iterator iter = begin(); iter != end(); ++iter)
284 if (objectRegistry::debug)
286 Pout<<
"objectRegistry::readModifiedObjects() : "
287 <<
name() <<
" : Considering reading object "
292 iter()->readIfModified();
299 readModifiedObjects();
313 for (const_iterator iter = cbegin(); iter != cend(); ++iter)
315 if (objectRegistry::debug)
317 Pout<<
"objectRegistry::write() : "
318 <<
name() <<
" : Considering writing object "
320 <<
" with writeOpt " << iter()->writeOpt()
321 <<
" to file " << iter()->objectPath()
325 if (iter()->writeOpt() != NO_WRITE)
327 ok = iter()->writeObject(fmt, ver, cmp) && ok;