mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
- use succincter method names that more closely resemble dictionary
and HashTable method names. This improves method name consistency
between classes and also requires less typing effort:
args.found(optName) vs. args.optionFound(optName)
args.readIfPresent(..) vs. args.optionReadIfPresent(..)
...
args.opt<scalar>(optName) vs. args.optionRead<scalar>(optName)
args.read<scalar>(index) vs. args.argRead<scalar>(index)
- the older method names forms have been retained for code compatibility,
but are now deprecated
29 lines
440 B
C
29 lines
440 B
C
fileName dictPath;
|
|
if (args.readIfPresent("dict", dictPath))
|
|
{
|
|
if (isDir(dictPath))
|
|
{
|
|
dictPath = dictPath / dictName;
|
|
}
|
|
}
|
|
|
|
IOobject dictIO
|
|
(
|
|
dictName,
|
|
runTime.system(),
|
|
mesh,
|
|
IOobject::MUST_READ_IF_MODIFIED,
|
|
IOobject::NO_WRITE
|
|
);
|
|
|
|
if (dictPath.size())
|
|
{
|
|
dictIO = IOobject
|
|
(
|
|
dictPath.expand(),
|
|
mesh,
|
|
IOobject::MUST_READ_IF_MODIFIED,
|
|
IOobject::NO_WRITE
|
|
);
|
|
}
|