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

 Foam
 Namespace for OpenFOAM.
 
 Foam::expressions
 A namespace for expression-related classes/traits etc.
 
 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

Istream & operator>> (Istream &is, expressions::exprValue &val)
 Read/parse value from input stream (uses ASCII format). More...
 
Ostream & operator<< (Ostream &os, const expressions::exprValue &val)
 Write value to output stream (uses ASCII format). Writes 'none' or 'bad' for unknown/unsupported types. More...
 
template<>
Ostream & operator<< (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< scalar > tensor
Definition: symmTensor.H:57
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Definition: symmTensor.H:55
Vector< scalar > vector
Definition: vector.H:57
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.

Definition at line 51 of file exprValue.H.

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

◆ declareUnionMember

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

Definition at line 88 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; \
}
const direction noexcept
Definition: Scalar.H:258

Definition at line 135 of file exprValue.H.

◆ 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); }
const direction noexcept
Definition: Scalar.H:258

Definition at line 366 of file exprValue.H.