ENH: consistency improvements for keyType and wordRe

- simplify compile/uncompile, reading, assignment

- implicit construct wordRe from keyType (was explicit) to simplify
  future API changes.

- make Foam::isspace consistent with std::isspace (C-locale)
  by including vertical tab and form feed

ENH: improve #ifeq float/label comparisons
This commit is contained in:
Mark Olesen
2021-04-09 11:53:59 +02:00
committed by Andrew Heather
parent 57c1fceabf
commit 96a1b86fb9
33 changed files with 759 additions and 665 deletions

View File

@ -0,0 +1,31 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dictionary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// (label == scalar) ?
#ifeq 0 0.0
labelEqScalar true;
#else
labelEqScalar false; } // Provoke parse error if we see this branch
#endif
// (scalar == label) ?
#ifeq 0.0 0
scalarEqLabel true;
#else
scalarEqLabel false; } // Provoke parse error if we see this branch
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //