39 valTypeCode != expressions::valueTypeCode::NONE
40 && valTypeCode != expressions::valueTypeCode::INVALID
52 valTypeCode == expressions::valueTypeCode::type_bool
53 || valTypeCode == expressions::valueTypeCode::type_label
88 inline void Foam::expressions::exprValue::fill_zero()
91 const auto oldType(typeCode_);
121 <<
"Cannot construct for unsupported type: " 122 <<
typeid(Type).
name() <<
nl 191 data_.set<Type>(val);
192 typeCode_ = whichCode;
200 const Type* dataPtr = this->isA<Type>();
const Type * isA() const noexcept
Return non-null pointer to the data element (if types match). Can also be tested as a bool...
bool good() const noexcept
True if the value type is not none/invalid.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Type & get() const
Return the value. Return pTraits zero if the types mismatch.
direction nComponents() const noexcept
The number of components associated with the value type.
A polymorphic typed union of simple primitive and VectorSpace types. It uses a 'fatter' representatio...
constexpr char nl
The newline '\n' character (0x0a)
A traits class, which is primarily used for primitives and vector-space.
No type, or default initialized type.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
bool set(const Type &val)
Assign from type. Returns false and sets to 'none' for unsupported types.
static bool supportedType()
True if the specified type is supported.
Invalid/unknown/error type.
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.
direction rank() const noexcept
The vector-space rank associated with the value type.
bool is_integral() const noexcept
True if the value type is an integral (bool or label)
errorManip< error > abort(error &err)
word valueTypeName() const
The name for the value type. Similar to pTraits typeName.
Simple type identifiers for polymorphic expression values. The definitions are similar to std::integr...
word listCompoundName() const
The name for the compound token (for a List of values). Eg, List<scalar>, List<vector> ...
::Foam::direction rank(const expressions::valueTypeCode) noexcept
The vector-space rank associated with given valueTypeCode.
exprValue()
Default construct (zero-initialized) as 'none'.