A simple container of IOobject preferences. Can also be used for general handling of read/no-read/read-if-present logic outside of an IOobject. More...
#include <IOobjectOption.H>

Public Types | |
| enum | readOption : unsigned char { NO_READ = 0 , MUST_READ = 0x1 , READ_MODIFIED = 0x3 , MUST_READ_IF_MODIFIED = 0x3 , LAZY_READ = 0x4 , READ_IF_PRESENT = 0x4 } |
| Enumeration defining read preferences. More... | |
| enum | writeOption : unsigned char { NO_WRITE = 0 , AUTO_WRITE = 0x10 } |
| Enumeration defining write preferences. More... | |
| enum | registerOption : unsigned char { NO_REGISTER = 0 , REGISTER = 1 , LEGACY_REGISTER = 2 } |
| Enumeration for use with registerObject(). Values map to bool (false/true). More... | |
| enum class | Layout : unsigned char { regular , global } |
| The layout of the case structure. More... | |
Public Member Functions | |
| 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. | |
| constexpr | IOobjectOption (readOption rOpt, registerOption registerObject=registerOption::REGISTER, bool globalObject=false) noexcept |
| Construct NO_WRITE with specified read/register options. | |
| constexpr | IOobjectOption (writeOption wOpt, registerOption registerObject=registerOption::REGISTER, bool globalObject=false) noexcept |
| Construct NO_READ with specified write/register options. | |
| constexpr | IOobjectOption (registerOption registerObject, bool globalObject=false) noexcept |
| Construct (NO_READ, NO_WRITE) with specified register option. | |
| constexpr | IOobjectOption (readOption rOpt, writeOption wOpt, bool registerObject, bool globalObject=false) noexcept |
| Construct from components with specified register option as bool. | |
| constexpr | IOobjectOption (bool registerObject, bool globalObject=false) noexcept |
| Construct (NO_READ, NO_WRITE) with specified register option as bool. | |
| readOption | readOpt () const noexcept |
| Get the read option. | |
| readOption | readOpt (readOption opt) noexcept |
| Set the read option. | |
| writeOption | writeOpt () const noexcept |
| Get the write option. | |
| writeOption | writeOpt (writeOption opt) noexcept |
| Set the write option. | |
| bool | registerObject () const noexcept |
| Should objects created with this IOobject be registered? | |
| bool | registerObject (bool on) noexcept |
| Change registration preference. | |
| bool | globalObject () const noexcept |
| True if object is treated the same for all processors. | |
| bool | globalObject (bool on) noexcept |
| Change global-object status. | |
| bool | isAnyRead () const noexcept |
| True if any reading may be required (ie, != NO_READ). | |
| bool | isReadRequired () const noexcept |
| True if (MUST_READ | READ_MODIFIED) bits are set. | |
| bool | isReadOptional () const noexcept |
| True if (LAZY_READ) bits are set [same as READ_IF_PRESENT]. | |
| readOption & | readOpt () noexcept |
| Access to the read option. | |
| writeOption & | writeOpt () noexcept |
| Access to the write option. | |
| bool & | registerObject () noexcept |
| Access to the register object option. | |
| bool & | globalObject () noexcept |
| Access to the global object option. | |
Static Public Member Functions | |
| static bool | isAnyRead (readOption opt) noexcept |
| True if any reading may be required (ie, != NO_READ). | |
| static bool | isReadRequired (readOption opt) noexcept |
| True if (MUST_READ | READ_MODIFIED) bits are set. | |
| static bool | isReadOptional (readOption opt) noexcept |
| True if (LAZY_READ) bits are set [same as READ_IF_PRESENT]. | |
| static readOption | lazierRead (readOption opt) noexcept |
| Downgrade readOption optional (LAZY_READ), leaves NO_READ intact. | |
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/read-if-present logic outside of an IOobject.
Definition at line 45 of file IOobjectOption.H.
| enum readOption : unsigned char |
Enumeration defining read preferences.
Lowest bit encodes 'must read'. Possible (future) named variants (none | normal | modified | lazy)
Definition at line 57 of file IOobjectOption.H.
| enum writeOption : unsigned char |
Enumeration defining write preferences.
| Enumerator | |
|---|---|
| NO_WRITE | Ignore writing from objectRegistry::writeObject(). |
| AUTO_WRITE | Automatically write from objectRegistry::writeObject(). |
Definition at line 83 of file IOobjectOption.H.
| enum registerOption : unsigned char |
Enumeration for use with registerObject(). Values map to bool (false/true).
| Enumerator | |
|---|---|
| NO_REGISTER | Do not request registration (bool: false). |
| REGISTER | Request registration (bool: true). |
| LEGACY_REGISTER | Legacy/default registration request (bool: true). |
Definition at line 96 of file IOobjectOption.H.
|
strong |
The layout of the case structure.
| Enumerator | |
|---|---|
| regular | Regular case layout, eg processor-local locations. |
| global | Global case layout (serial locations). |
Definition at line 111 of file IOobjectOption.H.
|
inlineconstexprnoexcept |
Default construct (NO_READ, NO_WRITE, REGISTER, non-global) or construct with specified options.
Definition at line 152 of file IOobjectOption.H.
References globalObject(), NO_READ, NO_WRITE, Foam::noexcept, REGISTER, and registerObject().
Referenced by IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), and IOobject::~IOobject().


