You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
basic_sparse_set<...>::bump returns the version in use
basic_storage<...>::insert returns an iterator to the range of inserted elements
Storage based groups fully support multiple storage of the same type now
Huge internal rework to reduce the dependencies between the registry and the group classes/handlers
All group types have a .handle() function to return a reference to the leading storage
basic_registry<...>::group is no longer [[nodiscard]]
Configurable mask type for basic_observer
Allocator support for basic_observer
get_t, owned_t and exclude_t are (constexpr constructible) types now rather than aliases of type_list
basic_storage uses allocator_traits::destroy now rather than std::destroy_at (to allow specializations if needed)
Make basic_registry<...>::storage_for_type<...> available to the final user
basic_view<..>::operator bool returns true only for fully initialized views
Uninitialized views behave correctly in all circumstances, returning the expected result on each call
Views support swapping their storage or setting them lazily
View packs fully support empty views finally
basic_registry<...> doesn't instantiate temporary static storage on const function anymore
on_construct/on_update/on_destroy of basic_registry<...> also support named pools
Added a reverse each function (reach, worst name ever) to all storage classes
basic_registry<...>::erase_if to conditionally erase elements from their storage
Deprecated the following functions in the snapshot classes:
entities() (use get<Entity>() instead)
component<...>(...) (use get<T>(...) instead)
shrink, no longer required
General purpose ::get<T>(...) function for snapshot classes that works with storage types
Runtime pools support for snapshot classes (see ::get<T>(...) for further details)
Drop multi-type archive function requirement for snapshot classes
graph:
Allocator type propagates to the graph type returned by flow::graph() calls
locator:
Support for opaque structures
meta:
It's now possible to update the value of a meta property at any time (non-const meta_any ref)
Full support to meta member functions for primitive types
operator==/!= for meta_handle
operator==/!= for meta_data
operator==/!= for meta_prop
operator==/!= for meta_func
process:
Introduced basic_scheduler with default delta type for common cases
Turn scheduler into an alias for basic_scheduler<std::uint32_t>
signal:
Added delegate::target to get a pointer to the stored callable function
Refined transparent aggregate support for the dispatcher class
delegate also supports functions that skip first elements (on second attempt only)
Allow disconnecting listeners during iterations over the sigh class
Build system
Bump IWYU version to 0.19
Bump CMake version to 3.15.7
Enable documentation diagnostic for Clang
Increase CI warning level to /W1 on Windows
Add GCC11 to the list of compilers directly checked by the CI
Any other business
Suppress a few warnings due to unused variables in corner cases
More [[nodiscard]] where it makes sense (i.e. any_cast or meta_type::from_void)
Better allocator support with additional runtime checks for corner cases
Natvis support
All natvis files have been updated where necessary.
Breaking changes
entity:
ignore_as_empty_v doesn't exist anymore, use component_traits<...>::page_size instead
entt_traits::reserved is no longer available, combine entity_mask and version_mask instead
basic_sparse_set<...>::swap_at is now a protected function, override swap_or_move as needed instead
basic_sparse_set<...>::move_element doesn't exist anymore, use swap_or_move instead (with checks on to if needed)
sigh_storage_mixin was renamed into sigh_mixin
basic_sparse_set<...>::emplace was renamed to push
basic_sparse_set<...>::insert was renamed to push
basic_sparse_set<...>::get was renamed to value
basic_sparse_set<...>::sort was renamed to sort_as
basic_group<...>::sort (no callback overload) was renamed to sort_as
basic_registry<...>::base_type was renamed to common_type
basic_group<...>::base_type was renamed to common_type
runtime_view<...>::base_type was renamed to common_type
basic_view<...>::base_type was renamed to common_type
Nested groups are no longer supported (the pain is not worth the gain)
basic_view<...>::storage<...>() returns a (possibly null) pointer rather than a reference
basic_view<...>::handle() returns a (possibly null) pointer rather than a reference
basic_group<...>::storage<...>() returns a (possibly null) pointer rather than a reference
basic_view<...>::refresh() is a self-contained, non-const function that changes the view in-place
basic_view<...>::use<T>() is a self-contained, non-const function that changes the view in-place
process:
scheduler no longer requires a template parameter, use basic_scheduler if std::uint32_t isn't a good enough delta type
signal:
disconnect by reference is no longer available on the sink class, use the overload that accepts a pointer instead
sink<...>::before is no longer supported, no alternative provided
Any other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
I started a long term process to reduce the number of instantiations and also speed up the compilation.
This release contains many changes and great improvements in this regard. Still a work in progress though.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Changelog
config
:ENTT_FAIL(msg)
as an alias ofENTT_ASSERT(false, msg)
core
:is_equality_comparable
also detects C-style arraysvalue_list_index[_v]
,value_list_unique[_t]
,value_list_contains[_v]
andvalue_list_diff[_t]
std::tuple
traits specialization forentt::type_list
andentt::value_list
entity
:::storage
)::storage
)sigh_helper
utility to simplify connecting multiple listeners to a registrybasic_sparse_set<...>::traits_type
type memberbasic_storage<...>::traits_type
type memberbasic_registry<...>::traits_type
type membercomponent_traits
treatvoid
properly as any other component typeentt_traits
andbasic_entt_traits
to simplify specializing the formerentity_mask
andversion_mask
available throughentt_traits
entt_traits::base_type
for the final user (not used internally)basic_registry
work properly withvoid
component typesigh_mixin
is attached to a storagedata
function to sparse set iteratorsclear_all
function available in thebasic_sparse_set<...>
classremove
,erase
andclear
functionsremove
,erase
,clear
anddestroy
functionsdeletion_policy
is now publicly available viaentity/fwd.hpp
basic_sparse_set<...>::contiguous
functionextended_storage_iterator::base
makes the underlying iterator availableextended_view_iterator::base
makes the underlying iterator availableextended_group_iterator::base
makes the underlying iterator availablebasic_storage
when the value type is also the entity type (entity storage)storage<entity_type>()
added basic_entt_traits::next
returns the next valid version of an identifierbasic_registry<...>::size()
(use.storage<E>().size()
instead)basic_registry<...>::alive()
(use.storage<E>().in_use()
instead)basic_registry<...>::reserve(cap)
(use.storage<E>().reserve(cap)
instead)basic_registry<...>::capacity()
(use.storage<E>().capacity()
instead)basic_registry<...>::empty()
(use.storage<E>().in_use()
instead)basic_registry<...>::data()
(use.storage<E>().data()
instead)basic_registry<...>::released()
(use.storage<E>().in_use()
and.storage<E>().size()
instead)basic_registry<...>::release(args...)
(use.storage<E>().erase(args)
and.storage<E>().bump(entt)
instead)basic_registry<...>::assign(args...)
(use.storage<Entity>().push(first, last)
and.storage<Entity>().in_use(len)
instead)basic_registry<...>::each(args...)
(use.storage<Entity>().each()
instead)basic_sparse_set<...>::bump
returns the version in usebasic_storage<...>::insert
returns an iterator to the range of inserted elements.handle()
function to return a reference to the leading storagebasic_registry<...>::group
is no longer[[nodiscard]]
basic_observer
basic_observer
get_t
,owned_t
andexclude_t
are (constexpr constructible) types now rather than aliases oftype_list
basic_storage
usesallocator_traits::destroy
now rather thanstd::destroy_at
(to allow specializations if needed)basic_registry<...>::storage_for_type<...>
available to the final userbasic_view<..>::operator bool
returns true only for fully initialized viewsbasic_registry<...>
doesn't instantiate temporary static storage on const function anymoreon_construct
/on_update
/on_destroy
ofbasic_registry<...>
also support named poolsreach
, worst name ever) to all storage classesbasic_registry<...>::erase_if
to conditionally erase elements from their storageentities()
(useget<Entity>()
instead)component<...>(...)
(useget<T>(...)
instead)shrink
, no longer required::get<T>(...)
function for snapshot classes that works with storage types::get<T>(...)
for further details)graph
:flow::graph()
callslocator
:meta
:meta_any
ref)operator==/!=
for meta_handleoperator==/!=
for meta_dataoperator==/!=
for meta_propoperator==/!=
for meta_funcprocess
:basic_scheduler
with default delta type for common casesscheduler
into an alias forbasic_scheduler<std::uint32_t>
signal
:delegate::target
to get a pointer to the stored callable functiondelegate
also supports functions that skip first elements (on second attempt only)sigh
classBuild system
/W1
on WindowsAny other business
[[nodiscard]]
where it makes sense (i.e.any_cast
ormeta_type::from_void
)Natvis support
All natvis files have been updated where necessary.
Breaking changes
entity
:ignore_as_empty_v
doesn't exist anymore, usecomponent_traits<...>::page_size
insteadentt_traits::reserved
is no longer available, combineentity_mask
andversion_mask
insteadbasic_sparse_set<...>::swap_at
is now a protected function, overrideswap_or_move
as needed insteadbasic_sparse_set<...>::move_element
doesn't exist anymore, useswap_or_move
instead (with checks onto
if needed)sigh_storage_mixin
was renamed intosigh_mixin
basic_sparse_set<...>::emplace
was renamed topush
basic_sparse_set<...>::insert
was renamed topush
basic_sparse_set<...>::get
was renamed tovalue
basic_sparse_set<...>::sort
was renamed tosort_as
basic_group<...>::sort
(no callback overload) was renamed tosort_as
basic_registry<...>::base_type
was renamed tocommon_type
basic_group<...>::base_type
was renamed tocommon_type
runtime_view<...>::base_type
was renamed tocommon_type
basic_view<...>::base_type
was renamed tocommon_type
basic_view<...>::storage<...>()
returns a (possibly null) pointer rather than a referencebasic_view<...>::handle()
returns a (possibly null) pointer rather than a referencebasic_group<...>::storage<...>()
returns a (possibly null) pointer rather than a referencebasic_view<...>::refresh()
is a self-contained, non-const function that changes the view in-placebasic_view<...>::use<T>()
is a self-contained, non-const function that changes the view in-placeprocess
:scheduler
no longer requires a template parameter, usebasic_scheduler
ifstd::uint32_t
isn't a good enough delta typesignal
:disconnect
by reference is no longer available on thesink
class, use the overload that accepts a pointer insteadsink<...>::before
is no longer supported, no alternative providedAny other business
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
I started a long term process to reduce the number of instantiations and also speed up the compilation.
This release contains many changes and great improvements in this regard. Still a work in progress though.
Beta Was this translation helpful? Give feedback.
All reactions