Michele Caini 3 лет назад
Родитель
Сommit
b8e12dc42a
3 измененных файлов с 26 добавлено и 26 удалено
  1. 1 0
      TODO
  2. 2 2
      docs/md/entity.md
  3. 23 24
      src/entt/entity/group.hpp

+ 1 - 0
TODO

@@ -10,6 +10,7 @@ DOC:
 * custom storage/view
 * examples (and credits) from @alanjfs :)
 * document iterator.hpp (see core.md)
+* update entity doc when the storage based model is in place
 
 WIP:
 * add directed/undirected support to adjacency matrix (see brief)

+ 2 - 2
docs/md/entity.md

@@ -1634,8 +1634,8 @@ useful in this regard.
 Groups are meant to iterate multiple components at once and to offer a faster
 alternative to multi type views.<br/>
 Groups overcome the performance of the other tools available but require to get
-the ownership of components and this sets some constraints on pools. On the
-other side, groups aren't an automatism that increases memory consumption,
+the ownership of components. This sets some constraints on the pools. On the
+other hand, groups aren't an automatism that increases memory consumption,
 affects functionalities and tries to optimize iterations for all the possible
 combinations of components. Users can decide when to pay for groups and to what
 extent.<br/>

+ 23 - 24
src/entt/entity/group.hpp

@@ -105,17 +105,17 @@ class basic_group;
 /**
  * @brief Non-owning group.
  *
- * A non-owning group returns all entities and only the entities that have at
- * least the given components. Moreover, it's guaranteed that the entity list
- * is tightly packed in memory for fast iterations.
+ * A non-owning group returns all entities and only the entities that are at
+ * least in the given storage. Moreover, it's guaranteed that the entity list is
+ * tightly packed in memory for fast iterations.
  *
  * @b Important
  *
  * Iterators aren't invalidated if:
  *
- * * New instances of the given components are created and assigned to entities.
- * * The entity currently pointed is modified (as an example, if one of the
- *   given components is removed from the entity to which the iterator points).
+ * * New elements are added to the storage.
+ * * The entity currently pointed is modified (for example, components are added
+ *   or removed from it).
  * * The entity currently pointed is destroyed.
  *
  * In all other cases, modifying the pools iterated by the group in any way
@@ -417,12 +417,12 @@ public:
      * comparison function should be equivalent to one of the following:
      *
      * @code{.cpp}
-     * bool(std::tuple<Component &...>, std::tuple<Component &...>);
-     * bool(const Component &..., const Component &...);
+     * bool(std::tuple<Type &...>, std::tuple<Type &...>);
+     * bool(const Type &..., const Type &...);
      * bool(const Entity, const Entity);
      * @endcode
      *
-     * Where `Component` are such that they are iterated by the group.<br/>
+     * Where `Type` are such that they are iterated by the group.<br/>
      * Moreover, the comparison function object shall induce a
      * _strict weak ordering_ on the values.
      *
@@ -492,26 +492,25 @@ private:
 /**
  * @brief Owning group.
  *
- * Owning groups return all entities and only the entities that have at least
- * the given components. Moreover:
+ * Owning groups returns all entities and only the entities that are at
+ * least in the given storage. Moreover:
  *
  * * It's guaranteed that the entity list is tightly packed in memory for fast
  *   iterations.
- * * It's guaranteed that the lists of owned components are tightly packed in
- *   memory for even faster iterations and to allow direct access.
- * * They stay true to the order of the owned components and all instances have
- *   the same order in memory.
+ * * It's guaranteed that all components in the owned storage are tightly packed
+ *   in memory for even faster iterations and to allow direct access.
+ * * They stay true to the order of the owned storage and all instances have the
+ *   same order in memory.
  *
- * The more types of components are owned by a group, the faster it is to
- * iterate them.
+ * The more types of storage are owned, the faster it is to iterate a group.
  *
  * @b Important
  *
  * Iterators aren't invalidated if:
  *
- * * New instances of the given components are created and assigned to entities.
- * * The entity currently pointed is modified (as an example, if one of the
- *   given components is removed from the entity to which the iterator points).
+ * * New elements are added to the storage.
+ * * The entity currently pointed is modified (for example, components are added
+ *   or removed from it).
  * * The entity currently pointed is destroyed.
  *
  * In all other cases, modifying the pools iterated by the group in any way
@@ -790,13 +789,13 @@ public:
      * comparison function should be equivalent to one of the following:
      *
      * @code{.cpp}
-     * bool(std::tuple<Component &...>, std::tuple<Component &...>);
-     * bool(const Component &, const Component &);
+     * bool(std::tuple<Type &...>, std::tuple<Type &...>);
+     * bool(const Type &, const Type &);
      * bool(const Entity, const Entity);
      * @endcode
      *
-     * Where `Component` are either owned types or not but still such that they
-     * are iterated by the group.<br/>
+     * Where `Type` are either owned types or not but still such that they are
+     * iterated by the group.<br/>
      * Moreover, the comparison function object shall induce a
      * _strict weak ordering_ on the values.
      *