1
0
Эх сурвалжийг харах

doc: minor changes, updated todo list

Michele Caini 4 жил өмнө
parent
commit
764404a472

+ 1 - 9
TODO

@@ -2,31 +2,24 @@
 * debugging tools (#60): the issue online already contains interesting tips on this, look at it
 * work stealing job system (see #100) + mt scheduler based on const awareness for types
 * add examples (and credits) from @alanjfs :)
-* custom pools example (multi instance, tables, enable/disable, and so on...)
 
 WIP:
-* make storage adhere to AllocatorAwareContainer requirements
 * fast-contains for sparse sets (low prio but nice-to-have)
-* runtime components (registry), runtime events (dispatcher/emitter), ...
+* runtime components (registry), runtime events (dispatcher/emitter), runtime context variables ...
 * runtime_view/registry, remove reference to basic_sparse_set<E>
 * make pools available (registry/view/group), review operator| for views, make views accept registry to ctor
 * make view.lead() or similar available to return leading pool (useful for mt)
 * dedicated entity storage, in-place O(1) release/destroy for non-orphaned entities, out-of-sync model
-* non-throwing sparse set emplace (see previous line)
 * custom allocators all over
 
 WIP:
 * customizable any_vtable, sfinae-friendly definition and op::custom for user-def
-* remove Entity from views and groups
 * registry: fake vtable (mixin injected) to get rid of poly storage, use pointer to sparse set only for pools, discard pool_data type.
 * general purpose paged vector container
-* make it possible to register externally managed pools with the registry (allow for system centric mode)
 * resource, forward the id to the loader from the cache and if constexpr the call to load, update doc and describe customization points
 * make it possible to create views of the type `view<T, T>`, add get by index and such, allow to register custom pools by name with the registry
 * add user data to type_info
-* any_vector for context variables
 * make const registry::view thread safe, switch to a view<T...>{registry} model (long term goal)
-* weak reference wrapper example with custom storage
 * headless (sparse set only) view
 * write documentation for custom storages and views!!
 * make runtime views use opaque storage and therefore return also elements.
@@ -34,4 +27,3 @@ WIP:
 * entity-aware observer, add observer functions aside observer class
 * deprecate non-owning groups in favor of owning views and view packs, introduce lazy owning views
 * snapshot: support for range-based archives
-* add example: 64 bit ids with 32 bits reserved for users' purposes

+ 12 - 12
src/entt/entity/sparse_set.hpp

@@ -246,14 +246,14 @@ protected:
     /*! @brief Exchanges the contents with those of a given sparse set. */
     virtual void swap_contents(basic_sparse_set &) {}
 
-    /*! @brief Swaps two entities in the internal packed array. */
+    /*! @brief Swaps two entities in a sparse set. */
     virtual void swap_at(const std::size_t, const std::size_t) {}
 
-    /*! @brief Moves an entity in the internal packed array. */
+    /*! @brief Moves an entity in a sparse set. */
     virtual void move_and_pop(const std::size_t, const std::size_t) {}
 
     /**
-     * @brief Attempts to erase an entity from the internal packed array.
+     * @brief Erase an entity from a sparse set.
      * @param entt A valid identifier.
      */
     virtual void swap_and_pop(const Entity entt, void *) {
@@ -272,7 +272,7 @@ protected:
     }
 
     /**
-     * @brief Attempts to erase an entity from the internal packed array.
+     * @brief Erase an entity from a sparse set.
      * @param entt A valid identifier.
      */
     virtual void in_place_pop(const Entity entt, void *) {
@@ -506,7 +506,7 @@ public:
      * array. If the sparse set is empty, the returned iterator will be equal to
      * `end()`.
      *
-     * @return An iterator to the first entity of the internal packed array.
+     * @return An iterator to the first entity of the sparse set.
      */
     [[nodiscard]] iterator begin() const ENTT_NOEXCEPT {
         return iterator{std::addressof(packed_array), static_cast<typename entity_traits::difference_type>(count)};
@@ -516,11 +516,11 @@ public:
      * @brief Returns an iterator to the end.
      *
      * The returned iterator points to the element following the last entity in
-     * the internal packed array. Attempting to dereference the returned
-     * iterator results in undefined behavior.
+     * a sparse set. Attempting to dereference the returned iterator results in
+     * undefined behavior.
      *
-     * @return An iterator to the element following the last entity of the
-     * internal packed array.
+     * @return An iterator to the element following the last entity of a sparse
+     * set.
      */
     [[nodiscard]] iterator end() const ENTT_NOEXCEPT {
         return iterator{std::addressof(packed_array), {}};
@@ -544,11 +544,11 @@ public:
      * @brief Returns a reverse iterator to the end.
      *
      * The returned iterator points to the element following the last entity in
-     * the reversed internal packed array. Attempting to dereference the
-     * returned iterator results in undefined behavior.
+     * the reversed sparse set. Attempting to dereference the returned iterator
+     * results in undefined behavior.
      *
      * @return An iterator to the element following the last entity of the
-     * reversed internal packed array.
+     * reversed sparse set.
      */
     [[nodiscard]] reverse_iterator rend() const ENTT_NOEXCEPT {
         return std::make_reverse_iterator(begin());

+ 8 - 8
src/entt/entity/storage.hpp

@@ -284,18 +284,18 @@ protected:
     }
 
     /**
-     * @brief Swaps two elements in the internal packed array.
-     * @param lhs A valid position of an element within storage.
-     * @param rhs A valid position of an element within storage.
+     * @brief Swaps two elements in a storage.
+     * @param lhs A valid position of an element within a storage.
+     * @param rhs A valid position of an element within a storage.
      */
     void swap_at(const std::size_t lhs, const std::size_t rhs) final {
         std::swap(packed[page(lhs)][offset(lhs)], packed[page(rhs)][offset(rhs)]);
     }
 
     /**
-     * @brief Moves an element in the internal packed array.
-     * @param from A valid position of an element within storage.
-     * @param to A valid position of an element within storage.
+     * @brief Moves an element within a storage.
+     * @param from A valid position of an element within a storage.
+     * @param to A valid position of an element within a storage.
      */
     void move_and_pop(const std::size_t from, const std::size_t to) final {
         auto &&elem = packed[page(from)][offset(from)];
@@ -304,7 +304,7 @@ protected:
     }
 
     /**
-     * @brief Attempts to erase an element from the internal packed array.
+     * @brief Erase an element from a storage.
      * @param entt A valid identifier.
      * @param ud Optional user data that are forwarded as-is to derived classes.
      */
@@ -324,7 +324,7 @@ protected:
     }
 
     /**
-     * @brief Erases an element from the internal packed array.
+     * @brief Erases an element from a storage.
      * @param entt A valid identifier.
      * @param ud Optional user data that are forwarded as-is to derived classes.
      */