40 #ifndef Foam_IOobjectOption_H 41 #define Foam_IOobjectOption_H 120 bool registerObject_;
181 readOpt_(readOption::NO_READ),
182 writeOpt_(writeOption::NO_WRITE),
248 bool old(registerObject_);
249 registerObject_ = on;
259 bool old(globalObject_);
270 return (opt != readOption::NO_READ);
276 return (readOpt_ != readOption::NO_READ);
282 return (opt & readOption::MUST_READ);
288 return (readOpt_ & readOption::MUST_READ);
294 return (opt == readOption::LAZY_READ);
300 return (readOpt_ == readOption::LAZY_READ);
306 return (opt == readOption::NO_READ ? opt : readOption::LAZY_READ);
constexpr IOobjectOption(readOption rOpt=readOption::NO_READ, writeOption wOpt=writeOption::NO_WRITE, registerOption registerObject=registerOption::REGISTER, bool globalObject=false) noexcept
Default construct (NO_READ, NO_WRITE, REGISTER, non-global) or construct with specified options...
writeOption
Enumeration defining write preferences.
readOption readOpt() const noexcept
Get the read option.
Legacy/default registration request (bool: true)
bool isAnyRead() const noexcept
True if any reading may be required (ie, != NO_READ)
Ignore writing from objectRegistry::writeObject()
bool isReadOptional() const noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
bool globalObject() const noexcept
True if object is treated the same for all processors.
writeOption writeOpt() const noexcept
Get the write option.
Reading is optional [identical to LAZY_READ].
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
static readOption lazierRead(readOption opt) noexcept
Downgrade readOption optional (LAZY_READ), leaves NO_READ intact.
registerOption
Enumeration for use with registerObject(). Values map to bool (false/true)
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Automatically write from objectRegistry::writeObject()
Reading is optional [identical to READ_IF_PRESENT].
bool registerObject() const noexcept
Should objects created with this IOobject be registered?
Request registration (bool: true)
Do not request registration (bool: false)
readOption
Enumeration defining read preferences.