mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: support READ_MODIFIED <-> MUST_READ_IF_MODIFIED as aliases
This commit is contained in:
@ -32,10 +32,6 @@ Description
|
|||||||
Can also be used for general handling of read/no-read/read-if-present
|
Can also be used for general handling of read/no-read/read-if-present
|
||||||
logic outside of an IOobject.
|
logic outside of an IOobject.
|
||||||
|
|
||||||
Note
|
|
||||||
In the future may include an Enumeration defining register preferences
|
|
||||||
(NO_REGISTER, REGISTER)
|
|
||||||
|
|
||||||
See also
|
See also
|
||||||
Foam::IOobject
|
Foam::IOobject
|
||||||
|
|
||||||
@ -71,6 +67,11 @@ public:
|
|||||||
MUST_READ = 0x1,
|
MUST_READ = 0x1,
|
||||||
|
|
||||||
//! Reading required, file watched for runTime modification
|
//! Reading required, file watched for runTime modification
|
||||||
|
//! [identical to MUST_READ_IF_MODIFIED]
|
||||||
|
READ_MODIFIED = 0x3,
|
||||||
|
|
||||||
|
//! Reading required, file watched for runTime modification
|
||||||
|
//! [identical to READ_MODIFIED]
|
||||||
MUST_READ_IF_MODIFIED = 0x3,
|
MUST_READ_IF_MODIFIED = 0x3,
|
||||||
|
|
||||||
//! Reading is optional [identical to READ_IF_PRESENT]
|
//! Reading is optional [identical to READ_IF_PRESENT]
|
||||||
@ -260,25 +261,25 @@ public:
|
|||||||
|
|
||||||
// Checks
|
// Checks
|
||||||
|
|
||||||
//- True if not (NO_READ)
|
//- True if any reading may be required (ie, != NO_READ)
|
||||||
static bool isAnyRead(readOption opt) noexcept
|
static bool isAnyRead(readOption opt) noexcept
|
||||||
{
|
{
|
||||||
return (opt != readOption::NO_READ);
|
return (opt != readOption::NO_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- True if not (NO_READ)
|
//- True if any reading may be required(ie, != NO_READ)
|
||||||
bool isAnyRead() const noexcept
|
bool isAnyRead() const noexcept
|
||||||
{
|
{
|
||||||
return (readOpt_ != readOption::NO_READ);
|
return (readOpt_ != readOption::NO_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- True if (MUST_READ | MUST_READ_IF_MODIFIED) bits are set
|
//- True if (MUST_READ | READ_MODIFIED) bits are set
|
||||||
static bool isReadRequired(readOption opt) noexcept
|
static bool isReadRequired(readOption opt) noexcept
|
||||||
{
|
{
|
||||||
return (opt & readOption::MUST_READ);
|
return (opt & readOption::MUST_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- True if (MUST_READ | MUST_READ_IF_MODIFIED) bits are set
|
//- True if (MUST_READ | READ_MODIFIED) bits are set
|
||||||
bool isReadRequired() const noexcept
|
bool isReadRequired() const noexcept
|
||||||
{
|
{
|
||||||
return (readOpt_ & readOption::MUST_READ);
|
return (readOpt_ & readOption::MUST_READ);
|
||||||
|
|||||||
Reference in New Issue
Block a user