entity: make deletion_policy publicly available via fwd.hpp

This commit is contained in:
Michele Caini
2023-01-10 14:41:13 +01:00
parent 59f807fd02
commit c68cb33751
3 changed files with 10 additions and 8 deletions

1
TODO
View File

@@ -15,6 +15,7 @@ TODO (high prio):
* check natvis files (periodically :)
* remove the static storage from the const assure in the registry
* use sparse set iterator ::data to optimize range functionalities in the mixins and the registry (exploit the zero-check model)
* can pass is_packed to clear_all to further optimize it in the derived classes
WIP:
* get rid of observers, storage based views made them pointless - document alternatives

View File

@@ -1,6 +1,7 @@
#ifndef ENTT_ENTITY_FWD_HPP
#define ENTT_ENTITY_FWD_HPP
#include <cstdint>
#include <memory>
#include <type_traits>
#include "../core/fwd.hpp"
@@ -11,6 +12,14 @@ namespace entt {
/*! @brief Default entity identifier. */
enum class entity : id_type {};
/*! @brief Storage deletion policy. */
enum class deletion_policy : std::uint8_t {
/*! @brief Swap-and-pop deletion policy. */
swap_and_pop = 0u,
/*! @brief In-place deletion policy. */
in_place = 1u
};
template<typename Entity = entity, typename = std::allocator<Entity>>
class basic_sparse_set;

View File

@@ -143,14 +143,6 @@ template<typename Container>
* @endcond
*/
/*! @brief Sparse set deletion policy. */
enum class deletion_policy : std::uint8_t {
/*! @brief Swap-and-pop deletion policy. */
swap_and_pop = 0u,
/*! @brief In-place deletion policy. */
in_place = 1u
};
/**
* @brief Basic sparse set implementation.
*