|
inlineconstexprnoexcept |
Construct NO_WRITE with specified read/register options.
Definition at line 169 of file IOobjectOption.H.
References globalObject(), NO_WRITE, Foam::noexcept, REGISTER, and registerObject().

|
inlineconstexprnoexcept |
Construct NO_READ with specified write/register options.
Definition at line 185 of file IOobjectOption.H.
References globalObject(), NO_READ, Foam::noexcept, REGISTER, and registerObject().

|
inlineconstexprnoexcept |
Construct (NO_READ, NO_WRITE) with specified register option.
Definition at line 201 of file IOobjectOption.H.
References globalObject(), NO_READ, NO_WRITE, Foam::noexcept, and registerObject().

|
inlineconstexprnoexcept |
Construct from components with specified register option as bool.
Definition at line 217 of file IOobjectOption.H.
References globalObject(), NO_REGISTER, Foam::noexcept, REGISTER, and registerObject().

|
inlineexplicitconstexprnoexcept |
Construct (NO_READ, NO_WRITE) with specified register option as bool.
Definition at line 235 of file IOobjectOption.H.
References globalObject(), NO_READ, NO_REGISTER, NO_WRITE, Foam::noexcept, REGISTER, and registerObject().

|
inlinenoexcept |
Get the read option.
Definition at line 253 of file IOobjectOption.H.
References Foam::noexcept.
Referenced by regIOobject::addWatch(), regIOobject::addWatch(), unwatchedIOdictionary::addWatch(), unwatchedIOdictionary::addWatch(), columnFvMesh::columnFvMesh(), decomposedBlockData::decomposedBlockData(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), faMesh::faMesh(), faMesh::faMesh(), fvMesh::fvMesh(), fvMesh::fvMesh(), IOobject::IOobject(), voxelMeshSearch::makeMesh(), Foam::MapConsistentVolFields(), Foam::MapVolFields(), fvMeshTools::newMesh(), IOobject::operator=(), pointBoundaryMesh::pointBoundaryMesh(), radiationModel::radiationModel(), radiativeIntensityRay::radiativeIntensityRay(), CompactIOField< T >::readContents(), CompactIOList< T >::readContents(), GlobalIOField< Type >::readContents(), GlobalIOList< Type >::readContents(), IOdictionary::readContents(), IOField< Type >::readContents(), IOList< T >::readContents(), IOMap< T >::readContents(), IOPtrList< T >::readContents(), localIOdictionary::readContents(), rawIOField< Type >::readContents(), CompactIOField< T >::readContentsSize(), CompactIOList< T >::readContentsSize(), IOField< Type >::readContentsSize(), IOList< T >::readContentsSize(), waveModel::readDict(), schemesLookup::schemesLookup(), schemesLookup::schemesLookup(), searchableRotatedBox::searchableRotatedBox(), SimplifiedDynamicFvMesh< DynamicMeshType >::SimplifiedDynamicFvMesh(), singleCellFvMesh::singleCellFvMesh(), singleCellFvMesh::singleCellFvMesh(), singleCellFvMesh::singleCellFvMesh(), solution::solution(), solution::solution(), surfMesh::surfMesh(), hexRef8Data::sync(), Time::Time(), Time::Time(), Time::Time(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), and IOobject::warnNoRereading().
|
inlinenoexcept |
|
inlinenoexcept |
Get the write option.
Definition at line 268 of file IOobjectOption.H.
References Foam::noexcept.
Referenced by cellTable::addCellZones(), snappyLayerDriver::addLayers(), polyTopoChanger::addTopologyModifiers(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), GeometricField< Type, PatchField, GeoMesh >::GeometricField(), GeometricField< Type, PatchField, GeoMesh >::GeometricField(), PDRblock::innerMesh(), IOobject::IOobject(), fvMeshTools::newMesh(), objectRegistry::objectRegistry(), IOobject::operator=(), pointBoundaryMesh::pointBoundaryMesh(), polyMesh::polyMesh(), polyMesh::polyMesh(), searchableRotatedBox::searchableRotatedBox(), pointMesh::setInstance(), surfMesh::setWriteOption(), singleCellFvMesh::singleCellFvMesh(), singleCellFvMesh::singleCellFvMesh(), singleCellFvMesh::singleCellFvMesh(), GeometricField< Type, PatchField, GeoMesh >::storeOldTime(), surfMesh::surfMesh(), surfMesh::surfMesh(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), triSurfaceMesh::triSurfaceMesh(), polyTopoChanger::update(), writeObjects::write(), and objectRegistry::writeObject().

