|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
A variant_aggregate: A bag of compile-time tagged variants. In other words, a compile-time map of variants indexed by tag type. More...
#include <aggregate.hpp>
Public Types | |
| using | variant_t = VariantType |
| using | TagsTuple = tuple<Tags...> |
Static Public Attributes | |
| static constexpr size_t | N = sizeof...(Tags) |
Constructors | |
| template<size_t I> | |
| using | tag_type = tuple_element_t<I, TagsTuple> |
| The I'th tag type. | |
| constexpr | variant_aggregate ()=default |
| Default constructor. | |
| constexpr | variant_aggregate (Kokkos::Array< variant_t, N > variants) |
| Construct a variant_aggregate that has the given tagged variants. | |
| constexpr | variant_aggregate (const variant_aggregate &)=default |
| Default copy/move/assign constructors. | |
| constexpr | variant_aggregate (variant_aggregate &&)=default |
| constexpr variant_aggregate & | operator= (const variant_aggregate &)=default |
| constexpr variant_aggregate & | operator= (variant_aggregate &&)=default |
| template<typename Tag> | |
| constexpr auto | append (variant_t new_variant) const |
| Add a value (fluent interface): | |
| template<size_t I> | |
| constexpr const variant_t & | get () const |
| Fetch the I'th value (compile-time index). | |
| template<size_t I> | |
| constexpr variant_t & | get () |
| constexpr const variant_t & | get (size_t I) const |
| Fetch the I'th value (runtime index). | |
| constexpr variant_t & | get (size_t I) |
| template<typename Tag> | |
| constexpr const variant_t & | get () const |
| Fetch the value corresponding to the given Tag. | |
| template<typename Tag> | |
| constexpr variant_t & | get () |
| Fetch the value corresponding to the given Tag. | |
| template<typename Tag> | |
| static constexpr bool | has () |
| Check if we have a value with the given Tag. | |
| static constexpr size_t | size () |
| Get the number of components in this variant_aggregate. | |
Construct a variant_aggregate via a fluent interface:
Each Tag type must be unique within a variant_aggregate.
| using mundy::variant_aggregate< VariantType, Tags >::variant_t = VariantType |
| using mundy::variant_aggregate< VariantType, Tags >::TagsTuple = tuple<Tags...> |
| using mundy::variant_aggregate< VariantType, Tags >::tag_type = tuple_element_t<I, TagsTuple> |
|
constexprdefault |
|
inlineconstexpr |
|
constexprdefault |
|
constexprdefault |
|
constexprdefault |
|
constexprdefault |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
staticconstexpr |