Loading...
Searching...
No Matches
exprValue.C File Reference
Include dependency graph for exprValue.C:

Go to the source code of this file.

Namespaces

namespace  Foam
 Namespace for OpenFOAM.

Macros

#define doLocalCode(Type, UnusedParam)
#define doLocalCode(Type, UnusedParam)
#define doLocalCode(Type, UnusedParam)
#define doLocalCode(Type, UnusedParam)

Functions

template<class Type>
static void putType (Ostream &os, const Type &val)
template<>
void putType< bool > (Ostream &os, const bool &val)
 Specialized for bool. Write as (true/false) via Switch to avoid bool/label ambiguity.
template<>
void putType< scalar > (Ostream &os, const scalar &val)
 Specialized for scalar. Write with '.' to avoid scalar/label ambiguity.

Detailed Description

Original source file exprValue.C

Definition in file exprValue.C.

Macro Definition Documentation

◆ doLocalCode [1/4]

#define doLocalCode ( Type,
UnusedParam )
Value:
\
case expressions::valueTypeCode::type_##Type : \
{ \
const Type* dataPtr = data_.get<Type>(); \
if (dataPtr) \
{ \
putType(os, *dataPtr); \
} \
break; \
}
OBJstream os(runTime.globalPath()/outputName)

◆ doLocalCode [2/4]

#define doLocalCode ( Type,
UnusedParam )
Value:
\
case expressions::valueTypeCode::type_##Type : \
{ \
data_.set<Type>(pTraits<Type>(is)); \
typeCode_ = whichCode; \
return true; \
}

◆ doLocalCode [3/4]

#define doLocalCode ( Type,
UnusedParam )
Value:
\
case expressions::valueTypeCode::type_##Type : \
{ \
const Type* a = data_.get<Type>(); \
const Type* b = rhs.data_.get<Type>(); \
return \
( \
(a && b) \
? ((*a < *b) ? -1 : (*b < *a) ? 1 : 0) \
: 0 \
); \
break; \
}
volScalarField & b

◆ doLocalCode [4/4]

#define doLocalCode ( Type,
UnusedParam )
Value:
\
case expressions::valueTypeCode::type_##Type : \
{ \
const Type* a = data_.get<Type>(); \
const Type* b = rhs.data_.get<Type>(); \
return (a && b && (*a == *b)); \
break; \
}