|
inlinenoexcept |
|
inlinenoexcept |
Should objects created with this IOobject be registered?
Definition at line 283 of file IOobjectOption.H.
References Foam::noexcept.
Referenced by AttouFerschneider::AttouFerschneider(), Beetstra::Beetstra(), constantSurfaceTensionCoefficient::constantSurfaceTensionCoefficient(), constantVirtualMassCoefficient::constantVirtualMassCoefficient(), dragModel::declareRunTimeSelectionTable(), surfaceTensionModel::declareRunTimeSelectionTable(), virtualMassModel::declareRunTimeSelectionTable(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), dragModel::dragModel(), dragModel::dragModel(), Ergun::Ergun(), Gibilaro::Gibilaro(), GidaspowErgunWenYu::GidaspowErgunWenYu(), GidaspowSchillerNaumann::GidaspowSchillerNaumann(), IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IshiiZuber::IshiiZuber(), Lain::Lain(), Lamb::Lamb(), fvMeshTools::newMesh(), noVirtualMass::noVirtualMass(), GeometricField< Type, PatchField, GeoMesh >::oldTime(), regIOobject::operator=(), regIOobject::regIOobject(), regIOobject::regIOobject(), regIOobject::rename(), SchillerNaumann::SchillerNaumann(), segregated::segregated(), surfaceTensionModel::surfaceTensionModel(), SyamlalOBrien::SyamlalOBrien(), Tenneti::Tenneti(), TomiyamaAnalytic::TomiyamaAnalytic(), TomiyamaCorrelated::TomiyamaCorrelated(), TomiyamaKataokaZunSakaguchi::TomiyamaKataokaZunSakaguchi(), blockMesh::topology(), AttouFerschneider::TypeName(), Beetstra::TypeName(), Ergun::TypeName(), Gibilaro::TypeName(), GidaspowErgunWenYu::TypeName(), GidaspowSchillerNaumann::TypeName(), IshiiZuber::TypeName(), Lain::TypeName(), SchillerNaumann::TypeName(), segregated::TypeName(), SyamlalOBrien::TypeName(), Tenneti::TypeName(), TomiyamaAnalytic::TypeName(), TomiyamaCorrelated::TypeName(), TomiyamaKataokaZunSakaguchi::TypeName(), WenYu::TypeName(), constantSurfaceTensionCoefficient::TypeName(), constantVirtualMassCoefficient::TypeName(), Lamb::TypeName(), noVirtualMass::TypeName(), virtualMassModel::virtualMassModel(), WenYu::WenYu(), and IOobject::~IOobject().
|
inlinenoexcept |
Change registration preference.
Definition at line 288 of file IOobjectOption.H.
|
inlinenoexcept |
True if object is treated the same for all processors.
Definition at line 298 of file IOobjectOption.H.
References Foam::noexcept.
Referenced by IOobject::IOobject(), IOobject::IOobject(), IOobject::IOobject(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IOobjectOption(), IOobject::operator=(), GlobalIOField< Type >::readContents(), GlobalIOList< Type >::readContents(), IOdictionary::readContents(), IOMap< T >::readContents(), and IOobject::~IOobject().

|
inlinenoexcept |
|
inlinestaticnoexcept |
True if any reading may be required (ie, != NO_READ).
Definition at line 316 of file IOobjectOption.H.
References NO_READ.
Referenced by cellZoneSet::cellZoneSet(), GeometricField< scalar, Foam::fvPatchField, Foam::volMesh >::clone(), faceZoneSet::faceZoneSet(), pointZoneSet::pointZoneSet(), fixedGradientFaPatchField< Type >::readGradientEntry(), fixedGradientFvPatchField< Type >::readGradientEntry(), mixedFaPatchField< Type >::readMixedEntries(), mixedFvPatchField< Type >::readMixedEntries(), faePatchField< Type >::readValueEntry(), faPatchField< Type >::readValueEntry(), fvPatchField< Type >::readValueEntry(), fvsPatchField< Type >::readValueEntry(), and valuePointPatchField< Type >::readValueEntry().

|
inlinenoexcept |
True if any reading may be required (ie, != NO_READ).
Definition at line 324 of file IOobjectOption.H.
References NO_READ, and Foam::noexcept.
|
inlinestaticnoexcept |
True if (MUST_READ | READ_MODIFIED) bits are set.
Definition at line 332 of file IOobjectOption.H.
References MUST_READ.
Referenced by coordinateSystem::assign(), Field< Type >::assign(), cellZoneSet::cellZoneSet(), cyclicFaPatchField< Type >::cyclicFaPatchField(), faceZoneSet::faceZoneSet(), fileOperation::findInstance(), masterUncollatedFileOperation::findInstance(), pointZoneSet::pointZoneSet(), dictionary::readCheck(), dictionary::readCompat(), dictionary::readEntry(), dimensionSet::readEntry(), fixedGradientFaPatchField< Type >::readGradientEntry(), fixedGradientFvPatchField< Type >::readGradientEntry(), IOobject::readHeader(), topoSet::readIOcontents(), faePatchField< Type >::readValueEntry(), faPatchField< Type >::readValueEntry(), fvPatchField< Type >::readValueEntry(), fvsPatchField< Type >::readValueEntry(), and valuePointPatchField< Type >::readValueEntry().

|
inlinenoexcept |
True if (MUST_READ | READ_MODIFIED) bits are set.
Definition at line 340 of file IOobjectOption.H.
References MUST_READ, and Foam::noexcept.
Referenced by decomposedBlockData::decomposedBlockData(), extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), faBoundaryMeshEntries::faBoundaryMeshEntries(), featureEdgeMesh::featureEdgeMesh(), IOPtrList< T >::IOPtrList(), IOPtrList< T >::IOPtrList(), IOPtrList< T >::IOPtrList(), lumpedPointIOMovement::lumpedPointIOMovement(), pointBoundaryMesh::pointBoundaryMesh(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), and regIOobject::readHeaderOk().

