mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add sorted() to objectRegistry and IOobjectList
- returns UPtrList view (read-only or read/write) of the objects
- shorter names for IOobject checks: hasHeaderClass(), isHeaderClass()
- remove unused IOobject::isHeaderClassName(const word&) method.
The typed versions are preferable/recommended, but can still check
directly if needed:
(io.headerClassName() == "foo")
This commit is contained in:
@ -192,7 +192,7 @@ Foam::label Foam::functionObjects::fvExpressionField::loadFields
|
||||
const bool ok =
|
||||
(
|
||||
io.typeHeaderOk<regIOobject>(false) // Preload header info
|
||||
&& io.hasHeaderClassName() // Extra safety
|
||||
&& io.hasHeaderClass() // Extra safety
|
||||
&&
|
||||
(
|
||||
loadField<scalar>(io)
|
||||
|
||||
@ -104,7 +104,7 @@ bool Foam::functionObjects::readFields::execute()
|
||||
const bool ok =
|
||||
(
|
||||
io.typeHeaderOk<regIOobject>(false) // Preload header info
|
||||
&& io.hasHeaderClassName() // Extra safety
|
||||
&& io.hasHeaderClass() // Extra safety
|
||||
&&
|
||||
(
|
||||
loadField<scalar>(io)
|
||||
|
||||
Reference in New Issue
Block a user