🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.0 KiB

  1. #ifndef ENTT_ENTITY_FWD_HPP
  2. #define ENTT_ENTITY_FWD_HPP
  3. #include <memory>
  4. #include "../core/fwd.hpp"
  5. #include "utility.hpp"
  6. namespace entt {
  7. template<typename Entity, typename = std::allocator<Entity>>
  8. class basic_sparse_set;
  9. template<typename, typename Type, typename = std::allocator<Type>, typename = void>
  10. class basic_storage;
  11. template<typename>
  12. class basic_registry;
  13. template<typename, typename, typename, typename = void>
  14. class basic_view;
  15. template<typename>
  16. struct basic_runtime_view;
  17. template<typename, typename, typename, typename>
  18. class basic_group;
  19. template<typename>
  20. class basic_observer;
  21. template<typename>
  22. class basic_organizer;
  23. template<typename, typename...>
  24. struct basic_handle;
  25. template<typename>
  26. class basic_snapshot;
  27. template<typename>
  28. class basic_snapshot_loader;
  29. template<typename>
  30. class basic_continuous_loader;
  31. /*! @brief Default entity identifier. */
  32. enum class entity : id_type {};
  33. /*! @brief Alias declaration for the most common use case. */
  34. using sparse_set = basic_sparse_set<entity>;
  35. /**
  36. * @brief Alias declaration for the most common use case.
  37. * @tparam Args Other template parameters.
  38. */
  39. template<typename... Args>
  40. using storage = basic_storage<entity, Args...>;
  41. /*! @brief Alias declaration for the most common use case. */
  42. using registry = basic_registry<entity>;
  43. /*! @brief Alias declaration for the most common use case. */
  44. using observer = basic_observer<entity>;
  45. /*! @brief Alias declaration for the most common use case. */
  46. using organizer = basic_organizer<entity>;
  47. /*! @brief Alias declaration for the most common use case. */
  48. using handle = basic_handle<entity>;
  49. /*! @brief Alias declaration for the most common use case. */
  50. using const_handle = basic_handle<const entity>;
  51. /**
  52. * @brief Alias declaration for the most common use case.
  53. * @tparam Args Other template parameters.
  54. */
  55. template<typename... Args>
  56. using handle_view = basic_handle<entity, Args...>;
  57. /**
  58. * @brief Alias declaration for the most common use case.
  59. * @tparam Args Other template parameters.
  60. */
  61. template<typename... Args>
  62. using const_handle_view = basic_handle<const entity, Args...>;
  63. /*! @brief Alias declaration for the most common use case. */
  64. using snapshot = basic_snapshot<entity>;
  65. /*! @brief Alias declaration for the most common use case. */
  66. using snapshot_loader = basic_snapshot_loader<entity>;
  67. /*! @brief Alias declaration for the most common use case. */
  68. using continuous_loader = basic_continuous_loader<entity>;
  69. /**
  70. * @brief Alias declaration for the most common use case.
  71. * @tparam Get Types of components iterated by the view.
  72. * @tparam Exclude Types of components used to filter the view.
  73. */
  74. template<typename Get, typename Exclude = exclude_t<>>
  75. using view = basic_view<entity, Get, Exclude>;
  76. /*! @brief Alias declaration for the most common use case. */
  77. using runtime_view = basic_runtime_view<sparse_set>;
  78. /**
  79. * @brief Alias declaration for the most common use case.
  80. * @tparam Args Other template parameters.
  81. */
  82. template<typename... Args>
  83. using group = basic_group<entity, Args...>;
  84. } // namespace entt
  85. #endif