mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: handle keyType type (literal/regex) as enum instead of bool
- makes its use somewhat clearer and allows more future options
This commit is contained in:
committed by
Andrew Heather
parent
dade6957c8
commit
b5342c166c
@ -96,7 +96,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
{
|
||||
dictionary dict(IFstream("testDictRegex")());
|
||||
dict.add(keyType("fooba[rz]", true), "anything");
|
||||
dict.add(keyType("fooba[rz]", keyType::REGEX), "anything");
|
||||
|
||||
dict.writeEntry("testDictRegex", Info);
|
||||
Info<< nl
|
||||
|
||||
@ -184,7 +184,7 @@ int main(int argc, char *argv[])
|
||||
if (names[nameI] != oldNames[nameI])
|
||||
{
|
||||
// make "(abc|def)" pattern
|
||||
keyType renamed( "(" + names[nameI] + ")", true);
|
||||
keyType renamed("(" + names[nameI] + ")", keyType::REGEX);
|
||||
|
||||
solverDict.changeKeyword(oldNames[nameI], renamed);
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ int main(int argc, char *argv[])
|
||||
Foam::string s2("this .* file");
|
||||
const char * s3 = "this .* file";
|
||||
|
||||
keyType keyre("x.*", true);
|
||||
keyType keyre("x.*", keyType::REGEX);
|
||||
|
||||
wordReList wordrelist
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user