32 #undef FOR_ALL_EXPR_TYPE_CODES 33 #define FOR_ALL_EXPR_TYPE_CODES(Macro, ...) \ 34 Macro(bool, __VA_ARGS__) \ 35 Macro(label, __VA_ARGS__) \ 36 Macro(scalar, __VA_ARGS__) \ 37 Macro(vector, __VA_ARGS__) \ 38 Macro(sphericalTensor, __VA_ARGS__) \ 39 Macro(symmTensor, __VA_ARGS__) \ 40 Macro(tensor, __VA_ARGS__) 53 case expressions::valueTypeCode::NONE :
54 case expressions::valueTypeCode::INVALID :
60 #define doLocalCode(Type, UnusedParam) \ 62 case expressions::valueTypeCode::type_##Type : \ 64 return exprTypeTraits<Type>::nComponents; \ 83 case expressions::valueTypeCode::NONE :
84 case expressions::valueTypeCode::INVALID :
90 #define doLocalCode(Type, UnusedParam) \ 92 case expressions::valueTypeCode::type_##Type : \ 94 return exprTypeTraits<Type>::rank; \ 108 const word& dataTypeName,
112 if (!dataTypeName.empty())
119 #define doLocalCode(Type, UnusedParam) \ 121 if (dataTypeName == exprTypeTraits<Type>::name) \ 123 return expressions::valueTypeCode::type_##Type; \ 138 case expressions::valueTypeCode::NONE :
143 case expressions::valueTypeCode::INVALID :
150 #define doLocalCode(Type, UnusedParam) \ 151 case expressions::valueTypeCode::type_##Type : \ 153 return exprTypeTraits<Type>::name; \ 166 #undef FOR_ALL_EXPR_TYPE_CODES
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
valueTypeCode
An enumeration of known and expected expression value types.
valueTypeCode valueTypeCodeOf(const word &dataTypeName, const expressions::valueTypeCode deflt=expressions::valueTypeCode::INVALID)
From string to valueTypeCode (if any)
#define FOR_ALL_EXPR_TYPE_CODES(Macro,...)
::Foam::direction rank(const expressions::valueTypeCode) noexcept
The vector-space rank associated with given valueTypeCode.
#define doLocalCode(Type, UnusedParam)