|
inlinestaticnoexcept |
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
Definition at line 348 of file IOobjectOption.H.
References LAZY_READ.
Referenced by Field< Type >::Field(), topoSet::readIOcontents(), mixedFaPatchField< Type >::readMixedEntries(), and mixedFvPatchField< Type >::readMixedEntries().

|
inlinenoexcept |
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
Definition at line 356 of file IOobjectOption.H.
References LAZY_READ, and Foam::noexcept.
Referenced by decomposedBlockData::decomposedBlockData(), extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), faBoundaryMeshEntries::faBoundaryMeshEntries(), featureEdgeMesh::featureEdgeMesh(), IOPtrList< T >::IOPtrList(), IOPtrList< T >::IOPtrList(), IOPtrList< T >::IOPtrList(), pointBoundaryMesh::pointBoundaryMesh(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), regIOobject::readHeaderOk(), schemesLookup::schemesLookup(), and solution::solution().

|
inlinestaticnoexcept |
Downgrade readOption optional (LAZY_READ), leaves NO_READ intact.
Definition at line 364 of file IOobjectOption.H.
References LAZY_READ, and NO_READ.
Referenced by coordinateSystem::assign(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), and distributedTriSurfaceMesh::distributedTriSurfaceMesh().

|
inlinenoexcept |
Access to the read option.
Definition at line 377 of file IOobjectOption.H.
References Foam::noexcept.
|
inlinenoexcept |
Access to the write option.
Definition at line 384 of file IOobjectOption.H.
References Foam::noexcept.
|
inlinenoexcept |
Access to the register object option.
Definition at line 391 of file IOobjectOption.H.
References Foam::noexcept.
|
inlinenoexcept |
Access to the global object option.
Definition at line 398 of file IOobjectOption.H.
References Foam::noexcept.