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

Go to the source code of this file.

Classes

class  Util::NamedSlot< NAME, TYPE >
struct  Util::soa_storage< TYPE >
struct  Util::soa_storage< NamedSlot< NAME, TYPE > >
struct  Util::soa_value_type< TYPE >
struct  Util::soa_value_type< NamedSlot< NAME, TYPE > >
struct  Util::soa_slot_name< TYPE >
struct  Util::soa_slot_name< NamedSlot< NAME, TYPE > >
struct  Util::soa_named_slot_count< NAME >
struct  Util::soa_named_slot_count< NAME, TYPE, TYPES... >
struct  Util::soa_names_unique<>
struct  Util::soa_names_unique< TYPE, TYPES... >
struct  Util::soa_tuple_index< NAME, INDEX, TYPE, TYPES >
struct  Util::soa_tuple_index< NAME, INDEX, TYPE >
struct  Util::get_template_type< NamedSlot< NAME, TYPE > >
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 quad tree designed to return regions of free 2D space.

Typedefs

template<class TYPE>
using Util::soa_storage_t = typename soa_storage<TYPE>::type
template<class TYPE>
using Util::soa_value_type_t = typename soa_value_type<TYPE>::type
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 = soa_value_type_t<std::tuple_element_t<soa_tuple_index_v<MEMBER, TYPES...>, std::tuple<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.

Variables

template<int NAME, class... TYPES>
constexpr int Util::soa_tuple_index_v = soa_tuple_index<NAME, 0, TYPES...>::value