The data content (as a union). More...
Public Member Functions | |
template<class Type > | |
const Type * | get () const noexcept |
Return read pointer to typed union member, which is nullptr for unspecialized versions. More... | |
template<class Type > | |
void | set (const Type &val) noexcept |
No generic set(), only specialized methods. More... | |
template<> | |
const scalar * | get () const noexcept |
template<> | |
void | set (const scalar &val) noexcept |
template<> | |
const vector * | get () const noexcept |
template<> | |
void | set (const vector &val) noexcept |
template<> | |
const tensor * | get () const noexcept |
template<> | |
void | set (const tensor &val) noexcept |
template<> | |
const symmTensor * | get () const noexcept |
template<> | |
void | set (const symmTensor &val) noexcept |
template<> | |
const sphericalTensor * | get () const noexcept |
template<> | |
void | set (const sphericalTensor &val) noexcept |
template<> | |
const label * | get () const noexcept |
template<> | |
void | set (const label &val) noexcept |
template<> | |
const bool * | get () const noexcept |
template<> | |
void | set (const bool &val) noexcept |
Static Public Member Functions | |
static void | notSpecialized (const std::string &msg) noexcept |
Runtime 'assert' for unimplemented generic methods. More... | |
Public Attributes | |
scalar | scalarValue |
vector | vectorValue |
tensor | tensorValue |
symmTensor | symmTensorValue |
sphericalTensor | sphericalTensorValue |
label | labelValue |
bool | boolValue |
The data content (as a union).
The stem of the member names correspond identically to the data types to enable macro definitions (naming similar to Foam::token)
Definition at line 83 of file exprValue.H.
|
inlinestaticnoexcept |
Runtime 'assert' for unimplemented generic methods.
This seems to be the best way to catch programming errors since static_assert does not help here. The 'noexcept' is slightly misleading (needed for the caller)
Definition at line 106 of file exprValue.H.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.
Referenced by exprValueUnion::set().
|
inlinenoexcept |
Return read pointer to typed union member, which is nullptr for unspecialized versions.
Definition at line 118 of file exprValue.H.
|
inlinenoexcept |
No generic set(), only specialized methods.
Definition at line 124 of file exprValue.H.
References Foam::name(), and exprValueUnion::notSpecialized().
|
inlinenoexcept |
Return read pointer to scalar union member
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Set scalar value
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Return read pointer to vector union member
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Set vector value
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Return read pointer to tensor union member
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Set tensor value
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Return read pointer to symmTensor union member
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Set symmTensor value
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Return read pointer to sphericalTensor union member
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Set sphericalTensor value
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Return read pointer to label union member
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Set label value
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Return read pointer to bool union member
Definition at line 152 of file exprValue.H.
|
inlinenoexcept |
Set bool value
Definition at line 152 of file exprValue.H.
scalar scalarValue |
Define scalar data member
Definition at line 93 of file exprValue.H.
vector vectorValue |
Define vector data member
Definition at line 93 of file exprValue.H.
tensor tensorValue |
Define tensor data member
Definition at line 93 of file exprValue.H.
symmTensor symmTensorValue |
Define symmTensor data member
Definition at line 93 of file exprValue.H.
sphericalTensor sphericalTensorValue |
Define sphericalTensor data member
Definition at line 93 of file exprValue.H.
label labelValue |
Define label data member
Definition at line 93 of file exprValue.H.
bool boolValue |
Define bool data member
Definition at line 93 of file exprValue.H.