ENH: add IOobjectOption::LEGACY_REGISTER enumeration
- extends the enumeration (NO_REGISTER, REGISTER, LEGACY_REGISTER). Can be used to tweak registration preference where required and potentially (TDB) to define a different default value in the future
This commit is contained in:
parent
6ea2041122
commit
a03077e151
@ -393,7 +393,7 @@ public:
|
||||
const objectRegistry& registry,
|
||||
IOobjectOption::readOption rOpt,
|
||||
IOobjectOption::writeOption wOpt = IOobjectOption::NO_WRITE,
|
||||
bool registerObject = true,
|
||||
bool registerObject = true, // == IOobjectOption::LEGACY_REGISTER
|
||||
bool globalObject = false
|
||||
);
|
||||
|
||||
@ -406,7 +406,7 @@ public:
|
||||
const objectRegistry& registry,
|
||||
IOobjectOption::readOption rOpt,
|
||||
IOobjectOption::writeOption wOpt = IOobjectOption::NO_WRITE,
|
||||
bool registerObject = true,
|
||||
bool registerObject = true, // == IOobjectOption::LEGACY_REGISTER
|
||||
bool globalObject = false
|
||||
);
|
||||
|
||||
@ -422,7 +422,7 @@ public:
|
||||
const objectRegistry& registry,
|
||||
IOobjectOption::readOption rOpt,
|
||||
IOobjectOption::writeOption wOpt = IOobjectOption::NO_WRITE,
|
||||
bool registerObject = true,
|
||||
bool registerObject = true, // == IOobjectOption::LEGACY_REGISTER
|
||||
bool globalObject = false
|
||||
);
|
||||
|
||||
|
@ -99,7 +99,10 @@ public:
|
||||
NO_REGISTER = 0,
|
||||
|
||||
//! Request registration (bool: true)
|
||||
REGISTER = 1
|
||||
REGISTER = 1,
|
||||
|
||||
//! Legacy/default registration request (bool: true)
|
||||
LEGACY_REGISTER = 2
|
||||
};
|
||||
|
||||
|
||||
@ -124,7 +127,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Default construct (NO_READ, NO_WRITE, register, non-global)
|
||||
//- Default construct (NO_READ, NO_WRITE, REGISTER, non-global)
|
||||
//- or construct with specified options
|
||||
constexpr IOobjectOption
|
||||
(
|
||||
@ -267,7 +270,7 @@ public:
|
||||
return (opt != readOption::NO_READ);
|
||||
}
|
||||
|
||||
//- True if any reading may be required(ie, != NO_READ)
|
||||
//- True if any reading may be required (ie, != NO_READ)
|
||||
bool isAnyRead() const noexcept
|
||||
{
|
||||
return (readOpt_ != readOption::NO_READ);
|
||||
|
Loading…
Reference in New Issue
Block a user