ENH: #codeStream: preserve across preprocessing

- new token: token::VERBATIMSTRING
- writing of this type in primitiveEntry
- disabling of all functionEntries in entry
This commit is contained in:
mattijs
2011-02-22 15:29:57 +00:00
parent 869d6fa460
commit 79939b9e18
12 changed files with 121 additions and 20 deletions

View File

@ -34,6 +34,9 @@ Usage
\param -test \n
Suppress writing the updated files with split cyclics
\param -enableFunctionEntries \n
By default all dictionary preprocessing of fields is disabled
\*---------------------------------------------------------------------------*/
#include "argList.H"
@ -391,7 +394,12 @@ int main(int argc, char *argv[])
{
timeSelector::addOptions();
argList::addBoolOption("test");
argList::addBoolOption("test", "test only; do not change any files");
argList::addBoolOption
(
"enableFunctionEntries",
"enable expansion of dictionary directives - #include, #codeStream etc"
);
# include "addRegionOption.H"
# include "setRootCase.H"
@ -404,6 +412,7 @@ int main(int argc, char *argv[])
{
Info<< "-test option: no changes made" << nl << endl;
}
const bool enableEntries = args.optionFound("enableFunctionEntries");
Foam::word regionName = polyMesh::defaultRegion;
@ -482,6 +491,13 @@ int main(int argc, char *argv[])
IOobjectList objects(runTime, runTime.timeName());
int oldFlag = entry::disableFunctionEntries;
if (!enableEntries)
{
// By default disable dictionary expansion for fields
entry::disableFunctionEntries = 1;
}
// volFields
// ~~~~~~~~~
@ -615,6 +631,8 @@ int main(int argc, char *argv[])
thisNames,
nbrNames
);
entry::disableFunctionEntries = oldFlag;
}
return 0;