SPH
|
Conversions for quantity enums. More...
Go to the source code of this file.
Classes | |
struct | GetValueEnum< Float > |
struct | GetValueEnum< Vector > |
struct | GetValueEnum< Tensor > |
struct | GetValueEnum< SymmetricTensor > |
struct | GetValueEnum< TracelessTensor > |
struct | GetValueEnum< Size > |
struct | GetTypeFromEnum< ValueEnum::SCALAR > |
struct | GetTypeFromEnum< ValueEnum::VECTOR > |
struct | GetTypeFromEnum< ValueEnum::TENSOR > |
struct | GetTypeFromEnum< ValueEnum::SYMMETRIC_TENSOR > |
struct | GetTypeFromEnum< ValueEnum::TRACELESS_TENSOR > |
struct | GetTypeFromEnum< ValueEnum::INDEX > |
Enumerations | |
enum class | ValueEnum { SCALAR , VECTOR , TENSOR , SYMMETRIC_TENSOR , TRACELESS_TENSOR , INDEX } |
Functions | |
template<typename TVisitor , typename... TArgs> | |
decltype(auto) | dispatch (const ValueEnum value, TVisitor &&visitor, TArgs &&... args) |
Selects type based on run-time ValueEnum value and runs visit<Type>() method of the visitor. More... | |
|
strong |
Enumerator | |
---|---|
SCALAR | |
VECTOR | |
TENSOR | |
SYMMETRIC_TENSOR | |
TRACELESS_TENSOR | |
INDEX |
Definition at line 13 of file QuantityHelpers.h.
decltype(auto) dispatch | ( | const ValueEnum | value, |
TVisitor && | visitor, | ||
TArgs &&... | args | ||
) |
Selects type based on run-time ValueEnum value and runs visit<Type>() method of the visitor.
This provides a way to run generic code with different types. Return whatever TVisitor::visit returns.
Definition at line 76 of file QuantityHelpers.h.