Nebula
Loading...
Searching...
No Matches
tupleutility.h File Reference
#include <tuple>

Go to the source code of this file.

Classes

struct  Util::get_template_type< C< T > >
 Get inner type of two types. More...
 
struct  Util::get_template_type< C< T, I > >
 Get inner type of two types. More...
 
struct  Util::get_template_type< C< I, T > >
 Get inner type of two types. More...
 
struct  Util::get_template_type< const C< T > & >
 Get inner type of a constant ref outer type. More...
 
struct  Util::get_template_type< C< I, T > & >
 Get inner type of two types. More...
 
struct  Util::get_template_type< C< T, I > & >
 Get inner type of two types. More...
 

Namespaces

namespace  Util
 A pinned array is an array which manages its own virtual memory.
 

Typedefs

template<typename... T>
using Util::Tuple = std::tuple<T...>
 Wrap std::tuple.
 
template<typename A , typename B >
using Util::Pair = std::pair<A, B>
 Wrap std::pair.
 
template<typename C >
using Util::get_template_type_t = typename get_template_type<C>::type
 Helper typedef so that the above expression can be used like decltype.
 
template<int MEMBER, class ... TYPES>
using Util::tuple_array_t = get_template_type_t<std::tuple_element_t<MEMBER, std::tuple<Util::Array<TYPES>...>>>
 Get type of contained element in Util::Array stored in std::tuple.
 

Functions

template<typename... T>
constexpr Tuple< T... > Util::MakeTuple (const T &... args)
 
template<int INDEX, typename... T>
constexpr const std::tuple_element_t< INDEX, std::tuple< T... > > & Util::Get (const Tuple< T... > &tuple)
 
template<typename A , typename B >
constexpr Pair< A, B > Util::MakePair (const A &a, const B &b)
 
template<int INDEX, typename A , typename B >
constexpr const std::tuple_element_t< INDEX, std::tuple< A, B > > & Util::Get (const Pair< A, B > &pair)
 
template<class... Ts, std::size_t... Is>
void Util::alloc_for_each_in_tuple (std::tuple< Ts... > &tuple, std::index_sequence< Is... >)
 Unpacks allocations for each member in a tuble.
 
template<class... Ts>
void Util::alloc_for_each_in_tuple (std::tuple< Ts... > &tuple)
 Entry point for above expansion function.
 
template<class... Ts, std::size_t... Is>
void Util::clear_for_each_in_tuple (std::tuple< Ts... > &tuple, std::index_sequence< Is... >)
 Unpacks allocations for each member in a tuple.
 
template<class... Ts>
void Util::clear_for_each_in_tuple (std::tuple< Ts... > &tuple)
 Entry point for above expansion function.
 
template<class... Ts, std::size_t... Is>
void Util::move_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t to, uint32_t from, std::index_sequence< Is... >)
 Entry point for moving an element between two indices.
 
template<class... Ts>
void Util::move_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t to, uint32_t from)
 Entry point for moving an element between two indices.
 
template<class... Ts, std::size_t... Is>
void Util::erase_index_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >)
 Entry point for erasing an element.
 
template<class... Ts>
void Util::erase_index_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t i)
 Entry point for erasing an element.
 
template<class... Ts, std::size_t... Is>
void Util::erase_index_swap_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >)
 Entry point for erasing an element by swapping with the last and reducing size.
 
template<class... Ts>
void Util::erase_index_swap_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t i)
 Entry point for erasing an element by swapping with the last and reducing size.
 
template<class... Ts, std::size_t... Is>
void Util::erase_range_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t start, uint32_t end, std::index_sequence< Is... >)
 
template<class... Ts>
void Util::erase_range_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t start, uint32_t end)
 Entry point for erasing a range of elements the last and reducing size.
 
template<class... Ts, std::size_t... Is, class... TYPES>
void Util::set_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t i, std::index_sequence< Is... >, TYPES const &... values)
 Entry point for setting values in each array at an index.
 
template<class... Ts, class... TYPES>
void Util::set_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t i, TYPES const &... values)
 Entry point for setting values in each array at an index.
 
template<class... Ts, std::size_t... Is>
void Util::reserve_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t size, std::index_sequence< Is... >)
 Entry point for reserving in each array.
 
template<class... Ts>
void Util::reserve_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t size)
 Entry point for reserving in each array.
 
template<class... Ts, std::size_t... Is>
void Util::set_size_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t size, std::index_sequence< Is... >)
 Entry point for reserving in each array.
 
template<class... Ts>
void Util::set_size_for_each_in_tuple (std::tuple< Ts... > &tuple, uint32_t size)
 Entry point for reserving in each array.