details Namespace Reference
|
CPP API
|
Typedefs | |
| template<class F , class... T> | |
| using | ApplyResultT = FlattenIOResultT< std::invoke_result_t< F, T... > > |
| template<class OmittedTag , template< class... > class IndexTemplate, class Index > | |
| using | filtered_index_t = decltype(as_index< IndexTemplate >(std::declval< filtered_tuple_t< OmittedTag, decltype(as_tuple(std::declval< Index >()))> >())) |
| template<class OmittedTag , class Tuple > | |
| using | filtered_tuple_t = decltype(filter_tuple< OmittedTag >(std::declval< Tuple >())) |
| template<class T > | |
| using | FlattenIOResultT = typename FlattenIOResult< T >::Type |
Functions | |
| template<class IOObject , class Member > | |
| void | add_named_ref (IOObject &obj, const NamedRef< Member > named_ref) |
| Add a name-value pair to an io object. More... | |
| template<template< class... > class T, class... Args> | |
| T< Args... > | as_index (std::tuple< Args... >) |
| template<template< class... > class T, class... Args> | |
| std::tuple< Args... > | as_tuple (T< Args... >) |
| template<class IOContext , class DefaultSerializable , class... Members> | |
| IOResult< DefaultSerializable > | default_deserialize_impl (IOContext &io, DefaultSerializable &a, const char *name, NamedRef< Members >... named_refs) |
| Read an io object and its members from the io context using the given names and assign the values to a. More... | |
| template<class IOContext , class... Members> | |
| void | default_serialize_impl (IOContext &io, const char *name, const NamedRef< Members >... named_refs) |
| Unpack all name-value pairs from the tuple and add them to a new io object with the given name. More... | |
| template<class IOObj , class Tup , class... Ts> | |
| IOResult< Tup > | deserialize_tuple_element (IOObj &obj, Tag< Tup > tag, const IOResult< Ts > &... rs) |
| template<class F , class... T> | |
| ApplyResultT< F, T... > | eval (F f, const IOResult< T > &... rs) |
| Evaluates a function f using values of the given IOResults as arguments, assumes all IOResults are succesful. More... | |
| template<class IOObject , class Member > | |
| IOResult< Member > | expect_named_ref (IOObject &obj, const NamedRef< Member > named_ref) |
| Retrieve a name-value pair from an io object. More... | |
| template<class... CategoryTags, class... Subset> | |
| Index< CategoryTags... > | extend_index_impl (const Index< Subset... > &i, const size_t fill_value, mio::Tag< Index< CategoryTags... >>) |
| Creates and returns a SuperIndex from SubIndex, using entries from the given SubIndex or fill_value. More... | |
| template<class OmittedTag , class... Tags> | |
| decltype(std::tuple_cat(std::declval< std::conditional_t< std::is_same_v< OmittedTag, Tags >, std::tuple<>, std::tuple< Tags >>>()...)) | filter_tuple (std::tuple< Tags... >) |
| template<size_t I, typename Index > | |
| std::pair< size_t, size_t > | flatten_index (Index const &indices, Index const &dimensions) |
| template<class... Tail, class Params , class F > | |
| std::enable_if_t< sizeof...(Tail)==0, void > | foreach_impl (Params &&, F) |
| template<class Head , class... Tail, class Params , class F > | |
| void | foreach_impl (Params &&p, F f) |
| template<class Params , size_t Head, size_t... Tail, class F > | |
| void | foreach_tag_impl (F f, std::index_sequence< Head, Tail... >) |
| template<class Params , size_t... Tail, class F > | |
| std::enable_if_t< sizeof...(Tail)==0, void > | foreach_tag_impl (F, std::index_sequence< Tail... >) |
| spdlog::level::level_enum | get_spdlog_level (LogLevel level) |
| template<class... Tags> | |
| std::tuple< Index< Tags >... > | get_tuple (const Index< Tags... > &i) |
| Obtain a tuple of single-category indices from a Index or MultiIndex. More... | |
| template<class Enum > | |
| std::tuple< Index< Enum > > | get_tuple (Enum i) requires std |
| Obtain a tuple of one single-category index from an enum value. More... | |
| template<class... T> | |
| void | is_multi_index_impl (Index< T... >) |
| Function definition that accepts a MultiIndex, used for the definition of IsMultiIndex. More... | |
| template<size_t Idx> | |
| std::string | make_tuple_element_name () |
| Eigen::Index | next_pow2 (Eigen::Index i) |
| round an integer to the nearest greater power of 2 More... | |
| void | path_join_rec (std::stringstream &, bool) |
| breaks the recursion of path_join_rec. More... | |
| template<class Head , class... Tail> | |
| void | path_join_rec (std::stringstream &ss, bool writeSeparator, Head &&head, Tail &&... tail) |
| recursive template helper function to join paths More... | |
| template<class... CategoryTags, class SuperIndex > | |
| Index< CategoryTags... > | reduce_index_impl (const SuperIndex &i, mio::Tag< Index< CategoryTags... >>) |
| Extracts CategoryTags from the tagged Index and returns a subindex of SuperIndex with the given categories. More... | |
| template<size_t Idx, class IOObj , class Tup > | |
| void | serialize_tuple_element (IOObj &obj, const Tup &tup) |
| size_t | string_length (const char *str) |
| length of a null terminated C string More... | |
| template<class String > | |
| size_t | string_length (String &&str) |
| length of a string (e.g std::string) More... | |
| template<class... T> | |
| Index< T... > | tuple_to_index (std::tuple< Index< T >... >) |
| Function declaration that allows type conversion from a tuple of single-category indices to MultiIndex. More... | |
| template<std::size_t Size, class Type > | |
| constexpr std::size_t | index_of_impl () |
| Recursively searches the list (Head, Tail...) for Type. More... | |
| template<std::size_t Size, class Type , class Head , class... Tail> | |
| constexpr std::size_t | index_of_impl () |
| Recursively searches the list (Head, Tail...) for Type. More... | |
Variables | |
| template<class M > | |
| concept | IsElementReference |
Typedef Documentation
◆ ApplyResultT
| using mio::details::ApplyResultT = typedef FlattenIOResultT<std::invoke_result_t<F, T...> > |
◆ filtered_index_t
| using mio::details::filtered_index_t = typedef decltype(as_index<IndexTemplate>( std::declval<filtered_tuple_t<OmittedTag, decltype(as_tuple(std::declval<Index>()))> >())) |
◆ filtered_tuple_t
| using mio::details::filtered_tuple_t = typedef decltype(filter_tuple<OmittedTag>(std::declval<Tuple>())) |
◆ FlattenIOResultT
| using mio::details::FlattenIOResultT = typedef typename FlattenIOResult<T>::Type |
Function Documentation
◆ add_named_ref()
| void mio::details::add_named_ref | ( | IOObject & | obj, |
| const NamedRef< Member > | named_ref | ||
| ) |
Add a name-value pair to an io object.
◆ as_index()
| T<Args...> mio::details::as_index | ( | std::tuple< Args... > | ) |
◆ as_tuple()
| std::tuple<Args...> mio::details::as_tuple | ( | T< Args... > | ) |
◆ default_deserialize_impl()
| IOResult<DefaultSerializable> mio::details::default_deserialize_impl | ( | IOContext & | io, |
| DefaultSerializable & | a, | ||
| const char * | name, | ||
| NamedRef< Members >... | named_refs | ||
| ) |
Read an io object and its members from the io context using the given names and assign the values to a.
◆ default_serialize_impl()
| void mio::details::default_serialize_impl | ( | IOContext & | io, |
| const char * | name, | ||
| const NamedRef< Members >... | named_refs | ||
| ) |
Unpack all name-value pairs from the tuple and add them to a new io object with the given name.
◆ deserialize_tuple_element()
| IOResult<Tup> mio::details::deserialize_tuple_element | ( | IOObj & | obj, |
| Tag< Tup > | tag, | ||
| const IOResult< Ts > &... | rs | ||
| ) |
◆ eval()
| ApplyResultT<F, T...> mio::details::eval | ( | F | f, |
| const IOResult< T > &... | rs | ||
| ) |
Evaluates a function f using values of the given IOResults as arguments, assumes all IOResults are succesful.
◆ expect_named_ref()
| IOResult<Member> mio::details::expect_named_ref | ( | IOObject & | obj, |
| const NamedRef< Member > | named_ref | ||
| ) |
Retrieve a name-value pair from an io object.
◆ extend_index_impl()
|
inline |
Creates and returns a SuperIndex from SubIndex, using entries from the given SubIndex or fill_value.
◆ filter_tuple()
| decltype(std::tuple_cat( std::declval<std::conditional_t<std::is_same_v<OmittedTag, Tags>, std::tuple<>, std::tuple<Tags>>>()...)) mio::details::filter_tuple | ( | std::tuple< Tags... > | ) |
◆ flatten_index()
| std::pair<size_t, size_t> mio::details::flatten_index | ( | Index const & | indices, |
| Index const & | dimensions | ||
| ) |
◆ foreach_impl() [1/2]
| std::enable_if_t<sizeof...(Tail) == 0, void> mio::details::foreach_impl | ( | Params && | , |
| F | |||
| ) |
◆ foreach_impl() [2/2]
| void mio::details::foreach_impl | ( | Params && | p, |
| F | f | ||
| ) |
◆ foreach_tag_impl() [1/2]
| void mio::details::foreach_tag_impl | ( | F | f, |
| std::index_sequence< Head, Tail... > | |||
| ) |
◆ foreach_tag_impl() [2/2]
| std::enable_if_t<sizeof...(Tail) == 0, void> mio::details::foreach_tag_impl | ( | F | , |
| std::index_sequence< Tail... > | |||
| ) |
◆ get_spdlog_level()
|
inline |
◆ get_tuple() [1/2]
| std::tuple<Index<Tags>...> mio::details::get_tuple | ( | const Index< Tags... > & | i | ) |
Obtain a tuple of single-category indices from a Index or MultiIndex.
◆ get_tuple() [2/2]
| std::tuple<Index<Enum> > mio::details::get_tuple | ( | Enum | i | ) |
Obtain a tuple of one single-category index from an enum value.
◆ index_of_impl() [1/2]
|
constexpr |
Recursively searches the list (Head, Tail...) for Type.
- Template Parameters
-
Size Total size of the list to search. Type to search. Head,Tail The list to search in. May be empty.
- Returns
- The index of Type in the list (Head, Tail...), or the size of the list if Type is not in it.
◆ index_of_impl() [2/2]
|
constexpr |
Recursively searches the list (Head, Tail...) for Type.
- Template Parameters
-
Size Total size of the list to search. Type to search. Head,Tail The list to search in. May be empty.
- Returns
- The index of Type in the list (Head, Tail...), or the size of the list if Type is not in it.
◆ is_multi_index_impl()
| void mio::details::is_multi_index_impl | ( | Index< T... > | ) |
Function definition that accepts a MultiIndex, used for the definition of IsMultiIndex.
◆ make_tuple_element_name()
| std::string mio::details::make_tuple_element_name | ( | ) |
◆ next_pow2()
|
inline |
round an integer to the nearest greater power of 2
round integer up to the next higher power of 2
◆ path_join_rec() [1/2]
|
inline |
breaks the recursion of path_join_rec.
◆ path_join_rec() [2/2]
| void mio::details::path_join_rec | ( | std::stringstream & | ss, |
| bool | writeSeparator, | ||
| Head && | head, | ||
| Tail &&... | tail | ||
| ) |
recursive template helper function to join paths
- Parameters
-
ss stream that collects the result writeSeparator add separator before adding the next part of the path head next part of the path to add tail remaining parts of the path
◆ reduce_index_impl()
|
inline |
Extracts CategoryTags from the tagged Index and returns a subindex of SuperIndex with the given categories.
◆ serialize_tuple_element()
| void mio::details::serialize_tuple_element | ( | IOObj & | obj, |
| const Tup & | tup | ||
| ) |
◆ string_length() [1/2]
|
inline |
length of a null terminated C string
◆ string_length() [2/2]
| size_t mio::details::string_length | ( | String && | str | ) |
length of a string (e.g std::string)
◆ tuple_to_index()
Function declaration that allows type conversion from a tuple of single-category indices to MultiIndex.
Used together with concatenate_indices_impl, this allows combining categories of multiple args into a single MultiIndex.
Variable Documentation
◆ IsElementReference
| concept mio::details::IsElementReference |
Generated by