sandbox
Loading...
Searching...
No Matches
sbx::ecs::basic_registry< Entity, Allocator > Class Template Reference

Public Types

using allocator_type = Allocator
 
using entity_type = entity_traits::value_type
 
using version_type = entity_traits::version_type
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using common_type = base_type
 
using iterable = memory::iterable_adaptor< detail::registry_storage_iterator< typename pool_container_type::iterator > >
 
using const_iterable = memory::iterable_adaptor< detail::registry_storage_iterator< typename pool_container_type::const_iterator > >
 

Public Member Functions

 basic_registry (const allocator_type &allocator)
 
 basic_registry (const size_type count, const allocator_type &allocator=allocator_type{})
 
 basic_registry (const basic_registry &other)=delete
 
 basic_registry (basic_registry &&other) noexcept
 
auto operator= (const basic_registry &other) -> basic_registry &=delete
 
auto operator= (basic_registry &&other) noexcept -> basic_registry &
 
auto swap (basic_registry &other) noexcept -> void
 
constexpr auto get_allocator () const noexcept -> allocator_type
 
auto is_valid (const entity_type entity) const -> bool
 
auto create () -> entity_type
 
auto destroy (const entity_type entity) -> version_type
 
template<typename Type , typename... Args>
requires (std::is_constructible_v<Type, Args...>)
auto emplace (const entity_type entity, Args &&... args) -> decltype(auto)
 
template<typename Type , typename... Other>
auto remove (const entity_type entity) -> size_type
 
template<typename... Type>
auto all_of (const entity_type entity) const -> bool
 
template<typename... Type>
auto any_of (const entity_type entity) const -> bool
 
template<typename... Type>
auto get (const entity_type entity) const -> decltype(auto)
 
template<typename... Type>
auto get (const entity_type entity) -> decltype(auto)
 
template<typename Type , typename... Args>
requires (std::is_constructible_v<Type, Args...>)
auto get_or_emplace (const entity_type entity, Args &&... args) -> decltype(auto)
 
template<typename... Type>
auto try_get (const entity_type entity) const -> decltype(auto)
 
template<typename... Type>
auto try_get (const entity_type entity) -> decltype(auto)
 
template<typename... Type>
auto clear () -> void
 
template<typename Type , typename... Other, typename... Exclude>
auto view (exclude_t< Exclude... >=exclude_t{}) const -> basic_view< get_t< storage_for_type< const Type >, storage_for_type< const Other >... >, exclude_t< storage_for_type< const Exclude >... > >
 
template<typename Type , typename... Other, typename... Exclude>
auto view (exclude_t< Exclude... >=exclude_t{}) -> basic_view< get_t< storage_for_type< Type >, storage_for_type< Other >... >, exclude_t< storage_for_type< Exclude >... > >
 
template<typename Type , typename Compare , typename Sort = utility::std_sort, typename... Args>
auto sort (Compare compare, Sort sort=Sort{}, Args &&... args) -> void
 
auto storage () noexcept -> iterable
 
auto storage () const noexcept -> const_iterable
 
auto begin () const -> decltype(auto)
 
auto end () const -> decltype(auto)
 
template<typename Callable >
auto invoke (const utility::hashed_string &tag, Callable &&callable) -> void
 

The documentation for this class was generated from the following file: