91#undef defineExpressionEntryType
92#define defineExpressionEntryType(DimType) \
93 Foam::string Foam::exprTools::DimType##Entry::evaluate(const entry& e) \
95 DimType dt(dynamicCast<const primitiveEntry>(e)); \
96 return toExprStr<DimType::value_type>(dt.value()); \
103 return std::to_string(dt.value());
112#undef defineExpressionEntryType
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
const Type & value() const noexcept
Return const reference to value.
A keyword and a list of tokens is an 'entry'.
Convert dictionary entry to a stringified expression.
A class for handling character strings derived from std::string.
#define defineExpressionEntryType(DimType)
Creates an expression string from various standard dimensioned types.
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
dimensioned< sphericalTensor > dimensionedSphericalTensor
Dimensioned sphericalTensor obtained from generic dimensioned type.
Type & dynamicCast(U &obj)
A dynamic_cast (for references) that generates FatalError on failed casts.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< tensor > dimensionedTensor
Dimensioned tensor obtained from generic dimensioned type.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Create an expression string from a dimensionedScalar as its value.
static string evaluate(const entry &e)
Entry to string.
Create an expression string from a dimensionedSphericalTensor as its value.
Create an expression string from a dimensionedSymmTensor as its value.
Create an expression string from a dimensionedTensor as its value.
Create an expression string from a dimensionedVector as its value.