Loading...
Searching...
No Matches
exprValue.H File Reference
Include dependency graph for exprValue.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  exprValueUnion
 The data content (as a union). More...
class  exprValue
 A polymorphic typed union of simple primitive and VectorSpace types. It uses a 'fatter' representation that includes standard VectorSpace types, which avoids heap allocations at the expense of more storage. This is mostly not an issue since lists and fields would box/unbox an entire field, not individual values. More...
struct  is_contiguous< expressions::exprValue >
 The data content are contiguous. More...

Namespaces

namespace  Foam
 Namespace for OpenFOAM.
namespace  Foam::expressions
 A namespace for expression-related classes/traits etc.
namespace  Foam::expressions::Detail
 A namespace for implementation details related to expressions.

Macros

#define FOR_ALL_EXPR_VALUE_TYPES(Macro, ...)
#define declareUnionMember(Type, UnusedParam)
#define defineMultiTypeValueUnionMethods(Type, UnusedParam)
#define defineUnionMethods(Type, UnusedParam)

Functions

Istreamoperator>> (Istream &is, expressions::exprValue &val)
 Read/parse value from input stream (uses ASCII format).
Ostreamoperator<< (Ostream &os, const expressions::exprValue &val)
 Write value to output stream (uses ASCII format). Writes 'none' or 'bad' for unknown/unsupported types.
template<>
Ostreamoperator<< (Ostream &os, const InfoProxy< expressions::exprValue > &)

Detailed Description

Original source file exprValue.H

Definition in file exprValue.H.

Macro Definition Documentation

◆ FOR_ALL_EXPR_VALUE_TYPES

#define FOR_ALL_EXPR_VALUE_TYPES ( Macro,
... )
Value:
Macro(scalar, __VA_ARGS__) \
Macro(vector, __VA_ARGS__) \
Macro(tensor, __VA_ARGS__) \
Macro(symmTensor, __VA_ARGS__) \
Macro(sphericalTensor, __VA_ARGS__) \
Macro(label, __VA_ARGS__) \
Macro(bool, __VA_ARGS__)
Tensor of scalars, i.e. Tensor<scalar>.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...

Definition at line 49 of file exprValue.H.

Referenced by exprValue::compare(), exprValue::operator==(), exprValue::readTokens(), and exprValue::write().

◆ declareUnionMember

#define declareUnionMember ( Type,
UnusedParam )
Value:
\ \
Type Type##Value;

Definition at line 86 of file exprValue.H.

◆ defineMultiTypeValueUnionMethods

#define defineMultiTypeValueUnionMethods ( Type,
UnusedParam )
Value:
\ \
template<> \
inline const Type* exprValueUnion::get<Type>() const noexcept \
{ \
return &(Type##Value); \
} \
\ \
template<> \
inline void exprValueUnion::set<Type>(const Type& val) noexcept \
{ \
Type##Value = val; \
}

Definition at line 128 of file exprValue.H.

Referenced by exprValueUnion::get().

◆ defineUnionMethods

#define defineUnionMethods ( Type,
UnusedParam )
Value:
\ \
bool is_##Type() const noexcept \
{ \
return (typeCode_ == exprTypeTraits<Type>::value); \
} \
\ \
void operator=(const Type& val) { this->set<Type>(val); }

Definition at line 357 of file exprValue.H.

Referenced by exprValue::is_bool().