mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: code reduction, improvements for expressions
- literal lookups only for expression strings - code reduction for setExprFields. - changed keyword "condition" to "fieldMask" (option -field-mask). This is a better description of its purpose and avoids possible naming ambiguities with functionObject triggers (for example) if we apply similar syntax elsewhere. BUG: erroneous check in volumeExpr::parseDriver::isResultType() - not triggered since this method is not used anywhere (may remove in future version)
This commit is contained in:
committed by
Andrew Heather
parent
39f6618d3a
commit
510ffb3322
@ -135,13 +135,22 @@ public:
|
||||
|
||||
//- Get and expand expression with dictionary entries,
|
||||
//- optionally strip C/C++ comments from the input.
|
||||
//
|
||||
// Expansion behaviour as per inplaceExpand
|
||||
static exprString getExpression
|
||||
static exprString getEntry
|
||||
(
|
||||
const word& name,
|
||||
const word& keyword, //!< Lookup key. Uses LITERAL (not REGEX)
|
||||
const dictionary& dict,
|
||||
const bool stripComments = false
|
||||
const bool stripComments = true
|
||||
);
|
||||
|
||||
//- Get and expand expression with dictionary entries,
|
||||
//- optionally strip C/C++ comments from the input.
|
||||
// Expansion behaviour as per inplaceExpand
|
||||
static exprString getOptional
|
||||
(
|
||||
const word& keyword, //!< Lookup key. Uses LITERAL (not REGEX)
|
||||
const dictionary& dict,
|
||||
const bool stripComments = true
|
||||
);
|
||||
|
||||
//- Copy convert string to exprString.
|
||||
@ -155,17 +164,26 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Inplace expansion with dictionary variables,
|
||||
//- and strip C/C++ comments from the input
|
||||
exprString& expand
|
||||
(
|
||||
const dictionary& dict,
|
||||
const bool stripComments = true
|
||||
);
|
||||
|
||||
//- Check for unexpanded '$' entries. Fatal if any exist.
|
||||
inline bool valid() const;
|
||||
|
||||
//- Inplace expansion with dictionary variables,
|
||||
//- and strip C/C++ comments from the input
|
||||
void expand(const dictionary& dict, const bool stripComments = true);
|
||||
|
||||
//- Inplace trim leading and trailing whitespace
|
||||
void trim();
|
||||
|
||||
//- Read/expand entry with dictionary variables,
|
||||
//- and strip C/C++ comments from the input
|
||||
bool readEntry
|
||||
(
|
||||
const word& keyword, //!< Lookup key. Uses LITERAL (not REGEX)
|
||||
const dictionary& dict,
|
||||
bool mandatory = true,
|
||||
const bool stripComments = true
|
||||
);
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
|
||||
Reference in New Issue
Block a user