From 1d85414dc21537a388dd586e6beadbfebebfb3a8 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 10 Mar 2023 12:23:07 +0100 Subject: [PATCH] doc: drop refs to registry::version (close #992) --- docs/md/entity.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/md/entity.md b/docs/md/entity.md index d43d054e3..caccf4225 100644 --- a/docs/md/entity.md +++ b/docs/md/entity.md @@ -203,19 +203,24 @@ and it's possible to force a _version_. In both cases, when an identifier is released, the registry can freely reuse it internally. In particular, the version of an entity is increased (unless the overload that forces a version is used instead of the default one).
-Users can then _inspect_ the identifiers by means of a registry: +Users can then _test_ identifiers by means of a registry: ```cpp // returns true if the entity is still valid, false otherwise bool b = registry.valid(entity); -// gets the version contained in the entity identifier -auto version = registry.version(entity); - // gets the actual version for the given entity auto curr = registry.current(entity); ``` +Or _inspect_ them using some functions meant for parsing an identifier as-is, +such as: + +```cpp +// gets the version contained in the entity identifier +auto version = entt::to_version(entity); +``` + Components are assigned to or removed from entities at any time.
The `emplace` member function template creates, initializes and assigns to an entity the given component. It accepts a variable number of arguments to use to