44 #ifndef Foam_IOobjectOption_H 45 #define Foam_IOobjectOption_H 112 bool registerObject_;
173 readOpt_(readOption::NO_READ),
174 writeOpt_(writeOption::NO_WRITE),
240 bool old(registerObject_);
241 registerObject_ = on;
251 bool old(globalObject_);
262 return static_cast<bool>(opt & readOption::MUST_READ);
268 return static_cast<bool>(readOpt_ & readOption::MUST_READ);
274 return (opt == readOption::READ_IF_PRESENT);
280 return (readOpt_ == readOption::READ_IF_PRESENT);
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.
Ignore writing from objectRegistry::writeObject()
bool isReadOptional() const noexcept
True if (READ_IF_PRESENT) bits are set.
bool globalObject() const noexcept
True if object is treated the same for all processors.
writeOption writeOpt() const noexcept
Get the write option.
Reading required, file watched for runTime modification.
bool isReadRequired() const noexcept
True if (MUST_READ | MUST_READ_IF_MODIFIED) bits are set.
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()
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.