|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
A runtime_aggregate: A bag of runtime tagged variants or, In other words, an unordered map of variants indexed by tag string. More...
#include <aggregate.hpp>
Public Types | |
| using | variant_t = VariantType |
Public Member Functions | |
Constructors | |
| runtime_aggregate ()=default | |
| Default constructor. | |
| runtime_aggregate (const runtime_aggregate &)=default | |
| Default copy/move/assign constructors. | |
| runtime_aggregate (runtime_aggregate &&)=default | |
| runtime_aggregate & | operator= (const runtime_aggregate &)=default |
| runtime_aggregate & | operator= (runtime_aggregate &&)=default |
| runtime_aggregate< VariantType > & | append (const std::string &tag, variant_t new_component) |
| Add a value (fluent interface): | |
| const variant_t & | get (const std::string &tag) const |
| Fetch the value corresponding to the given Tag. | |
| variant_t & | get (const std::string &tag) |
| bool | has (const std::string &tag) const |
| Check if we have a value with the given Tag. | |
| size_t | size () const |
| Get the number of components in this runtime_aggregate. | |
Public Attributes | |
Private members (no touch) | |
| std::map< std::string, variant_t > | component_map_ |
Construct an runtime_aggregate via a fluent interface:
| using mundy::runtime_aggregate< VariantType >::variant_t = VariantType |
|
default |
|
default |
|
default |
|
default |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::map<std::string, variant_t> mundy::runtime_aggregate< VariantType >::component_map_ |