diff --git a/CONTRIBUTING_8md_source.html b/CONTRIBUTING_8md_source.html index 65bcbca97..ab2a40f4b 100644 --- a/CONTRIBUTING_8md_source.html +++ b/CONTRIBUTING_8md_source.html @@ -5,7 +5,7 @@ -
| ▼Nentt | EnTT default namespace |
| CActor | Dedicated to those who aren't confident with entity-component systems |
| CAttachee | Attachee |
| CAttachee< Entity > | Basic attachee implementation |
| CAttachee< Entity, Type > | Extended attachee implementation |
| CContinuousLoader | Utility class for continuous loading |
| CDelegate | Basic delegate implementation |
| CDelegate< Ret(Args...)> | Utility class to send around functions and member functions |
| CDispatcher | Basic dispatcher implementation |
| ▼CEmitter | General purpose event emitter |
| CConnection | Generic connection type for events |
| Centt_traits | Entity traits |
| Centt_traits< std::uint16_t > | Entity traits for a 16 bits entity identifier |
| Centt_traits< std::uint32_t > | Entity traits for a 32 bits entity identifier |
| Centt_traits< std::uint64_t > | Entity traits for a 64 bits entity identifier |
| CFamily | Dynamic identifier generator |
| CHashedString | Zero overhead resource identifier |
| CIdentifier | Types identifiers |
| CInsertionSort | Function object for performing insertion sort |
| CMonostate | Minimal implementation of the monostate pattern |
| COneShotBubbleSort | Function object for performing bubble sort (single iteration) |
| Cpersistent_t | Persistent view type used to disambiguate overloads |
| CPersistentView | Persistent view |
| CProcess | Base class for processes |
| CProcessAdaptor | Adaptor for lambdas and functors to turn them into processes |
| CPrototype | Prototype container for concepts |
| Craw_t | Raw view type used to disambiguate overloads |
| CRawView | Raw view |
| CRegistry | Fast and reliable entity-component system |
| CResourceCache | Simple cache for resources of a given type |
| CResourceHandle | Shared resource handle |
| CResourceLoader | Base class for resource loaders |
| CRuntimeView | Runtime view |
| CScheduler | Cooperative scheduler for processes |
| CServiceLocator | Service locator, nothing more |
| CSigH | Unmanaged signal handler declaration |
| CSigH< Ret(Args...), Collector > | Unmanaged signal handler definition |
| CSink | Sink implementation |
| CSink< Ret(Args...)> | Sink implementation |
| CSnapshot | Utility class to create snapshots from a registry |
| CSnapshotLoader | Utility class to restore a snapshot as a whole |
| CSparseSet | Sparse set |
| CSparseSet< Entity > | Basic sparse set implementation |
| CSparseSet< Entity, Type > | Extended sparse set implementation |
| CStdSort | Function object to wrap std::sort in a class type |
| Ctag_t | Tag class type used to disambiguate overloads |
| CView | Multi component view |
| CView< Entity, Component > | Single component view specialization |
| Cas_group | Converts a registry to a group |
| Cas_view | Converts a registry to a view |
| Cbasic_actor | Dedicated to those who aren't confident with entity-component systems |
| Cbasic_continuous_loader | Utility class for continuous loading |
| Cbasic_group | Group |
| Cbasic_group< Entity, get_t< Get... > > | Non-owning group |
| Cbasic_group< Entity, get_t< Get... >, Owned... > | Owning group |
| Cbasic_prototype | Prototype container for concepts |
| Cbasic_registry | Fast and reliable entity-component system |
| Cbasic_runtime_view | Runtime view |
| Cbasic_snapshot | Utility class to create snapshots from a registry |
| Cbasic_snapshot_loader | Utility class to restore a snapshot as a whole |
| Cbasic_storage | Basic storage implementation |
| Cbasic_storage< Entity, Type, std::enable_if_t< std::is_empty_v< Type > > > | Basic storage implementation. |
| Cbasic_view | Multi component view |
| Cbasic_view< Entity, Component > | Single component view specialization |
| Cconnect_arg_t | Used to wrap a function or a member of a specified type |
| Cdelegate | Basic delegate implementation |
| Cdelegate< Ret(Args...)> | Utility class to use to send around functions and members |
| Cdispatcher | Basic dispatcher implementation |
| ▼Cemitter | General purpose event emitter |
| Cconnection | Generic connection type for events |
| Centt_traits | Entity traits |
| Centt_traits< std::uint16_t > | Entity traits for a 16 bits entity identifier |
| Centt_traits< std::uint32_t > | Entity traits for a 32 bits entity identifier |
| Centt_traits< std::uint64_t > | Entity traits for a 64 bits entity identifier |
| Cexclude_t | Alias for exclusion lists |
| Cfamily | Dynamic identifier generator |
| Cget_t | Alias for lists of observed components |
| Chashed_string | Zero overhead unique identifier |
| Cidentifier | Types identifiers |
| Cinsertion_sort | Function object for performing insertion sort |
| Cis_named_type | Provides the member constant value to true if a given type has a name. In all other cases, value is false |
| Cis_named_type< Type, std::void_t< named_type_traits_t< std::decay_t< Type > > > > | Provides the member constant value to true if a given type has a name. In all other cases, value is false |
| Cmeta_any | Meta any object |
| Cmeta_base | Meta base object |
| Cmeta_conv | Meta conversion function object |
| Cmeta_ctor | Meta constructor object |
| Cmeta_data | Meta data object |
| Cmeta_dtor | Meta destructor object |
| Cmeta_factory | A meta factory to be used for reflection purposes |
| Cmeta_func | Meta function object |
| Cmeta_handle | Meta handle object |
| Cmeta_prop | Meta property object |
| Cmeta_type | Meta type object |
| Cmonostate | Minimal implementation of the monostate pattern |
| Cnamed_type_traits | Traits class used mainly to push things across boundaries |
| Cnamed_type_traits< const Type > | Specialization used to get rid of constness |
| Cprocess | Base class for processes |
| Cprocess_adaptor | Adaptor for lambdas and functors to turn them into processes |
| Cresource_cache | Simple cache for resources of a given type |
| Cresource_handle | Shared resource handle |
| Cresource_loader | Base class for resource loaders |
| Cscheduler | Cooperative scheduler for processes |
| Cservice_locator | Service locator, nothing more |
| Csigh | Unmanaged signal handler declaration |
| Csigh< Ret(Args...), Collector > | Unmanaged signal handler definition |
| Csink | Sink implementation |
| Csink< Ret(Args...)> | Sink implementation |
| Csparse_set | Basic sparse set implementation |
| Cstd_sort | Function object to wrap std::sort in a class type |
| Cstorage | Basic storage implementation. |
| Ctype_list | A class to use to push around lists of types, nothing more |
| Ctype_list_cat | Primary template isn't defined on purpose |
| Ctype_list_cat< type_list< Type... > > | Concatenates multiple type lists |
| Ctype_list_cat< type_list< Type... >, type_list< Other... >, List... > | Concatenates multiple type lists |
| Ctype_list_unique | Primary template isn't defined on purpose |
| Ctype_list_unique< type_list< Type, Other... > > | Removes duplicates types from a type list |
| Ctype_list_unique< type_list<> > | Removes duplicates types from a type list |
|
- EnTT
- 2.7.3
-
- |
-
- 1.8.13
-
-
-
diff --git a/autotoc_md0.html b/autotoc_md0.html
index a88903a50..167441aca 100644
--- a/autotoc_md0.html
+++ b/autotoc_md0.html
@@ -22,7 +22,7 @@
EnTT you are using (tag or commit).EnTT you are using (tag or commit).EnTT framework has a coverage at 100% (at least it was at 100% at the time I wrote this file) and this is the reason for which you can be confident with using it in a production environment.Sometimes it's useful to be able to give unique identifiers to types at compile-time.
There are plenty of different solutions out there and I could have used one of them. However, I decided to spend my time to define a compact and versatile tool that fully embraces what the modern C++ has to offer.
The result of my efforts is the Identifier class template:
This is all what the class template has to offer: a static get member function that returns a numerical identifier for the given type. It can be used in any context where constant expressions are required.
The result of my efforts is the identifier class template:
This is all what the class template has to offer: a type inline variable that contains a numerical identifier for the given type. It can be used in any context where constant expressions are required.
As long as the list remains unchanged, identifiers are also guaranteed to be the same for every run. In case they have been used in a production environment and a type has to be removed, one can just use a placeholder to left the other identifiers unchanged:
-A bit ugly to see, but it works at least.
+A bit ugly to see, but it works at least.
Sometimes it's useful to be able to give unique identifiers to types at runtime.
There are plenty of different solutions out there and I could have used one of them. In fact, I adapted the most common one to my requirements and used it extensively within the entire library.
It's the Family class. Here is an example of use directly from the entity-component system:
This is all what a family has to offer: a type member function that returns a numerical identifier for the given type.
It's the family class. Here is an example of use directly from the entity-component system:
This is all what a family has to offer: a type inline variable that contains a numerical identifier for the given type.
Please, note that identifiers aren't guaranteed to be the same for every run. Indeed it mostly depends on the flow of execution.
A hashed string is a zero overhead resource identifier. Users can use human-readable identifiers in the codebase while using their numeric counterparts at runtime, thus without affecting performance.
+
A hashed string is a zero overhead unique identifier. Users can use human-readable identifiers in the codebase while using their numeric counterparts at runtime, thus without affecting performance.
The class has an implicit constexpr constructor that chews a bunch of characters. Once created, all what one can do with it is getting back the original string or converting it into a number.
The good part is that a hashed string can be used wherever a constant expression is required and no string-to-number conversion will take place at runtime if used carefully.
Example of use:
-There is also a user defined literal dedicated to hashed strings to make them more user-friendly:
+There is also a user defined literal dedicated to hashed strings to make them more user-friendly:
The hashed string class uses internally FNV-1a to compute the numeric counterpart of a string. Because of the pigeonhole principle, conflicts are possible. This is a fact.
There is no silver bullet to solve the problem of conflicts when dealing with hashing functions. In this case, the best solution seemed to be to give up. That's all.
- After all, human-readable resource identifiers aren't something strictly defined and over which users have not the control. Choosing a slightly different identifier is probably the best solution to make the conflict disappear in this case.
The monostate pattern is often presented as an alternative to a singleton based configuration system. This is exactly its purpose in EnTT. Moreover, this implementation is thread safe by design (hopefully).
Keys are represented by hashed strings, values are basic types like ints or bools. Values of different types can be associated to each key, even more than one at a time. Because of this, users must pay attention to use the same type both during an assignment and when they try to read back their data. Otherwise, they will probably incur in unexpected results.
Example of use:
-This is the complete list of members for entt::internal::Holder, including all inherited members.
-| data() const ENTT_NOEXCEPT=0 (defined in entt::internal::Holder) | entt::internal::Holder | pure virtual |
| data() ENTT_NOEXCEPT (defined in entt::internal::Holder) | entt::internal::Holder | inline |
| node() const ENTT_NOEXCEPT=0 (defined in entt::internal::Holder) | entt::internal::Holder | pure virtual |
| operator==(const Holder &) const ENTT_NOEXCEPT=0 (defined in entt::internal::Holder) | entt::internal::Holder | pure virtual |
| ~Holder()=default (defined in entt::internal::Holder) | entt::internal::Holder | virtual |
This is a constantly updated section where I'll try to put the answers to the most frequently asked questions.
+ If you don't find your answer here, there are two cases: nobody has done it yet or this section needs updating. In both cases, try to open a new issue or enter the gitter channel and ask your question. Probably someone already has an answer for you and we can then integrate this part of the documentation.
EnTT is an experimental project that I also use to keep me up-to-date with the latest revision of the language and the standard library. For this reason, it's likely that some classes you're working with are using standard containers under the hood.
+ Unfortunately, it's known that the standard containers aren't particularly performing in debugging (the reasons for this go beyond this document) and are even less so on Windows apparently. Fortunately this can also be mitigated a lot, achieving good results in many cases.
First of all, there are two things to do in a Windows project:
+/JMC option (Just My Code debugging), available starting in Visual Studio 2017 version 15.8._ITERATOR_DEBUG_LEVEL macro to 0. This will disable checked iterators and iterator debugging.Moreover, the macro ENTT_DISABLE_ASSERT should be defined to disable internal checks made by EnTT in debug. These are asserts introduced to help the users, but require to access to the underlying containers and therefore risk ruining the performance in some cases.
With these changes, debug performance should increase enough for most cases. If you want something more, you can can also switch to an optimization level O0 or preferably O1.
|
+ EnTT
+ 3.0.0
+
+ |
+
EnTT has historically had a limit when used across boundaries on Windows in general and on GNU/Linux when default visibility was set to hidden. The limitation is due mainly to a custom utility used to assign unique, sequential identifiers to different types. Unfortunately, this tool is used by several core classes (the registry among the others) that are thus almost unusable across boundaries.
+ The reasons for that are beyond the purposes of this document. However, the good news is that EnTT also offers now a way to overcome this limit and to push things across boundaries without problems when needed.
To allow a type to work properly across boundaries when used by a class that requires to assign unique identifiers to types, users must specialize a class template to literally give a compile-time name to the type itself.
+ The name of the class template is name_type_traits and the specialization must be such that it exposes a static constexpr data member named value having type either ENTT_ID_TYPE or entt::hashed_string::hash_type. Its value is the user defined unique identifier assigned to the specific type.
+ Identifiers are not to be sequentially generated in this case.
As an example:
+Because of the rules of the language, the specialization must reside in the global namespace or in the entt namespace. There is no way to change this rule unfortunately, because it doesn't depend on the library itself.
The good aspect of this approach is that it's not intrusive at all. The other way around was in fact forcing users to inherit all their classes from a common base. Something to avoid, at least from my point of view.
+ However, despite the fact that it's not intrusive, it would be great if it was also easier to use and a bit less error-prone. This is why a bunch of macros exist to ease defining named types.
Someone might think that this trick is valid only for the types to push across boundaries. This isn't how things work. In fact, the problem is more complex than that.
+ As a rule of thumb, users should never mix named and non-named types. Whenever a type is given a name, all the types must be given a name. As an example, consider the registry class template: in case it is pushed across boundaries, all the types of components should be assigned a name to avoid subtle bugs.
Indeed, this constraint can be relaxed in many cases. However, it is difficult to define a general rule to follow that is not the most stringent, unless users know exactly what they are doing. Therefore, I won't elaborate on giving further details on the topic.
+The library comes with a set of predefined macros to use to declare named types or export already existing ones. In particular:
+ENTT_NAMED_TYPE can be used to assign a name to already existing types. This macro must be used in the global namespace even when the types to be named are not.ENTT_NAMED_STRUCT can be used to define and export a struct at the same time. It accepts also an optional namespace in which to define the given type. This macro must be used in the global namespace.ENTT_NAMED_CLASS can be used to define and export a class at the same time. It accepts also an optional namespace in which to define the given type. This macro must be used in the global namespace.Nested namespaces are supported out of the box as well in all cases. As an example:
+These macros can be used to avoid specializing the named_type_traits class template. In all cases, the name of the class is used also as a seed to generate the compile-time unique identifier.
When using macros, unique identifiers are 32/64 bit integers generated by hashing strings during compilation. Therefore, conflicts are rare but still possible. In case of conflicts, everything simply will get broken at runtime and the strangest things will probably take place.
+ Unfortunately, there is no safe way to prevent it. If this happens, it will be enough to give a different value to one of the conflicting types to solve the problem. To do this, users can either assign a different name to the class or directly define a specialization for the named_type_traits class template.
As long as EnTT won't support custom allocators, another problem with allocations will remain alive instead. This is in fact easily solved, or at least it is if one knows it.
To allow users to add types dynamically, the library makes extensive use of type erasure techniques and dynamic allocations for pools (whether they are for components, events or anything else). The problem occurs when, for example, a registry is created on one side of a boundary and a pool is dynamically created on the other side. In the best case, everything will crash at the exit, while at worst it will do so at runtime.
+ To avoid problems, the pools must be generated from the same side of the boundary where the object that owns them is also created. As an example, when the registry is created in the main executable and used across boundaries for a given type of component, the pool for that type must be created before passing around the registry itself. To do this is fortunately quite easy, since it is sufficient to invoke any of the methods that involve the given type (continuing the example with the registry, a call to reserve or size is more than enough).
Maybe one day some dedicated methods will be added that do nothing but create a pool for a given type. Until now it has been preferred to keep the API cleaner as they are not strictly necessary.
+
+ 1.8.13
+
+
+
diff --git a/autotoc_md52.html b/autotoc_md52.html
deleted file mode 100644
index f6fb54a2e..000000000
--- a/autotoc_md52.html
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
To make sure that an application and a shared library that use both EnTT can interact correctly when symbols are hidden by default, there are some tricks to follow.
- In particular and in order to avoid undefined behaviors, all the instantiation of the Family class template shall be made explicit along with the system-wide specifier to use to export them.
At the time I'm writing this document, the classes that use internally the above mentioned class template are Dispatcher, Emitter and Registry. Therefore and as an example, if you use the Registry class template in your shared library and want to set symbols visibility to hidden by default, the following lines are required to allow it to function properly with a client that also uses the Registry somehow:
Otherwise, the risk is that type identifiers are different between the shared library and the application and this will prevent the whole thing from functioning correctly for obvious reasons.
-
- 1.8.13
-
-
-
diff --git a/autotoc_md53.html b/autotoc_md53.html
deleted file mode 100644
index 66fc871f2..000000000
--- a/autotoc_md53.html
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Signals are usually a core part of games and software architectures in general.
- Roughly speaking, they help to decouple the various parts of a system while allowing them to communicate with each other somehow.
The so called _modern C++_ comes with a tool that can be useful in these terms, the std::function. As an example, it can be used to create delegates.
- However, there is no guarantee that an std::function does not perform allocations under the hood and this could be problematic sometimes. Furthermore, it solves a problem but may not adapt well to other requirements that may arise from time to time.
In case that the flexibility and potential of an std::function are not required or where you are looking for something different, EnTT offers a full set of classes to solve completely different problems.
Signal handlers work with naked pointers, function pointers and pointers to member functions. Listeners can be any kind of objects and users are in charge of connecting and disconnecting them from a signal to avoid crashes due to different lifetimes. On the other side, performance shouldn't be affected that much by the presence of such a signal handler.
- A signal handler can be used as a private data member without exposing any publish functionality to the clients of a class. The basic idea is to impose a clear separation between the signal itself and its sink class, that is a tool to be used to connect and disconnect listeners on the fly.
The API of a signal handler is straightforward. The most important thing is that it comes in two forms: with and without a collector. In case a signal is associated with a collector, all the values returned by the listeners can be literally collected and used later by the caller. Otherwise it works just like a plain signal that emits events from time to time.
-
Note: collectors are allowed only in case of function types whose the return type isn't void for obvious reasons.
To create instances of signal handlers there exist mainly two ways:
-As expected, they offer all the basic functionalities required to know how many listeners they contain (size) or if they contain at least a listener (empty) and even to swap two signal handlers (swap).
Besides them, there are member functions to use both to connect and disconnect listeners in all their forms by means of a sink:
-Once listeners are attached (or even if there are no listeners at all), events and data in general can be published through a signal by means of the publish member function:
To collect data, the collect member function should be used instead. Below is a minimal example to show how to use it:
As shown above, a collector must expose a function operator that accepts as an argument a type to which the return type of the listeners can be converted. Moreover, it has to return a boolean value that is false to stop collecting data, true otherwise. This way one can avoid calling all the listeners in case it isn't necessary.
-A delegate can be used as general purpose invoker with no memory overhead for free functions and member functions provided along with an instance on which to invoke them.
- It does not claim to be a drop-in replacement for an std::function, so do not expect to use it whenever an std::function fits well. However, it can be used to send opaque delegates around to be used to invoke functions as needed.
The interface is trivial. It offers a default constructor to create empty delegates:
-All what is needed to create an instance is to specify the type of the function the delegate will contain, that is the signature of the free function or the member function one wants to assign to it.
-Attempting to use an empty delegate by invoking its function call operator results in undefined behavior, most likely a crash actually. Before to use a delegate, it must be initialized.
- There exist two functions to do that, both named connect:
It hasn't a disconnect counterpart. Instead, there exists a reset member function to clear it.
- The empty member function can be used to know if a delegate is empty:
Finally, to invoke a delegate, the function call operator is the way to go as usual:
-Probably too much small and pretty poor of functionalities, but the delegate class can help in a lot of cases and it has shown that it is worth keeping it within the library.
-The event dispatcher class is designed so as to be used in a loop. It allows users both to trigger immediate events or to queue events to be published all together once per tick.
- This class shares part of its API with the one of the signal handler, but it doesn't require that all the types of events are specified when declared:
In order to register an instance of a class to a dispatcher, its type must expose one or more member functions of which the return types are void and the argument lists are const E &, for each type of event E.
- To ease the development, member functions that are named receive are automatically detected and have not to be explicitly specified when registered. In all the other cases, the name of the member function aimed to receive the event must be provided to the connect member function of the sink bound to the specific event:
The disconnect member function follows the same pattern and can be used to selectively remove listeners:
The trigger member function serves the purpose of sending an immediate event to all the listeners registered so far. It offers a convenient approach that relieves users from having to create the event itself. Instead, it's enough to specify the type of event and provide all the parameters required to construct it.
- As an example:
Listeners are invoked immediately, order of execution isn't guaranteed. This method can be used to push around urgent messages like an is terminating notification on a mobile app.
-On the other hand, the enqueue member function queues messages together and allows to maintain control over the moment they are sent to listeners. The signature of this method is more or less the same of trigger:
Events are stored aside until the update member function is invoked, then all the messages that are still pending are sent to the listeners at once:
This way users can embed the dispatcher in a loop and literally dispatch events once per tick to their systems.
-A general purpose event emitter thought mainly for those cases where it comes to working with asynchronous stuff.
- Originally designed to fit the requirements of uvw (a wrapper for libuv written in modern C++), it was adapted later to be included in this library.
To create a custom emitter type, derived classes must inherit directly from the base class as:
-The full list of accepted types of events isn't required. Handlers are created internally on the fly and thus each type of event is accepted by default.
-Whenever an event is published, an emitter provides the listeners with a reference to itself along with a const reference to the event. Therefore listeners have an handy way to work with it without incurring in the need of capturing a reference to the emitter itself.
- In addition, an opaque object is returned each time a connection is established between an emitter and a listener, allowing the caller to disconnect them at a later time.
- The opaque object used to handle connections is both movable and copyable. On the other side, an event emitter is movable but not copyable by default.
To create new instances of an emitter, no arguments are required:
-Listeners must be movable and callable objects (free functions, lambdas, functors, std::functions, whatever) whose function type is:
Where Event is the type of event they want to listen.
- There are two ways to attach a listener to an event emitter that differ slightly from each other:
on member function. It is meant to register a listener designed to be invoked more than once for the given event type.The connection object can be freely discarded. Otherwise, it can be used later to disconnect the listener if required.
-once member function. It is meant to register a listener designed to be invoked only once for the given event type. The listener is automatically disconnected after the first invocation.The connection object can be freely discarded. Otherwise, it can be used later to disconnect the listener if required.
-In both cases, the connection object can be used with the erase member function:
There are also two member functions to use either to disconnect all the listeners for a given type of event or to clear the emitter:
-To send an event to all the listeners that are interested in it, the publish member function offers a convenient approach that relieves users from having to create the event:
Finally, the empty member function tests if there exists at least either a listener registered with the event emitter or to a given type of event:
In general, the event emitter is a handy tool when the derived classes wrap asynchronous operations, because it introduces a nice-to-have model based on events and listeners that kindly hides the complexity behind the scenes. However it is not limited to such uses.
-
- 1.8.13
-
-
-
diff --git a/autotoc_md57.html b/autotoc_md57.html
new file mode 100644
index 000000000..6e402c603
--- /dev/null
+++ b/autotoc_md57.html
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 3.0.0
+
+ |
+
EnTT is widely used in private and commercial applications. I cannot even mention most of them because of some signatures I put on some documents time ago. Fortunately, there are also people who took the time to implement open source projects based on EnTT and did not hold back when it came to documenting them.
Below an incomplete list of games, applications and articles that can be used as a reference. Where I put the word apparently means that the use of EnTT is documented but the authors didn't make explicit announcements or contacted me directly.
I hope this list can grow much more in the future:
+EnTT.EnTT.SFML and EnTT playground.SDL and EnTT.Allegro, Lua and modern C++.EnTT, for those who want to know more on this project.UE4.UE4 and EnTT.SFML, EnTT, Conan and CMake.EnTT for the internal ECS and the cross platform C++ rendering engine. The SDKs are utilized by a lot of enterprise custom apps, as well as by Esri for its own public applications such as Explorer, Collector and Navigator.EnTT, at the time used for internal projects.Entitas-CSharp.EnTT from which to take inspiration if interested.If you know of other resources out there that are about EnTT, feel free to open an issue or a PR and I'll be glad to add them to this page.
+ 1.8.13
+
+
+
diff --git a/autotoc_md41.html b/autotoc_md58.html
similarity index 56%
rename from autotoc_md41.html
rename to autotoc_md58.html
index 9cf9e38a1..7f31e4b1e 100644
--- a/autotoc_md41.html
+++ b/autotoc_md58.html
@@ -22,7 +22,7 @@
Usually service locators are tightly bound to the services they expose and it's hard to define a general purpose solution. This template based implementation tries to fill the gap and to get rid of the burden of defining a different specific locator for each application.
This class is tiny, partially unsafe and thus risky to use. Moreover it doesn't fit probably most of the scenarios in which a service locator is required. Look at it as a small tool that can sometimes be useful if users know how to handle it.
The API is straightforward. The basic idea is that services are implemented by means of interfaces and rely on polymorphism.
The locator is instantiated with the base type of the service if any and a concrete implementation is provided along with all the parameters required to initialize it. As an example:
The locator can also be queried to know if an active service is currently set and to retrieve it if necessary (either as a pointer or as a reference):
-A common use is to wrap the different locators in a container class, creating aliases for the various services:
-The locator can also be queried to know if an active service is currently set and to retrieve it if necessary (either as a pointer or as a reference):
+A common use is to wrap the different locators in a container class, creating aliases for the various services:
+|
+ EnTT
+ 3.0.0
+
+ |
+
Reflection (or rather, its lack) is a trending topic in the C++ world and, in the specific case of EnTT, a tool that can unlock a lot of other features. I looked for a third-party library that met my needs on the subject, but I always came across some details that I didn't like: macros, being intrusive, too many allocations. In one word: unsatisfactory.
+ I finally decided to write a built-in, non-intrusive and macro-free runtime reflection system for EnTT. Maybe I didn't do better than others or maybe yes, time will tell me, but at least I can model this tool around the library to which it belongs and not vice versa.
Reflection always starts from real types (users cannot reflect imaginary types and it would not make much sense, we wouldn't be talking about reflection anymore).
+ To reflect a type, the library provides the reflect function:
It accepts the type to reflect as a template parameter and an optional name as an argument. Names are important because users can retrieve meta types at runtime by searching for them by name. However, there are cases in which users can be interested in adding features to a reflected type so that the reflection system can use it correctly under the hood, but they don't want to allow searching the type by name.
+ In both cases, the returned value is a factory object to use to continue building the meta type.
A factory is such that all its member functions returns the factory itself. It can be used to extend the reflected type and add the following:
+ctor member function for this purpose:dtor member function for this purpose:data member function for this purpose:This function requires as an argument the name to give to the meta data once created. Users can then access meta data at runtime by searching for them by name.
+ Data members can be set also by means of a couple of functions, namely a setter and a getter. Setters and getters can be either free functions, member functions or mixed ones, as long as they respect the required signatures.
+ Refer to the inline documentation for all the details.
func member function for this purpose:This function requires as an argument the name to give to the meta function once created. Users can then access meta functions at runtime by searching for them by name.
+base member function for this purpose:From now on, wherever a base_type is required, an instance of derived_type will also be accepted.
double and an int to see it. Similar to bases, conversion functions allow users to define conversions that will be implicitly performed by the reflection system when required.conv member function for this purpose:That's all, everything users need to create meta types and enjoy the reflection system. At first glance it may not seem that much, but users usually learn to appreciate it over time.
+ Also, do not forget what these few lines hide under the hood: a built-in, non-intrusive and macro-free system for reflection in C++. Features that are definitely worth the price, at least for me.
The reflection system comes with its own meta any type. It may seem redundant since C++17 introduced std::any, but it is not.
+ In fact, the type returned by an std::any is a const reference to an std::type_info, an implementation defined class that's not something everyone wants to see in a software. Furthermore, the class std::type_info suffers from some design flaws and there is even no way to convert an std::type_info into a meta type, thus linking the two worlds.
A meta any object provides an API similar to that of its most famous counterpart and serves the same purpose of being an opaque container for any type of value.
+ It minimizes the allocations required, which are almost absent thanks to SBO techniques. In fact, unless users deal with fat types and create instances of them though the reflection system, allocations are at zero.
A meta any object can be created by any other object or as an empty container to initialize later:
+It can be constructed or assigned by copy and move and it takes the burden of destroying the contained object when required.
+ A meta any object has a type member function that returns the meta type of the contained value, if any. The member functions can_cast and can_convert are used to know if the underlying object has a given type as a base or if it can be converted implicitly to it. Similarly, cast and convert do what they promise and return the expected value.
Once the web of reflected types has been constructed, it's a matter of using it at runtime where required.
+ All this has the great merit that, unlike the vast majority of the things present in this library and closely linked to the compile-time, the reflection system stands in fact as a non-intrusive tool for the runtime.
To search for a reflected type there are two options: by type or by name. In both cases, the search can be done by means of the resolve function:
There exits also a third overload of the resolve function to use to iterate all the reflected types at once:
In all cases, the returned value is an instance of meta_type. This type of objects offer an API to know the runtime name of the type, to iterate all the meta objects associated with them and even to build or destroy instances of the underlying type.
+ Refer to the inline documentation for all the details.
The meta objects that compose a meta type are accessed in the following ways:
+The returned type is meta_ctor and may be invalid if there is no constructor that accepts the supplied arguments or at least some types from which they are derived or to which they can be converted.
+ A meta constructor offers an API to know the number of arguments, the expected meta types and to invoke it, therefore to construct a new instance of the underlying type.
The returned type is meta_dtor and may be invalid if there is no custom destructor set for the given meta type.
+ All what a meta destructor has to offer is a way to invoke it on a given instance. Be aware that the result may not be what is expected.
The returned type is meta_data and may be invalid if there is no meta data object associated with the given name.
+ A meta data object offers an API to query the underlying type (ie to know if it's a const or a static one), to get the meta type of the variable and to set or get the contained value.
The returned type is meta_func and may be invalid if there is no meta function object associated with the given name.
+ A meta function object offers an API to query the underlying type (ie to know if it's a const or a static function), to know the number of arguments, the meta return type and the meta types of the parameters. In addition, a meta function object can be used to invoke the underlying function and then get the return value in the form of meta any object.
The returned type is meta_base and may be invalid if there is no meta base object associated with the given name.
+ Meta bases aren't meant to be used directly, even though they are freely accessible. They expose only a few methods to use to know the meta type of the base class and to convert a raw pointer between types.
The returned type is meta_conv and may be invalid if there is no meta conversion function associated with the given type.
+ The meta conversion functions are as thin as the meta bases and with a very similar interface. The sole difference is that they return a newly created instance wrapped in a meta any object when they convert between different types.
All the objects thus obtained as well as the meta types can be explicitly converted to a boolean value to check if they are valid:
+Furthermore, all meta objects with the exception of meta destructors can be iterated through an overload that accepts a callback through which to return them. As an example:
+A meta type can also be used to construct or destroy actual instances of the underlying type.
+ In particular, the construct member function accepts a variable number of arguments and searches for a match. It returns a meta_any object that may or may not be initialized, depending on whether a suitable constructor has been found or not. On the other side, the destroy member function accepts instances of meta_any as well as actual objects by reference and invokes the registered destructor if any or a default one.
+ Be aware that the result of a call to destroy may not be what is expected.
Meta types and meta objects in general contain much more than what is said: a plethora of functions in addition to those listed whose purposes and uses go unfortunately beyond the scope of this document.
+ I invite anyone interested in the subject to look at the code, experiment and read the official documentation to get the best out of this powerful tool.
A special mention should be made for constant values and enums. It wouldn't be necessary, but it will help distracted readers.
+As mentioned, the data member function can be used to reflect constants of any type among the other things.
+ This allows users to create meta types for enums that will work exactly like any other meta type built from a class. Similarly, arithmetic types can be enriched with constants of special meaning where required.
+ Personally, I find it very useful not to export what is the difference between enums and classes in C++ directly in the space of the reflected types.
All the values thus exported will appear to users as if they were constant data members of the reflected types.
+Exporting constant values or elements from an enum is as simple as ever:
+It goes without saying that accessing them is trivial as well. It's a matter of doing the following, as with any other data member of a meta type:
+As a side note, remember that all this happens behind the scenes without any allocation because of the small object optimization performed by the meta any class.
+Sometimes (ie when it comes to creating an editor) it might be useful to be able to attach properties to the meta objects created. Fortunately, this is possible for most of them.
+ To attach a property to a meta object, no matter what as long as it supports properties, it is sufficient to provide an object at the time of construction such that std::get<0> and std::get<1> are valid for it. In other terms, the properties are nothing more than key/value pairs users can put in an std::pair. As an example:
The meta objects that support properties offer then a couple of member functions named prop to iterate them at once and to search a specific property by key:
Meta properties are objects having a fairly poor interface, all in all. They only provide the key and the value member functions to be used to retrieve the key and the value contained in the form of meta any objects, respectively.
A type registered with the reflection system can also be unregistered. This means unregistering all its data members, member functions, conversion functions and so on. However, the base classes won't be unregistered, since they don't necessarily depend on it. Similarly, implicitly generated types (as an example, the meta types implicitly generated for function parameters when needed) won't be unregistered.
+To unregister a type, users can use the unregister function from the global namespace:
This function returns a boolean value that is true if the type is actually registered with the reflection system, false otherwise.
+ The type can be re-registered later with a completely different name and form.
+ 1.8.13
+
+
+
diff --git a/autotoc_md44.html b/autotoc_md69.html
similarity index 61%
rename from autotoc_md44.html
rename to autotoc_md69.html
index b7c8c9452..c6e36b5a8 100644
--- a/autotoc_md44.html
+++ b/autotoc_md69.html
@@ -22,7 +22,7 @@
Sometimes processes are a useful tool to work around the strict definition of a system and introduce logic in a different way, usually without resorting to the introduction of other components.
EnTT offers a minimal support to this paradigm by introducing a few classes that users can use to define and execute cooperative processes.
A typical process must inherit from the Process class template that stays true to the CRTP idiom. Moreover, derived classes must specify what's the intended type for elapsed times.
A typical process must inherit from the process class template that stays true to the CRTP idiom. Moreover, derived classes must specify what's the intended type for elapsed times.
A process should expose publicly the following member functions whether required (note that it isn't required to define a function unless the derived class wants to override the default behavior):
void update(Delta, void *);
It's invoked once per tick until a process is explicitly aborted or it terminates either with or without errors. Even though it's not mandatory to declare this member function, as a rule of thumb each process should at least define it to work properly. The void * parameter is an opaque pointer to user data (if any) forwarded directly to the process during an update.
void init(void *);
It's invoked at the first tick, immediately before an update. The void * parameter is an opaque pointer to user data (if any) forwarded directly to the process during an update.
void init();
It's invoked when the process joins the running queue of a scheduler. This happens as soon as it's attached to the scheduler if the process is a top level one, otherwise when it replaces its parent if the process is a continuation.
void succeeded();
It's invoked in case of success, immediately after an update and during the same tick.
@@ -90,7 +90,7 @@ The processDerived classes can also change the internal state of a process by invoking succeed and fail, as well as pause and unpause the process itself. All these are protected member functions made available to be able to manage the life cycle of a process from a derived class.
Here is a minimal example for the sake of curiosity:
-Lambdas and functors can't be used directly with a scheduler for they are not properly defined processes with managed life cycles.
This class helps in filling the gap and turning lambdas and functors into full featured processes usable by a scheduler.
Both succeed and fail accept no parameters at all.
Note that usually users shouldn't worry about creating adaptors at all. A scheduler creates them internally each and every time a lambda or a functor is used as a process.
-A cooperative scheduler runs different processes and helps managing their life cycles.
-Each process is invoked once per tick. If it terminates, it's removed automatically from the scheduler and it's never invoked again. Otherwise it's a good candidate to run once more the next tick.
- A process can also have a child. In this case, the process is replaced with its child when it terminates if it returns with success. In case of errors, both the process and its child are discarded. This way, it's easy to create chain of processes to run sequentially.
Each process is invoked once per tick. If it terminates, it's removed automatically from the scheduler and it's never invoked again. Otherwise it's a good candidate to run one more time the next tick.
+ A process can also have a child. In this case, the parent process is replaced with its child when it terminates and only if it returns with success. In case of errors, both the parent process and its child are discarded. This way, it's easy to create chain of processes to run sequentially.
Using a scheduler is straightforward. To create it, users must provide only the type for the elapsed times and no arguments at all:
-It has member functions to query its internal data structures, like empty or size, as well as a clear utility to reset it to a clean state:
To attach a process to a scheduler there are mainly two ways:
+It has member functions to query its internal data structures, like empty or size, as well as a clear utility to reset it to a clean state:
To attach a process to a scheduler there are mainly two ways:
Process class template, it's enough to indicate its type and submit all the parameters required to construct it to the attach member function:process class template, it's enough to indicate its type and submit all the parameters required to construct it to the attach member function:attach member function:In both cases, the return value is an opaque object that offers a then member function to use to create chains of processes to run sequentially.
+
In both cases, the return value is an opaque object that offers a then member function to use to create chains of processes to run sequentially.
As a minimal example of use:
To update a scheduler and thus all its processes, the update member function is the way to go:
To update a scheduler and therefore all its processes, the update member function is the way to go:
In addition to these functions, the scheduler offers an abort member function that can be used to discard all the running processes at once:
Resource management is usually one of the most critical part of a software like a game. Solutions are often tuned to the particular application. There exist several approaches and all of them are perfectly fine as long as they fit the requirements of the piece of software in which they are used.
Examples are loading everything on start, loading on request, predictive loading, and so on.
EnTT doesn't pretend to offer a one-fits-all solution for the different cases. Instead, it offers a minimal and perhaps trivial cache that can be useful most of the time during prototyping and sometimes even in a production environment.
For those interested in the subject, the plan is to improve it considerably over time in terms of performance, memory usage and functionalities. Hoping to make it, of course, one step at a time.
There are three main actors in the model: the resource, the loader and the cache.
The resource is whatever users want it to be. An image, a video, an audio, whatever. There are no limits.
As a minimal example:
A loader is a class the aim of which is to load a specific resource. It has to inherit directly from the dedicated base class as in the following example:
-Where MyResource is the type of resources it creates.
+
A loader is a class the aim of which is to load a specific resource. It has to inherit directly from the dedicated base class as in the following example:
+Where my_resource is the type of resources it creates.
A resource loader must also expose a public const member function named load that accepts a variable number of arguments and returns a shared pointer to a resource.
As an example:
In general, resource loaders should not have a state or retain data of any type. They should let the cache manage their resources instead.
+
In general, resource loaders should not have a state or retain data of any type. They should let the cache manage their resources instead.
As a side note, base class and CRTP idiom aren't strictly required with the current implementation. One could argue that a cache can easily work with loaders of any type. However, future changes won't be breaking ones by forcing the use of a base class today and that's why the model is already in its place.
Finally, a cache is a specialization of a class template tailored to a specific resource:
-The idea is to create different caches for different types of resources and to manage each one independently and in the most appropriate way.
+
The idea is to create different caches for different types of resources and to manage each one independently in the most appropriate way.
As a (very) trivial example, audio tracks can survive in most of the scenes of an application while meshes can be associated with a single scene and then discarded when users leave it.
A cache offers a set of basic functionalities to query its internal state and to organize it:
-Besides these member functions, it contains what is needed to load, use and discard resources of the given type.
+
Besides these member functions, a cache contains what is needed to load, use and discard resources of the given type.
Before to explore this part of the interface, it makes sense to mention how resources are identified. The type of the identifiers to use is defined as:
Where resource_type is an alias for entt::HashedString. Therefore, resource identifiers are created explicitly as in the following example:
The class HashedString is described in a dedicated section, so I won't do in details here.
Where resource_type is an alias for entt::hashed_string::hash_type. Therefore, resource identifiers are created explicitly as in the following example:
The class hashed_string is described in a dedicated section, so I won't go in details here.
Resources are loaded and thus stored in a cache through the load member function. It accepts the loader to use as a template parameter, the resource identifier and the parameters used to construct the resource as arguments:
The return value can be used to know if the resource has been loaded correctly. In case the loader returns an invalid pointer or the resource already exists in the cache, a false value is returned:
-Unfortunately, in this case there is no way to know what was the problem exactly. However, before trying to load a resource or after an error, one can use the contains member function to know if a cache already contains a specific resource:
There exists also a member function to use to force a reload of an already existing resource if needed:
-As above, the function returns true in case of success, false otherwise. The sole difference in this case is that an error necessarily means that the loader has failed for some reasons to load the resource.
- Note that the reload member function is a kind of alias of the following snippet:
Where the discard member function is used to get rid of a resource if loaded. In case the cache doesn't contain a resource for the given identifier, the function does nothing and returns immediately.
The function returns a handle to the resource, whether it already exists or is loaded. In case the loader returns an invalid pointer, the handle is invalid as well and therefore it can be easily used with an if statement:
Before trying to load a resource, the contains member function can be used to know if a cache already contains a specific resource:
There exists also a member function to use to force a reload of an already existing resource if needed:
+As above, the function returns a handle to the resource that is invalid in case of errors. The reload member function is a kind of alias of the following snippet:
Where the discard member function is used to get rid of a resource if loaded. In case the cache doesn't contain a resource for the given identifier, discard does nothing and returns immediately.
So far, so good. Resources are finally loaded and stored within the cache.
- They are returned to users in the form of handles. To get one of them:
The idea behind a handle is the same of the flyweight pattern. In other terms, resources aren't copied around. Instead, instances are shared between handles. Users of a resource owns a handle and it guarantees that a resource isn't destroyed until all the handles are destroyed, even if the resource itself is removed from the cache.
- Handles are tiny objects both movable and copyable. They returns the contained resource as a const reference on request:
The idea behind a handle is the same of the flyweight pattern. In other terms, resources aren't copied around. Instead, instances are shared between handles. Users of a resource own a handle that guarantees that a resource isn't destroyed until all the handles are destroyed, even if the resource itself is removed from the cache.
+ Handles are tiny objects both movable and copyable. They return the contained resource as a const reference on request:
get member function:The resource can also be accessed directly using the arrow operator if required:
To test if a handle is still valid, the cast operator to bool allows users to use it in a guard:
Finally, in case there is the need to load a resource and thus to get a handle without storing the resource itself in the cache, users can rely on the temp member function template.
- The declaration is similar to the one of load but for the fact that it doesn't return a boolean value. Instead, it returns a (possibly invalid) handle for the resource:
Do not forget to test the handle for validity. Otherwise, getting the reference to the resource it points may result in undefined behavior.
+ The declaration is similar to that ofload, a (possibly invalid) handle for the resource is returned also in this case:
+Do not forget to test the handle for validity. Otherwise, getting a reference to the resource it points may result in undefined behavior.
|
+ EnTT
+ 3.0.0
+
+ |
+
Signals are usually a core part of games and software architectures in general.
+ Roughly speaking, they help to decouple the various parts of a system while allowing them to communicate with each other somehow.
The so called _modern C++_ comes with a tool that can be useful in these terms, the std::function. As an example, it can be used to create delegates.
+ However, there is no guarantee that an std::function does not perform allocations under the hood and this could be problematic sometimes. Furthermore, it solves a problem but may not adapt well to other requirements that may arise from time to time.
In case that the flexibility and potential of an std::function are not required or where you are looking for something different, EnTT offers a full set of classes to solve completely different problems.
A delegate can be used as a general purpose invoker with no memory overhead for free functions and members provided along with an instance on which to invoke them.
+ It does not claim to be a drop-in replacement for an std::function, so do not expect to use it whenever an std::function fits well. However, it can be used to send opaque delegates around to be used to invoke functions as needed.
The interface is trivial. It offers a default constructor to create empty delegates:
+All what is needed to create an instance is to specify the type of the function the delegate will contain, that is the signature of the free function or the member function one wants to assign to it.
+Attempting to use an empty delegate by invoking its function call operator results in undefined behavior or most likely a crash. Before to use a delegate, it must be initialized.
+ There exists a bunch of overloads of the connect member function to do that. As an example of use:
The delegate class accepts also data members, if needed. In this case, the function type of the delegate is such that the parameter list is empty and the value of the data member is at least convertible to the return type.
+ Functions having type equivalent to void(T *, args...) are accepted as well. In this case, T * is considered a payload and the function will receive it back every time it's invoked. In other terms, this works just fine with the above definition:
The function g will be invoked with a pointer to c and 42. However, the function type of the delegate is still void(int), mainly because this is also the signature of its function call operator.
To create and initialize a delegate at once, there are also some specialized constructors. Because of the rules of the language, the listener is provided by means of the entt::connect_arg variable template:
Aside connect, a disconnect counterpart isn't provided. Instead, there exists a reset member function to use to clear a delegate.
+ To know if a delegate is empty, it can be used explicitly in every conditional statement:
Finally, to invoke a delegate, the function call operator is the way to go as usual:
+As shown above, listeners do not have to strictly follow the signature of the delegate. As long as a listener can be invoked with the given arguments to yield a result that is convertible to the given result type, everything works just fine.
+Probably too much small and pretty poor of functionalities, but the delegate class can help in a lot of cases and it has shown that it is worth keeping it within the library.
+Signal handlers work with naked pointers, function pointers and pointers to member functions. Listeners can be any kind of objects and users are in charge of connecting and disconnecting them from a signal to avoid crashes due to different lifetimes. On the other side, performance shouldn't be affected that much by the presence of such a signal handler.
+ A signal handler can be used as a private data member without exposing any publish functionality to the clients of a class. The basic idea is to impose a clear separation between the signal itself and its sink class, that is a tool to be used to connect and disconnect listeners on the fly.
The API of a signal handler is straightforward. The most important thing is that it comes in two forms: with and without a collector. In case a signal is associated with a collector, all the values returned by the listeners can be literally collected and used later by the caller. Otherwise it works just like a plain signal that emits events from time to time.
+
Note: collectors are allowed only in case of function types whose the return type isn't void for obvious reasons.
To create instances of signal handlers there exist mainly two ways:
+As expected, they offer all the basic functionalities required to know how many listeners they contain (size) or if they contain at least a listener (empty) and even to swap two signal handlers (swap).
Besides them, there are member functions to use both to connect and disconnect listeners in all their forms by means of a sink:
+As shown above, listeners do not have to strictly follow the signature of the signal. As long as a listener can be invoked with the given arguments to yield a result that is convertible to the given result type, everything works just fine.
+Once listeners are attached (or even if there are no listeners at all), events and data in general can be published through a signal by means of the publish member function:
To collect data, the collect member function should be used instead. Below is a minimal example to show how to use it:
A collector must expose a function operator that accepts as an argument a type to which the return type of the listeners can be converted. Moreover, it has to return a boolean value that is false to stop collecting data, true otherwise. This way one can avoid calling all the listeners in case it isn't necessary.
+The event dispatcher class is designed so as to be used in a loop. It allows users both to trigger immediate events or to queue events to be published all together once per tick.
+ This class shares part of its API with the one of the signal handler, but it doesn't require that all the types of events are specified when declared:
In order to register an instance of a class to a dispatcher, its type must expose one or more member functions the arguments of which are such that const E & can be converted to them for each type of event E, no matter what the return value is.
+ The name of the member function aimed to receive the event must be provided to the connect member function of the sink in charge for the specific event:
The disconnect member function follows the same pattern and can be used to selectively remove listeners:
The trigger member function serves the purpose of sending an immediate event to all the listeners registered so far. It offers a convenient approach that relieves users from having to create the event itself. Instead, it's enough to specify the type of event and provide all the parameters required to construct it.
+ As an example:
Listeners are invoked immediately, order of execution isn't guaranteed. This method can be used to push around urgent messages like an is terminating notification on a mobile app.
+On the other hand, the enqueue member function queues messages together and allows to maintain control over the moment they are sent to listeners. The signature of this method is more or less the same of trigger:
Events are stored aside until the update member function is invoked, then all the messages that are still pending are sent to the listeners at once:
This way users can embed the dispatcher in a loop and literally dispatch events once per tick to their systems.
+A general purpose event emitter thought mainly for those cases where it comes to working with asynchronous stuff.
+ Originally designed to fit the requirements of uvw (a wrapper for libuv written in modern C++), it was adapted later to be included in this library.
To create a custom emitter type, derived classes must inherit directly from the base class as:
+The full list of accepted types of events isn't required. Handlers are created internally on the fly and thus each type of event is accepted by default.
+Whenever an event is published, an emitter provides the listeners with a reference to itself along with a const reference to the event. Therefore listeners have an handy way to work with it without incurring in the need of capturing a reference to the emitter itself.
+ In addition, an opaque object is returned each time a connection is established between an emitter and a listener, allowing the caller to disconnect them at a later time.
+ The opaque object used to handle connections is both movable and copyable. On the other side, an event emitter is movable but not copyable by default.
To create new instances of an emitter, no arguments are required:
+Listeners must be movable and callable objects (free functions, lambdas, functors, std::functions, whatever) whose function type is:
Where Event is the type of event they want to listen.
+ There are two ways to attach a listener to an event emitter that differ slightly from each other:
on member function. It is meant to register a listener designed to be invoked more than once for the given event type.The connection object can be freely discarded. Otherwise, it can be used later to disconnect the listener if required.
+once member function. It is meant to register a listener designed to be invoked only once for the given event type. The listener is automatically disconnected after the first invocation.The connection object can be freely discarded. Otherwise, it can be used later to disconnect the listener if required.
+In both cases, the connection object can be used with the erase member function:
There are also two member functions to use either to disconnect all the listeners for a given type of event or to clear the emitter:
+To send an event to all the listeners that are interested in it, the publish member function offers a convenient approach that relieves users from having to create the event:
Finally, the empty member function tests if there exists at least either a listener registered with the event emitter or to a given type of event:
In general, the event emitter is a handy tool when the derived classes wrap asynchronous operations, because it introduces a nice-to-have model based on events and listeners that kindly hides the complexity behind the scenes. However it is not limited to such uses.
+
+ 1.8.13
+
+
+
diff --git a/autotoc_md8.html b/autotoc_md8.html
index 699d95ad5..2aca89993 100644
--- a/autotoc_md8.html
+++ b/autotoc_md8.html
@@ -22,7 +22,7 @@
EnTT is a header-only, tiny and easy to use entity-component system (and much more) written in modern C++.
The entity-component-system (also known as ECS) is an architectural pattern used mostly in game development.
EnTT is a bitset-free entity-component system that doesn't require users to specify the component set at compile-time.
This is why users can instantiate the core class simply like:
In place of its more annoying and error-prone counterpart:
-In place of its more annoying and error-prone counterpart:
+EnTT is entirely designed around the principle that users have to pay only for what they want.
When it comes to using an entity-component system, the tradeoff is usually between performance and memory usage. The faster it is, the more memory it uses. However, slightly worse performance along non-critical paths are the right price to pay to reduce memory usage and I've always wondered why this kind of tools do not leave me the choice.
- EnTT follows a completely different approach. It squeezes the best from the basic data structures and gives users the possibility to pay more for higher performance where needed.
+
When it comes to using an entity-component system, the tradeoff is usually between performance and memory usage. The faster it is, the more memory it uses. Even worse, some approaches tend to heavily affect other functionalities like the construction and destruction of components to favor iterations, even when it isn't strictly required. In fact, slightly worse performance along non-critical paths are the right price to pay to reduce memory usage and have overall better perfomance sometimes and I've always wondered why this kind of tools do not leave me the choice.
+ EnTT follows a completely different approach. It gets the best out from the basic data structures and gives users the possibility to pay more for higher performance where needed.
The disadvantage of this approach is that users need to know the systems they are working on and the tools they are using. Otherwise, the risk to ruin the performance along critical paths is high.
So far, this choice has proven to be a good one and I really hope it can be for many others besides me.
-EnTT is such that at every moment a pair (T *, size) is available to directly access all the instances of a given component type T.
+ This was a guideline and a design decision that influenced many choices, for better and for worse. I cannot say whether it will be useful or not to the reader, but it's worth to mention it, because it's one of the corner stones of this library.
Many of the tools described below, from the registry to the views and up to the groups give the possibility to get this information and have been designed around this need, which was and remains one of my main requirements during the development.
+ The rest is experimentation and the desire to invent something new, hoping to have succeeded.
EnTT is designed so that it can work with stateless systems. In other words, all systems can be free functions and there is no need to define them as classes (although nothing prevents users from doing so).
+ This is possible because the main class with which the users will work provides all what is needed to act as the sole source of truth of an application.
To be honest, this point became part of the design principles at a later date, but has also become one of the cornerstones of the library to date, as stateless systems are widely used and appreciated in general.
+The Registry to store, the views to iterate. That's all.
An entity (the E of an ECS) is an opaque identifier that users should just use as-is and store around if needed. Do not try to inspect an entity identifier, its format can change in future and a registry offers all the functionalities to query them out-of-the-box. The underlying type of an entity (either std::uint16_t, std::uint32_t or std::uint64_t) can be specified when defining a registry (actually the DefaultRegistry is nothing more than a Registry where the type of the entities is std::uint32_t).
+
The registry to store, the views and the groups to iterate. That's all.
+An entity (the E of an ECS) is an opaque identifier that users should just use as-is and store around if needed. Do not try to inspect an entity identifier, its format can change in future and a registry offers all the functionalities to query them out-of-the-box. The underlying type of an entity (either std::uint16_t, std::uint32_t or std::uint64_t) can be specified when defining a registry (actually entt::registry is nothing more than an alias for entt::basic_registry<entt::entity> and entt::entity is an alias for std::uint32_t).
Components (the C of an ECS) should be plain old data structures or more complex and movable data structures with a proper constructor. Actually, the sole requirement of a component type is that it must be both move constructible and move assignable. They are list initialized by using the parameters provided to construct the component itself. No need to register components or their types neither with the registry nor with the entity-component system at all.
- Systems (the S of an ECS) are just plain functions, functors, lambdas or whatever users want. They can accept a Registry or a view of any type and use them the way they prefer. No need to register systems or their types neither with the registry nor with the entity-component system at all.
The following sections will explain in short how to use the entity-component system, the core part of the whole library.
In fact, the project is composed of many other classes in addition to those describe below. For more details, please refer to the inline documentation.
A registry can store and manage entities, as well as create views to iterate the underlying data structures.
- Registry is a class template that lets users decide what's the preferred type to represent an entity. Because std::uint32_t is large enough for almost all the cases, there exists also an alias named DefaultRegistry for Registry<std::uint32_t>.
A registry can store and manage entities, as well as create views and groups to iterate the underlying data structures.
+ The class template basic_registry lets users decide what's the preferred type to represent an entity. Because std::uint32_t is large enough for almost all the cases, there exists also the alias entt::entity for it, as well as the alias entt::registry for entt::basic_registry<entt::entity>.
Entities are represented by entity identifiers. An entity identifier is an opaque type that users should not inspect or modify in any way. It carries information about the entity itself and its version.
-A registry can be used both to construct and destroy entities:
-Entities can also be destroyed by type, that is by specifying the types of the tags or components that identify them:
-When an entity is destroyed, the registry can freely reuse it internally with a slightly different identifier. In particular, the version of an entity is increased each and every time it's discarded.
- In case entity identifiers are stored around, the registry offers all the functionalities required to test them and get out of the them all the information they carry:
A registry can be used both to construct and to destroy entities:
+There exists also an overload of the create and destroy member functions that accepts two iterators, that is a range to assign or to destroy. It can be used to create or destroy multiple entities at once:
In both cases, the create member function accepts also a list of default constructible types of components to assign to the entities before to return. It's a faster alternative to the creation and subsequent assignment of components in separate steps.
When an entity is destroyed, the registry can freely reuse it internally with a slightly different identifier. In particular, the version of an entity is increased each and every time it's discarded.
+ In case entity identifiers are stored around, the registry offers all the functionalities required to test them and to get out of them the information they carry:
Components can be assigned to or removed from entities at any time with a few calls to member functions of the registry. As for the entities, the registry offers also a set of functionalities users can use to work with the components.
The assign member function template creates, initializes and assigns to an entity the given component. It accepts a variable number of arguments to construct the component itself if present:
If an entity already has the given component, the replace member function template can be used to replace it:
In case users want to assign a component to an entity, but it's unknown whether the entity already has it or not, accommodate does the work in a single call (there is a performance penalty to pay for this mainly due to the fact that it has to check if the entity already has the given component or not):
Note that accommodate is a slightly faster alternative for the following if/else statement and nothing more:
As already shown, if in doubt about whether or not an entity has one or more components, the has member function template may be useful:
On the other side, if the goal is to delete a single component, the remove member function template is the way to go when it's certain that the entity owns a copy of the component:
Otherwise consider to use the reset member function. It behaves similarly to remove but with a strictly defined behavior (and a performance penalty is the price to pay for this). In particular it removes the component if and only if it exists, otherwise it returns safely to the caller:
There exist also two other versions of the reset member function:
If an entity already has the given component, the replace member function template can be used to replace it:
In case users want to assign a component to an entity, but it's unknown whether the entity already has it or not, assign_or_replace does the work in a single call (there is a performance penalty to pay for this mainly due to the fact that it has to check if the entity already has the given component or not):
Note that assign_or_replace is a slightly faster alternative for the following if/else statement and nothing more:
As already shown, if in doubt about whether or not an entity has one or more components, the has member function template may be useful:
On the other side, if the goal is to delete a single component, the remove member function template is the way to go when it's certain that the entity owns a copy of the component:
Otherwise consider to use the reset member function. It behaves similarly to remove but with a strictly defined behavior (and a performance penalty is the price to pay for this). In particular it removes the component if and only if it exists, otherwise it returns safely to the caller:
There exist also two other versions of the reset member function:
reset will remove the given component from each entity that has it:Finally, references to components can be retrieved simply by doing this:
-The get member function template gives direct access to the component of an entity stored in the underlying data structures of the registry.
In those cases where all what is needed is a single instance component, tags are the right tool to achieve the purpose.
- Tags undergo the same requirements of components. They can be either plain old data structures or more complex and movable data structures with a proper constructor.
- Actually, the same type can be used both as a tag and as a component and the registry will not complain about it. It is up to users to properly manage their own types. In some cases, the tag tag_t must also be used in order to disambiguate overloads of member functions.
Attaching tags to entities and removing them is trivial:
-In case a tag already has an owner, its content can be updated by means of the replace member function template and the ownership of the tag can be transferred to another entity using the move member function template:
If in doubt about whether or not a tag already has an owner, the has member function template may be useful:
References to tags can be retrieved simply by doing this:
-The get member function template gives direct access to the tag as stored in the underlying data structures of the registry.
As shown above, in almost all the cases the entity identifier isn't required. Since a single instance component can have only one associated entity, it doesn't make much sense to mention it explicitly.
- To find out who the owner is, just do the following:
Note that iterating tags isn't possible for obvious reasons. Tags give direct access to single entities and nothing more.
-The get member function template gives direct access to the component of an entity stored in the underlying data structures of the registry. There exists also an alternative member function named try_get that returns a pointer to the component owned by an entity if any, a null pointer otherwise.
Because of how the registry works internally, it stores a couple of signal handlers for each pool in order to notify some of its data structures on the construction and destruction of components.
- These signal handlers are also exposed and made available to users. This is the basic brick to build fancy things like dependencies and reactive systems.
To get a sink to be used to connect and disconnect listeners so as to be notified on the creation of a component, use the construction member function:
To be notified when components are destroyed, use the destruction member function instead.
The function type of a listener is the same in both cases:
-In other terms, a listener is provided with the registry that triggered the notification and the entity affected by the change. Note also that:
+Because of how the registry works internally, it stores a bunch of signal handlers for each pool in order to notify some of its data structures on the construction and destruction of components or when an instance of a component is explicitly replaced by the user.
+ These signal handlers are also exposed and made available to users. These are the basic bricks to build fancy things like dependencies and reactive systems.
To get a sink to be used to connect and disconnect listeners so as to be notified on the creation of a component, use the on_construct member function:
To be notified when components are destroyed, use the on_destroy member function instead. Finally, the on_replace member function will return a sink to which to connect listeners to observe changes on components.
The function type of a listener for the construction signal should be equivalent to the following:
+Where Component is intuitively the type of component of interest. In other words, a listener is provided with the registry that triggered the notification and the entity affected by the change, in addition to the newly created instance.
+ The sink returned by the on_replace member function accepts listeners the signature of which is the same of that of the construction signal. The one of the destruction signal is also similar, except for the Component parameter:
This is mainly due to performance reasons. While the component is made available after the construction, it is not when destroyed. Because of that, there are no reasons to get it from the underlying storage unless the user requires so. In this case, the registry is made available for the purpose.
+Note also that:
There are also some limitations on what a listener can and cannot do. In particular:
To a certain extent, these limitations do not apply. However, it is risky to try to force them and users should respect the limitations unless they know exactly what they are doing. Subtle bugs are the price to pay in case of errors otherwise.
+To a certain extent, these limitations don't apply. However, it's risky to try to force them and users should respect the limitations unless they know exactly what they are doing. Subtle bugs are the price to pay in case of errors otherwise.
In general, events and therefore listeners must not be used as replacements for systems. They should not contain much logic and interactions with a registry should be kept to a minimum, if possible. Note also that the greater the number of listeners, the greater the performance hit when components are created or destroyed.
-As an extension, signals are also provided with tags. Although they are not strictly required internally, it makes sense that a user expects signal support even when it comes to tags actually.
- Signals for tags undergo exactly the same requirements of those introduced for components. Also the function type for a listener is the same and it's invoked with the same guarantees discussed above.
To get the sinks for a tag just use tag tag_t to disambiguate overloads of member functions as in the following example:
Listeners for tags and components are managed separately and do not influence each other in any case. Therefore, note that the greater the number of listeners for a type, the greater the performance hit when a tag of the given type is created or destroyed.
Defining components at runtime is useful to support plugin systems and mods in general. However, it seems impossible with a tool designed around a bunch of templates. Indeed it's not that difficult.
Of course, some features cannot be easily exported into a runtime environment. As an example, sorting a group of components defined at runtime isn't for free if compared to most of the other operations. However, the basic functionalities of an entity-component system such as EnTT fit the problem perfectly and can also be used to manage runtime components if required.
All that is necessary to do it is to know the identifiers of the components. An identifier is nothing more than a number or similar that can be used at runtime to work with the type system.
In EnTT, identifiers are easily accessible:
Once the identifiers are made available, almost everything becomes pretty simple.
+Once the identifiers are made available, almost everything becomes pretty simple.
EnTT comes with an example (actually a test) that shows how to integrate compile-time and runtime components in a stack based JavaScript environment. It uses Duktape under the hood, mainly because I wanted to learn how it works at the time I was writing the code.
It goes without saying that sorting entities and components is possible with EnTT.
In fact, there are two functions that respond to slightly different needs:
There exists also the possibility to use a custom sort function object, as long as it adheres to the requirements described in the inline documentation.
- This is possible mainly because users can get much more with a custom sort function object if the pattern of usage is known. As an example, in case of an almost sorted pool, quick sort could be much, much slower than insertion sort.
Or by accessing their entities:
+There exists also the possibility to use a custom sort function object, as long as it adheres to the requirements described in the inline documentation.
+ This is possible mainly because users can get much more with a custom sort function object if the usage pattern is known. As an example, in case of an almost sorted pool, quick sort could be much, much slower than insertion sort.
In this case, instances of Movement are arranged in memory so that cache misses are minimized when the two components are iterated together.
In this case, instances of movement are arranged in memory so that cache misses are minimized when the two components are iterated together.
The Registry class offers basic support to serialization.
- It doesn't convert components and tags to bytes directly, there wasn't the need of another tool for serialization out there. Instead, it accepts an opaque object with a suitable interface (namely an archive) to serialize its internal data structures and restore them later. The way types and instances are converted to a bunch of bytes is completely in charge to the archive and thus to final users.
The goal of the serialization part is to allow users to make both a dump of the entire registry or a narrower snapshot, that is to select only the components and the tags in which they are interested.
+
The registry class offers basic support to serialization.
+ It doesn't convert components to bytes directly, there wasn't the need of another tool for serialization out there. Instead, it accepts an opaque object with a suitable interface (namely an archive) to serialize its internal data structures and restore them later. The way types and instances are converted to a bunch of bytes is completely in charge to the archive and thus to final users.
The goal of the serialization part is to allow users to make both a dump of the entire registry or a narrower snapshot, that is to select only the components in which they are interested.
Intuitively, the use cases are different. As an example, the first approach is suitable for local save/restore functionalities while the latter is suitable for creating client-server applications and for transferring somehow parts of the representation side to side.
To take a snapshot of the registry, use the snapshot member function. It returns a temporary object properly initialized to save the whole registry or parts of it.
Example of use:
-It isn't necessary to invoke all these functions each and every time. What functions to use in which case mostly depends on the goal and there is not a golden rule to do that.
+It isn't necessary to invoke all these functions each and every time. What functions to use in which case mostly depends on the goal and there is not a golden rule to do that.
The entities member function asks the registry to serialize all the entities that are still in use along with their versions. On the other side, the destroyed member function tells to the registry to serialize the entities that have been destroyed and are no longer in use.
These two functions can be used to save and restore the whole set of entities with the versions they had during serialization.
The component member function is a function template the aim of which is to store aside components. The presence of a template parameter list is a consequence of a couple of design choices from the past and in the present:
There exists also another version of the component member function that accepts a range of entities to serialize. This version is a bit slower than the other one, mainly because it iterates the range of entities more than once for internal purposes. However, it can be used to filter out those entities that shouldn't be serialized for some reasons.
As an example:
The tag member function is similar to the previous one, apart from the fact that it works with tags and not with components.
- Note also that both component and tag store items along with entities. It means that they work properly without a call to the entities member function.
Note that component stores items along with entities. It means that it works properly without a call to the entities member function.
Once a snapshot is created, there exist mainly two ways to load it: as a whole and in a kind of continuous mode.
The following sections describe both loaders and archives in details.
A snapshot loader requires that the destination registry be empty and loads all the data at once while keeping intact the identifiers that the entities originally had.
- To do that, the registry offers a member function named restore that returns a temporary object properly initialized to restore a snapshot.
loader that returns a temporary object properly initialized to restore a snapshot.
Example of use:
-It isn't necessary to invoke all these functions each and every time. What functions to use in which case mostly depends on the goal and there is not a golden rule to do that. For obvious reasons, what is important is that the data are restored in exactly the same order in which they were serialized.
+It isn't necessary to invoke all these functions each and every time. What functions to use in which case mostly depends on the goal and there is not a golden rule to do that. For obvious reasons, what is important is that the data are restored in exactly the same order in which they were serialized.
The entities and destroyed member functions restore the sets of entities and the versions that the entities originally had at the source.
The component member function restores all and only the components specified and assigns them to the right entities. Note that the template parameter list must be exactly the same used during the serialization. The same applies to the tag member function.
The orphans member function literally destroys those entities that have neither components nor tags. It's usually useless if the snapshot is a full dump of the source. However, in case all the entities are serialized but only few components and tags are saved, it could happen that some of the entities have neither components nor tags once restored. The best users can do to deal with them is to destroy those entities and thus update their versions.
The component member function restores all and only the components specified and assigns them to the right entities. Note that the template parameter list must be exactly the same used during the serialization.
The orphans member function literally destroys those entities that have no components attached. It's usually useless if the snapshot is a full dump of the source. However, in case all the entities are serialized but only few components are saved, it could happen that some of the entities have no components once restored. The best users can do to deal with them is to destroy those entities and thus update their versions.
A continuous loader is designed to load data from a source registry to a (possibly) non-empty destination. The loader can accommodate in a registry more than one snapshot in a sort of continuous loading that updates the destination one step at a time.
- Identifiers that entities originally had are not transferred to the target. Instead, the loader maps remote identifiers to local ones while restoring a snapshot. Because of that, this kind of loader offers a way to update automatically identifiers that are part of components or tags (as an example, as data members or gathered in a container).
+ Identifiers that entities originally had are not transferred to the target. Instead, the loader maps remote identifiers to local ones while restoring a snapshot. Because of that, this kind of loader offers a way to update automatically identifiers that are part of components (as an example, as data members or gathered in a container).
Another difference with the snapshot loader is that the continuous loader does not need to work with the private data structures of a registry. Furthermore, it has an internal state that must persist over time. Therefore, there is no reason to create it by means of a registry, or to limit its lifetime to that of a temporary object.
Example of use:
-It isn't necessary to invoke all these functions each and every time. What functions to use in which case mostly depends on the goal and there is not a golden rule to do that. For obvious reasons, what is important is that the data are restored in exactly the same order in which they were serialized.
+It isn't necessary to invoke all these functions each and every time. What functions to use in which case mostly depends on the goal and there is not a golden rule to do that. For obvious reasons, what is important is that the data are restored in exactly the same order in which they were serialized.
The entities and destroyed member functions restore groups of entities and map each entity to a local counterpart when required. In other terms, for each remote entity identifier not yet registered by the loader, the latter creates a local identifier so that it can keep the local entity in sync with the remote one.
The component and tag member functions restore all and only the components and the tags specified and assign them to the right entities.
- In case the component or the tag contains entities itself (either as data members of type entity_type or as containers of entities), the loader can update them automatically. To do that, it's enough to specify the data members to update as shown in the example.
The orphans member function literally destroys those entities that have neither components nor tags after a restore. It has exactly the same purpose described in the previous section and works the same way.
The component member function restores all and only the components specified and assigns them to the right entities.
+ In case the component contains entities itself (either as data members of type entt::entity or as containers of entities), the loader can update them automatically. To do that, it's enough to specify the data members to update as shown in the example.
The orphans member function literally destroys those entities that have no components after a restore. It has exactly the same purpose described in the previous section and works the same way.
Finally, shrink helps to purge local entities that no longer have a remote conterpart. Users should invoke this member function after restoring each snapshot, unless they know exactly what they are doing.
Where Entity is the type of the entities used by the registry. Note that all the member functions of the snapshot class make also an initial call to this endpoint to save the size of the set they are going to store.
- In addition, an archive must accept a pair of entity and either component or tag for each type to be serialized. Therefore, given a type T, the archive must contain a function call operator with the following signature:
The output archive can freely decide how to serialize the data. The register is not affected at all by the decision.
+Where entt::entity is the type of the entities used by the registry. Note that all the member functions of the snapshot class make also an initial call to this endpoint to save the size of the set they are going to store.
+ In addition, an archive must accept a pair of entity and component for each type to be serialized. Therefore, given a type T, the archive must contain a function call operator with the following signature:
The output archive can freely decide how to serialize the data. The register is not affected at all by the decision.
Where Entity is the type of the entities used by the registry. Each time the function is invoked, the archive must read the next element from the underlying storage and copy it in the given variable. Note that all the member functions of a loader class make also an initial call to this endpoint to read the size of the set they are going to load.
- In addition, the archive must accept a pair of entity and either component or tag for each type to be restored. Therefore, given a type T, the archive must contain a function call operator with the following signature:
Every time such an operator is invoked, the archive must read the next elements from the underlying storage and copy them in the given variables.
+Where entt::entity is the type of the entities used by the registry. Each time the function is invoked, the archive must read the next element from the underlying storage and copy it in the given variable. Note that all the member functions of a loader class make also an initial call to this endpoint to read the size of the set they are going to load.
+ In addition, the archive must accept a pair of entity and component for each type to be restored. Therefore, given a type T, the archive must contain a function call operator with the following signature:
Every time such an operator is invoked, the archive must read the next elements from the underlying storage and copy them in the given variables.
EnTT comes with some examples (actually some tests) that show how to integrate a well known library for serialization as an archive. It uses Cereal C++ under the hood, mainly because I wanted to learn how it works at the time I was writing the code.
A prototype defines a type of an application in terms of its parts. They can be used to assign components to entities of a registry at once.
Roughly speaking, in most cases prototypes can be considered just as templates to use to initialize entities according to concepts. In fact, users can create how many prototypes they want, each one initialized differently from the others.
The following is an example of use of a prototype:
-To assign and remove components from a prototype, it offers two dedicated member functions named set and unset. The has member function can be used to know if a given prototype contains one or more components and the get member function can be used to retrieve the components.
To assign and remove components from a prototype, it offers two dedicated member functions named set and unset. The has member function can be used to know if a given prototype contains one or more components and the get member function can be used to retrieve the components.
Creating an entity from a prototype is straightforward:
operator() directly with the entity identifier: operator() directly with the entity identifier: In the examples above, the prototype uses its underlying registry to create entities and components both for its purposes and when it's cloned. To use a different repository to clone a prototype, all the member functions accept also a reference to a valid registry as a first argument.
Prototypes are a very useful tool that can save a lot of typing sometimes. Furthermore, the codebase may be easier to maintain, since updating a prototype is much less error prone than jumping around in the codebase to update all the snippets copied and pasted around to initialize entities and components.
@@ -268,188 +265,183 @@ HelpersA dependency function is a predefined listener, actually a function template to use to automatically assign components to an entity when a type has a dependency on some other types.
- The following adds components AType and AnotherType whenever MyType is assigned to an entity:
A component is assigned to an entity and thus default initialized only in case the entity itself hasn't it yet. It means that already existent components won't be overriden.
+ The following adds components a_type and another_type whenever my_type is assigned to an entity:
A component is assigned to an entity and thus default initialized only in case the entity itself hasn't it yet. It means that already existent components won't be overriden.
A dependency can easily be broken by means of the following function template:
There's nothing magical about the way labels can be assigned to entities while avoiding a performance hit at runtime. Nonetheless, the syntax can be annoying and that's why a more user-friendly shortcut is provided to do it.
- This shortcut is the alias template entt::label.
If used in combination with hashed strings, it helps to use labels where types would be required otherwise. As an example:
-There's nothing magical about the way tags can be assigned to entities while avoiding a performance hit at runtime. Nonetheless, the syntax can be annoying and that's why a more user-friendly shortcut is provided to do it.
+ This shortcut is the alias template entt::tag.
If used in combination with hashed strings, it helps to use tags where types would be required otherwise. As an example:
+In EnTT, there exists a sort of null entity made available to users that is accessible via the entt::null variable.
The library guarantees that the following expression always returns false:
In other terms, a registry will reject the null entity in all cases because it isn't considered valid. It means that the null entity cannot own components or tags for obvious reasons.
+
In other terms, a registry will reject the null entity in all cases because it isn't considered valid. It means that the null entity cannot own components for obvious reasons.
The type of the null entity is internal and should not be used for any purpose other than defining the null entity itself. However, there exist implicit conversions from the null entity to identifiers of any allowed type:
Similarly, the null entity can be compared to any other identifier:
-First of all, it is worth answering an obvious question: why views?
- Roughly speaking, they are a good tool to enforce single responsibility. A system that has access to a registry can create and destroy entities, as well as assign and remove components. On the other side, a system that has access to a view can only iterate entities and their components, then read or update the data members of the latter.
+
Similarly, the null entity can be compared to any other identifier:
+It is often convenient to assign context variables to a registry, so as to make it the only source of truth of an application.
+ This is possible by means of a member function named set to use to create a context variable from a given type. Later on, either ctx or try_ctx can be used to retrieve the newly created instance and unset is there to literally reset it if needed.
Example of use:
+The type of a context variable must be such that it's default constructible and can be moved. The set member function either creates a new instance of the context variable or overwrites an already existing one if any. The try_ctx member function returns a pointer to the context variable if it exists, otherwise it returns a null pointer. This fits well with the if statement with initializer.
First of all, it is worth answering an obvious question: why views and groups?
+ Briefly, they are a good tool to enforce single responsibility. A system that has access to a registry can create and destroy entities, as well as assign and remove components. On the other side, a system that has access to a view or a group can only iterate entities and their components, then read or update the data members of the latter.
It is a subtle difference that can help designing a better software sometimes.
There are mainly four kinds of views: standard (also known as View), persistent (also known as PersistentView), raw (also known as RawView) and runtime (also known as RuntimeView).
- All of them have pros and cons to take in consideration. In particular:
Standard views:
-Pros:
Cons:
Persistent views:
-Pros:
Cons:
Raw views:
-Pros:
Cons:
Runtime views:
-Pros:
Cons:
To sum up and as a rule of thumb:
-To easily iterate entities and components, all the views offer the common begin and end member functions that allow users to use a view in a typical range-for loop. Almost all the views offer also a more functional each member function that accepts a callback for convenience.
- Continue reading for more details or refer to the inline documentation.
A standard view behaves differently if it's constructed for a single component or if it has been requested to iterate multiple components. Even the API is different in the two cases.
- All that they share is the way they are created by means of a registry:
For all that remains, it's worth discussing them separately.
-
Single component standard views are specialized in order to give a boost in terms of performance in all the situation. This kind of views can access the underlying data structures directly and avoid superfluous checks.
- They offer a bunch of functionalities to get the number of entities they are going to return and a raw access to the entity list as well as to the component list. It's also possible to ask a view if it contains a given entity.
+
More in details, views are a non-intrusive tool to access entities and components without affecting other functionalities or increasing the memory consumption. On the other side, groups are an intrusive tool that allows to reach higher performance along critical paths but has also a price to pay for that.
+There are mainly two kinds of views: compile-time (also known as view) and runtime (also known as runtime_view).
+ The former require that users indicate at compile-time what are the components involved and can make several optimizations because of that. The latter can be constructed at runtime instead and are a bit slower to iterate entities and components.
+ In both cases, creating and destroying a view isn't expensive at all because views don't have any type of initialization. Moreover, views don't affect any other functionality of the registry and keep memory usage at a minimum.
Groups come in three different flavors: full-owning groups, partial-owning groups and non-owning groups. The main difference between them is in terms of performance.
+ Groups can literally own one or more types of components. It means that they will be allowed to rearrange pools so as to speed up iterations. Roughly speaking: the more components a group owns, the faster it is to iterate them. On the other side, a given component can belong only to one group, so users have to define groups carefully to get the best out of them.
Continue reading for more details or refer to the inline documentation.
+A view behaves differently if it's constructed for a single component or if it has been created to iterate multiple components. Even the API is slightly different in the two cases.
+Single component views are specialized in order to give a boost in terms of performance in all the situations. This kind of views can access the underlying data structures directly and avoid superfluous checks. There is nothing as fast as a single component view. In fact, they walk through a packed array of components and return them one at a time.
+ Single component views offer a bunch of functionalities to get the number of entities they are going to return and a raw access to the entity list as well as to the component list. It's also possible to ask a view if it contains a given entity.
Refer to the inline documentation for all the details.
There is no need to store views around for they are extremely cheap to construct, even though they can be copied without problems and reused freely. In fact, they return newly created and correctly initialized iterators whenever begin or end are invoked.
- To iterate a single component standard view, either use it in a range-for loop:
Or rely on the each member function to iterate entities and get all their components at once:
The each member function is highly optimized. Unless users want to iterate only entities, using each should be the preferred approach.
Note: prefer the get member function of a view instead of the get member function template of a registry during iterations, if possible. However, keep in mind that it works only with the components of the view itself.
Multi component standard views iterate entities that have at least all the given components in their bags. During construction, these views look at the number of entities available for each component and pick up a reference to the smallest set of candidates in order to speed up iterations.
- They offer fewer functionalities than their companion views for single component. In particular, a multi component standard view exposes utility functions to get the estimated number of entities it is going to return and to know whether it's empty or not. It's also possible to ask a view if it contains a given entity.
+
Multi component views iterate entities that have at least all the given components in their bags. During construction, these views look at the number of entities available for each component and pick up a reference to the smallest set of candidates in order to speed up iterations.
+ They offer fewer functionalities than their companion views for single component. In particular, a multi component view exposes utility functions to get the estimated number of entities it is going to return and to know whether it's empty or not. It's also possible to ask a view if it contains a given entity.
Refer to the inline documentation for all the details.
There is no need to store views around for they are extremely cheap to construct, even though they can be copied without problems and reused freely. In fact, they return newly created and correctly initialized iterators whenever begin or end are invoked.
- To iterate a multi component standard view, either use it in a range-for loop:
Or rely on the each member function to iterate entities and get all their components at once:
The each member function is highly optimized. Unless users want to iterate only entities or get only some of the components, using each should be the preferred approach.
Note: prefer the get member function of a view instead of the get member function template of a registry during iterations, if possible. However, keep in mind that it works only with the components of the view itself.
A persistent view returns all the 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.
- In general, persistent views don't stay true to the order of any set of components unless users explicitly sort them.
Persistent views can be used only to iterate multiple components. To create this kind of views, the tag persistent_t must also be used in order to disambiguate overloads of the view member function:
There is no need to store views around for they are extremely cheap to construct, even though they can be copied without problems and reused freely. In fact, they return newly created and correctly initialized iterators whenever begin or end are invoked.
- That being said, persistent views perform an initialization step the very first time they are constructed and this could be quite costly. To avoid it, consider asking to the registry to prepare them when no entities have been created yet:
If the registry is empty, preparation is extremely fast. Moreover the prepare member function template is idempotent. Feel free to invoke it even more than once: if the view has been already prepared before, the function returns immediately and does nothing.
A persistent view offers a bunch of functionalities to get the number of entities it's going to return, a raw access to the entity list and the possibility to sort the underlying data structures according to the order of one of the components for which it has been constructed. It's also possible to ask a view if it contains a given entity.
- Refer to the inline documentation for all the details.
To iterate a persistent view, either use it in a range-for loop:
-Or rely on the each member function to iterate entities and get all their components at once:
Performance are more or less the same. The best approach depends mainly on whether all the components have to be accessed or not.
-Note: prefer the get member function of a view instead of the get member function template of a registry during iterations, if possible. However, keep in mind that it works only with the components of the view itself.
Raw views return all the components of a given type. This kind of views can access components directly and avoid extra indirections like when components are accessed via an entity identifier.
- They offer a bunch of functionalities to get the number of instances they are going to return and a raw access to the entity list as well as to the component list.
- Refer to the inline documentation for all the details.
Raw views can be used only to iterate components for a single type. To create this kind of views, the tag raw_t must also be used in order to disambiguate overloads of the view member function:
There is no need to store views around for they are extremely cheap to construct, even though they can be copied without problems and reused freely. In fact, they return newly created and correctly initialized iterators whenever begin or end are invoked.
- To iterate a raw view, use it in a range-for loop:
Or rely on the each member function:
Performance are exactly the same in both cases.
-Note: raw views don't have a get member function for obvious reasons.
There is no need to store views around for they are extremely cheap to construct, even though they can be copied without problems and reused freely. Views also return newly created and correctly initialized iterators whenever begin or end are invoked.
Views share the way they are created by means of a registry:
+To iterate a view, either use it in a range-for loop:
+Or rely on the each member function to iterate entities and get all their components at once:
The each member function is highly optimized. Unless users want to iterate only entities or get only some of the components, this should be the preferred approach. Note that the entity can also be excluded from the parameter list if not required, but this won't improve performance for multi component views.
As a side note, when using a single component view, the most common error is to invoke get with the type of the component as a template parameter. This is probably due to the fact that it's required for multi component views:
However, in case of a single component view, get doesn't accept a template parameter, since it's implicitly defined by the view itself:
Note: prefer the get member function of a view instead of the get member function template of a registry during iterations, if possible. However, keep in mind that it works only with the components of the view itself.
Runtime views iterate entities that have at least all the given components in their bags. During construction, these views look at the number of entities available for each component and pick up a reference to the smallest set of candidates in order to speed up iterations.
- They offer more or less the same functionalities of a multi component standard view. However, they don't expose a get member function and users should refer to the registry that generated the view to access components. In particular, a runtime view exposes utility functions to get the estimated number of entities it is going to return and to know whether it's empty or not. It's also possible to ask a view if it contains a given entity.
+ They offer more or less the same functionalities of a multi component view. However, they don't expose a get member function and users should refer to the registry that generated the view to access components. In particular, a runtime view exposes utility functions to get the estimated number of entities it is going to return and to know whether it's empty or not. It's also possible to ask a runtime view if it contains a given entity.
Refer to the inline documentation for all the details.
Runtime view are extremely cheap to construct and should not be stored around in any case. They should be used immediately after creation and then they should be thrown away. The reasons for this go far beyond the scope of this document.
To iterate a runtime view, either use it in a range-for loop:
Or rely on the each member function to iterate entities:
Performance are exactly the same in both cases.
+Or rely on the each member function to iterate entities:
Performance are exactly the same in both cases.
Note: runtime views are meant for all those cases where users don't know at compile-time what components to use to iterate entities. This is particularly well suited to plugin systems and mods in general. Where possible, don't use runtime views, as their performance are slightly inferior to those of the other views.
-Groups are meant to iterate multiple components at once and offer a faster alternative to views. Roughly speaking, they just play in another league when compared to views.
+ 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, 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.
+ The most interesting aspect of groups is that they fit usage patterns. Other solutions around usually try to optimize everything, because it is known that somewhere within the everything there are also our usage patterns. However this has a cost that isn't negligible, both in terms of performance and memory usage. Ironically, users pay the price also for things they don't want and this isn't something I like much. Even worse, one cannot easily disable such a behavior. Groups work differently instead and are designed to optimize only the real use cases when users find they need to.
+ Another nice-to-have feature of groups is that they have no impact on memory consumption, put aside full non-owning groups that are pretty rare and should be avoided as long as possible.
All groups affect to an extent the creation and destruction of their components. This is due to the fact that they must observe changes in the pools of interest and arrange data correctly when needed for the types they own.
+ That being said, the way groups operate is beyond the scope of this document. However, it's unlikely that users will be able to appreciate the impact of groups on other functionalities of the registry.
Groups offer a bunch of functionalities to get the number of entities they are going to return and a raw access to the entity list as well as to the component list for owned components. It's also possible to ask a group if it contains a given entity.
+ Refer to the inline documentation for all the details.
There is no need to store groups around for they are extremely cheap to construct, even though they can be copied without problems and reused freely. A group performs an initialization step the very first time it's requested and this could be quite costly. To avoid it, consider creating the group when no components have been assigned yet. If the registry is empty, preparation is extremely fast. Groups also return newly created and correctly initialized iterators whenever begin or end are invoked.
To iterate groups, either use them in a range-for loop:
+Or rely on the each member function to iterate entities and get all their components at once:
The each member function is highly optimized. Unless users want to iterate only entities, this should be the preferred approach. Note that the entity can also be excluded from the parameter list if not required and it can improve even further the performance during iterations.
Note: prefer the get member function of a group instead of the get member function template of a registry during iterations, if possible. However, keep in mind that it works only with the components of the group itself.
Let's go a bit deeper into the different types of groups made available by this library to know how they are constructed and what are the differences between them.
+A full-owning group is the fastest tool an user can expect to use to iterate multiple components at once. It iterates all the components directly, no indirection required. This type of groups performs more or less as if users are accessing sequentially a bunch of packed arrays of components all sorted identically.
+A full-owning group is created as:
+Filtering entities by components is also supported:
+Once created, the group gets the ownership of all the components specified in the template parameter list and arranges their pools so as to iterate all of them as fast as possible.
+Sorting owned components is no longer allowed once the group has been created. However, full-owning groups can be sorted by means of their sort member functions, if required. Sorting a full-owning group affects all the instance of the same group (it means that users don't have to call sort on each instance to sort all of them because they share the underlying data structure).
A partial-owning group works similarly to a full-owning group for the components it owns, but relies on indirection to get components owned by other groups. This isn't as fast as a full-owning group, but it's already much faster than views when there are only one or two free components to retrieve (the most common cases likely). In the worst case, it's not slower than views anyway.
+A partial-owning group is created as:
+Filtering entities by components is also supported:
+Once created, the group gets the ownership of all the components specified in the template parameter list and arranges their pools so as to iterate all of them as fast as possible. The ownership of the types provided via entt::get doesn't pass to the group instead.
Sorting owned components is no longer allowed once the group has been created. However, partial-owning groups can be sorted by means of their sort member functions, if required. Sorting a partial-owning group affects all the instance of the same group (it means that users don't have to call sort on each instance to sort all of them because they share the underlying data structure).
Non-owning groups are usually fast enough, for sure faster than views and well suited for most of the cases. However, they require custom data structures to work properly and they increase memory consumption. As a rule of thumb, users should avoid using non-owning groups, if possible.
+A non-owning group is created as:
+Filtering entities by components is also supported:
+The group doesn't receive the ownership of any type of component in this case. This type of groups is therefore the least performing in general, but also the only one that can be used in any situation to improve a performance where necessary.
+Non-owning groups can be sorted by means of their sort member functions, if required. Sorting a non-owning group affects all the instance of the same group (it means that users don't have to call sort on each instance to sort all of them because they share the set of entities).
The registry class offers two overloads when it comes to constructing views and groups: a const version and a non-const one. The former accepts both const and non-const types as template parameters, the latter accepts only const types instead.
+ It means that views and groups can be constructed also from a const registry and they propagate the constness of the registry to the types involved. As an example:
Consider the following definition for a non-const view instead:
+In the example above, view can be used to access either read-only or writable position components while velocity components are read-only in all cases.
+ In other terms, these statements are all valid:
It's not possible to get non-const references to velocity components from the same view instead and these will result in compilation errors:
Similarly, the each member functions will propagate constness to the type of the components returned during iterations:
Obviously, a caller can still refer to the position components through a const reference because of the rules of the language that fortunately already allow it.
The same concepts apply to groups as well.
+Views are narrow windows on the entire list of entities. They work by filtering entities according to their components.
+
Views and groups are narrow windows on the entire list of entities. They work by filtering entities according to their components.
In some cases there may be the need to iterate all the entities still in use regardless of their components. The registry offers a specific member function to do that:
It returns to the caller all the entities that are still in use by means of the given function.
- As a rule of thumb, consider using a view if the goal is to iterate entities that have a determinate set of components. A view is usually much faster than combining this function with a bunch of custom tests.
+
It returns to the caller all the entities that are still in use by means of the given function.
+ As a rule of thumb, consider using a view or a group if the goal is to iterate entities that have a determinate set of components. These tools are usually much faster than combining this function with a bunch of custom tests.
In all the other cases, this is the way to go.
There exists also another member function to use to retrieve orphans. An orphan is an entity that is still in use and has neither assigned components nor tags.
+
There exists also another member function to use to retrieve orphans. An orphan is an entity that is still in use and has no assigned components.
The signature of the function is the same of each:
To test the orphanity of a single entity, use the member function orphan instead. It accepts a valid entity identifer as an argument and returns true in case the entity is an orphan, false otherwise.
To test the orphanity of a single entity, use the member function orphan instead. It accepts a valid entity identifer as an argument and returns true in case the entity is an orphan, false otherwise.
In general, all these functions can result in poor performance.
each is fairly slow because of some checks it performs on each and every entity. For similar reasons, orphans can be even slower. Both functions should not be used frequently to avoid the risk of a performance hit.
Most of the ECS available out there have some annoying limitations (at least from my point of view): entities and components cannot be created nor destroyed during iterations.
+
Most of the ECS available out there don't allow to create and destroy entities and components during iterations.
EnTT partially solves the problem with a few limitations:
Iterators are invalidated and the behavior is undefined if an entity is modified or destroyed and it's not the one currently returned by the view nor a newly created one.
+
In these cases, iterators aren't invalidated. To be clear, it doesn't mean that also references will continue to be valid.
+ Consider the following example:
The each member function won't break (because iterators aren't invalidated) but there are no guarantees on references. Use a common range-for loop and get components directly from the view or move the creation of components at the end of the function to avoid dangling pointers.
Iterators are invalidated instead and the behavior is undefined if an entity is modified or destroyed and it's not the one currently returned by the iterator nor a newly created one.
To work around it, possible approaches are:
A notable side effect of this feature is that the number of required allocations is further reduced in most of the cases.
-Groups are a (much) faster alternative to views. However, the higher the performance, the greater the constraints on what is allowed and what is not.
+ In particular, groups add in some rare cases a limitation on the creation of components during iterations. It happens in quite particular cases. Given the nature and the scope of the groups, it isn't something in which it will happen to come across probably, but it's good to know it anyway.
First of all, it must be said that creating components while iterating a group isn't a problem at all and can be done freely as it happens with the views. The same applies to the destruction of components and entities, for which the rules mentioned above apply.
+The additional limitation pops out instead when a given component that is owned by a group is iterated outside of it. In this case, adding components that are part of the group itself may invalidate the iterators. There are no further limitations to the destruction of components and entities.
+ Fortunately, this isn't always true. In fact, it almost never is and this happens only under certain conditions. In particular:
In other words, the limitation doesn't exist as long as a type is treated as a free type (as an example with multi component views and partial- or non-owning groups) or iterated with its own group, but it can occur if the type is used as a main type to rule on an iteration.
+ This happens because groups own the pools of their components and organize the data internally to maximize performance. Because of that, full consistency for owned components is guaranteed only when they are iterated as part of their groups or as free types with multi component views and groups in general.
An empty type T is such that std::is_empty_v<T> returns true. They are also the same types for which empty base optimization (EBO) is possibile.
+ EnTT handles these types in a special way, optimizing both in terms of performance and memory usage. However, this also has consequences that are worth mentioning.
When an empty type is detected, it's not instantiated in any case. Therefore, only the entities to which it's assigned are made available. All the iterators as well as the get member functions of the registry, the views and the groups will return temporary objects. Similarly, some functions such as try_get or the raw access to the list of components aren't available for this kind of types.
+ On the other hand, iterations are faster because only the entities to which the type is assigned are considered. Moreover, less memory is used, since there doesn't exist any instance of the component, no matter how many entities it is assigned to.
For similar reasons, wherever a function type of a listener accepts a component, it cannot be caught by a non-const reference. Capture it by copy or by const reference instead.
+More in general, none of the features offered by the library is affected, but for the ones that require to return actual instances.
+In general, the entire registry isn't thread safe as it is. Thread safety isn't something that users should want out of the box for several reasons. Just to mention one of them: performance.
- Views and consequently the approach adopted by EnTT are the great exception to the rule. It's true that views and thus their iterators aren't thread safe by themselves. Because of this users shouldn't try to iterate a set of components and modify the same set concurrently. However:
EnTT are the great exception to the rule. It's true that views, groups and iterators in general aren't thread safe by themselves. Because of this users shouldn't try to iterate a set of components and modify the same set concurrently. However:
X or assign and removes that component from a set of entities, another thread can safely do the same with components Y and Z and everything will work like a charm. As a trivial example, users can freely execute the rendering system and iterate the renderable entities while updating a physic component concurrently on a separate thread.This kind of entity-component systems can be used in single threaded applications as well as along with async stuff or multiple threads. Moreover, typical thread based models for ECS don't require a fully thread safe registry to work. Actually, users can reach the goal with the registry as it is while working with most of the common models.
-Because of the few reasons mentioned above and many others not mentioned, users are completely responsible for synchronization whether required. On the other hand, they could get away with it without having to resort to particular expedients.
+Because of the few reasons mentioned above and many others not mentioned, users are completely responsible for synchronization whether required. On the other hand, they could get away with it without having to resort to particular expedients.
+A special mention is needed for the iterators returned by the views and the groups. Most of the time they meet the requirements of random access iterators, in all cases they meet at least the requirements of forward iterators.
+ In other terms, they are suitable for use with the parallel algorithms of the standard library. If it's not clear, this is a great thing.
As an example, this kind of iterators can be used in combination with std::for_each and std::execution::par to parallelize the visit and therefore the update of the components returned by a view or a group, as long as the constraints previously discussed are respected:
This can increase the throughput considerably, even without resorting to who knows what artifacts that are difficult to maintain over time.
+Unfortunately, because of the limitations of the current revision of the standard, the parallel std::for_each accepts only forward iterators. This means that the iterators provided by the library cannot return proxy objects as references and must return actual reference types instead.
+ This may change in the future and the iterators will almost certainly return both the entities and a list of references to their components sooner or later. Multi-pass guarantee won't break in any case and the performance should even benefit from it further.
|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::Attachee< Entity, Type >, including all inherited members.
-| Attachee() ENTT_NOEXCEPT=default | entt::Attachee< Entity, Type > | |
| Attachee(const Attachee &)=delete | entt::Attachee< Entity, Type > | |
| Attachee(Attachee &&)=delete | entt::Attachee< Entity, Type > | |
| construct(entity_type entity, Args &&... args) ENTT_NOEXCEPT | entt::Attachee< Entity, Type > | inline |
| entt::Attachee< Entity >::construct(const entity_type entity) ENTT_NOEXCEPT | entt::Attachee< Entity > | inline |
| destroy() ENTT_NOEXCEPT override | entt::Attachee< Entity, Type > | inlinevirtual |
| entity_type typedef | entt::Attachee< Entity, Type > | |
| get() const ENTT_NOEXCEPT | entt::Attachee< Entity, Type > | inline |
| get() ENTT_NOEXCEPT | entt::Attachee< Entity, Type > | inline |
| move(const entity_type entity) ENTT_NOEXCEPT | entt::Attachee< Entity, Type > | inline |
| object_type typedef | entt::Attachee< Entity, Type > | |
| operator=(const Attachee &)=delete | entt::Attachee< Entity, Type > | |
| operator=(Attachee &&)=delete | entt::Attachee< Entity, Type > | |
| ~Attachee() | entt::Attachee< Entity, Type > | inlinevirtual |
- 1.8.13
-
-
-
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4.html b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4.html
deleted file mode 100644
index f865cf463..000000000
--- a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4.html
+++ /dev/null
@@ -1,472 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Extended attachee implementation. - More...
- -#include <attachee.hpp>


-Public Types | |
| -using | object_type = Type |
| Type of the object associated to the attachee. | |
| -using | entity_type = typename underlying_type::entity_type |
| Underlying entity identifier. | |
Public Types inherited from entt::Attachee< Entity > | |
| -using | entity_type = Entity |
| Underlying entity identifier. | |
-Public Member Functions | |
| - | Attachee () ENTT_NOEXCEPT=default |
| Default constructor. | |
| - | Attachee (const Attachee &)=delete |
| Copying an attachee isn't allowed. | |
| - | Attachee (Attachee &&)=delete |
| Moving an attachee isn't allowed. | |
| Attachee & | operator= (const Attachee &)=delete |
| Copying an attachee isn't allowed. More... | |
| Attachee & | operator= (Attachee &&)=delete |
| Moving an attachee isn't allowed. More... | |
| - | ~Attachee () |
| Default destructor. | |
| const Type & | get () const ENTT_NOEXCEPT |
| Returns the object associated to an attachee. More... | |
| Type & | get () ENTT_NOEXCEPT |
| Returns the object associated to an attachee. More... | |
| template<typename... Args> | |
| Type & | construct (entity_type entity, Args &&... args) ENTT_NOEXCEPT |
| Assigns an entity to an attachee and constructs its object. More... | |
| void | destroy () ENTT_NOEXCEPT override |
| Removes an entity from an attachee and destroies its object. More... | |
| void | move (const entity_type entity) ENTT_NOEXCEPT |
| Changes the owner of an attachee. More... | |
Public Member Functions inherited from entt::Attachee< Entity > | |
| - | Attachee () ENTT_NOEXCEPT |
| Default constructor. | |
| - | Attachee (const Attachee &)=default |
| Default copy constructor. | |
| - | Attachee (Attachee &&)=default |
| Default move constructor. | |
| Attachee & | operator= (const Attachee &)=default |
| Default copy assignment operator. More... | |
| Attachee & | operator= (Attachee &&)=default |
| Default move assignment operator. More... | |
| entity_type | get () const ENTT_NOEXCEPT |
| Returns the owner of an attachee. More... | |
| void | construct (const entity_type entity) ENTT_NOEXCEPT |
| Assigns an entity to an attachee. More... | |
Extended attachee implementation.
-This specialization of an attachee associates an object to an entity. The main purpose of this class is to use attachees to store tags in a Registry. It guarantees fast access both to the element and to the entity.
-| Entity | A valid entity type (see entt_traits for more details). |
| Type | Type of object assigned to the entity. |
Definition at line 112 of file attachee.hpp.
-
-
|
- -inline | -
Assigns an entity to an attachee and constructs its object.
-| Args | Types of arguments to use to construct the object. |
| entity | A valid entity identifier. |
| args | Parameters to use to construct an object for the entity. |
Definition at line 185 of file attachee.hpp.
- -
-
|
- -inlineoverridevirtual | -
Removes an entity from an attachee and destroies its object.
-Reimplemented from entt::Attachee< Entity >.
- -Definition at line 199 of file attachee.hpp.
- -
-
|
- -inline | -
Returns the object associated to an attachee.
-Definition at line 151 of file attachee.hpp.
- -
-
|
- -inline | -
Returns the object associated to an attachee.
-Definition at line 166 of file attachee.hpp.
- -
-
|
- -inline | -
Changes the owner of an attachee.
-The ownership of the attachee is transferred from one entity to another.
-| entity | A valid entity identifier. |
Definition at line 217 of file attachee.hpp.
- -
-
|
- -delete | -
Copying an attachee isn't allowed.
-
-
|
- -delete | -
Moving an attachee isn't allowed.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.map b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.map
deleted file mode 100644
index d082ee3e2..000000000
--- a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.map
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.md5 b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.md5
deleted file mode 100644
index 8ad7cbd0c..000000000
--- a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-2fd30cf67acfb8c69efa7822cb51703e
\ No newline at end of file
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.png b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.png
deleted file mode 100644
index c94746720..000000000
Binary files a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.png and /dev/null differ
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.map b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.map
deleted file mode 100644
index d082ee3e2..000000000
--- a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.map
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.md5 b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.md5
deleted file mode 100644
index 42196e769..000000000
--- a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-cd0c4f7a89b236495fb5929f2aa13015
\ No newline at end of file
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.png b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.png
deleted file mode 100644
index c94746720..000000000
Binary files a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.png and /dev/null differ
diff --git a/classentt_1_1Attachee_3_01Entity_01_4-members.html b/classentt_1_1Attachee_3_01Entity_01_4-members.html
deleted file mode 100644
index 519157fd7..000000000
--- a/classentt_1_1Attachee_3_01Entity_01_4-members.html
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::Attachee< Entity >, including all inherited members.
-| Attachee() ENTT_NOEXCEPT | entt::Attachee< Entity > | inline |
| Attachee(const Attachee &)=default | entt::Attachee< Entity > | |
| Attachee(Attachee &&)=default | entt::Attachee< Entity > | |
| construct(const entity_type entity) ENTT_NOEXCEPT | entt::Attachee< Entity > | inline |
| destroy() ENTT_NOEXCEPT | entt::Attachee< Entity > | inlinevirtual |
| entity_type typedef | entt::Attachee< Entity > | |
| get() const ENTT_NOEXCEPT | entt::Attachee< Entity > | inline |
| operator=(const Attachee &)=default | entt::Attachee< Entity > | |
| operator=(Attachee &&)=default | entt::Attachee< Entity > | |
| ~Attachee() ENTT_NOEXCEPT=default | entt::Attachee< Entity > | virtual |
- 1.8.13
-
-
-
diff --git a/classentt_1_1Attachee_3_01Entity_01_4.html b/classentt_1_1Attachee_3_01Entity_01_4.html
deleted file mode 100644
index 741967c57..000000000
--- a/classentt_1_1Attachee_3_01Entity_01_4.html
+++ /dev/null
@@ -1,324 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Basic attachee implementation. - More...
- -#include <attachee.hpp>

-Public Types | |
| -using | entity_type = Entity |
| Underlying entity identifier. | |
-Public Member Functions | |
| - | Attachee () ENTT_NOEXCEPT |
| Default constructor. | |
| - | Attachee (const Attachee &)=default |
| Default copy constructor. | |
| - | Attachee (Attachee &&)=default |
| Default move constructor. | |
| Attachee & | operator= (const Attachee &)=default |
| Default copy assignment operator. More... | |
| Attachee & | operator= (Attachee &&)=default |
| Default move assignment operator. More... | |
| -virtual | ~Attachee () ENTT_NOEXCEPT=default |
| Default destructor. | |
| entity_type | get () const ENTT_NOEXCEPT |
| Returns the owner of an attachee. More... | |
| void | construct (const entity_type entity) ENTT_NOEXCEPT |
| Assigns an entity to an attachee. More... | |
| virtual void | destroy () ENTT_NOEXCEPT |
| Removes an entity from an attachee. More... | |
Basic attachee implementation.
-Convenience data structure used to store single instance components.
-| Entity | A valid entity type (see entt_traits for more details). |
Definition at line 33 of file attachee.hpp.
-
-
|
- -inline | -
Assigns an entity to an attachee.
-| entity | A valid entity identifier. |
Definition at line 76 of file attachee.hpp.
- -
-
|
- -inlinevirtual | -
Removes an entity from an attachee.
-Reimplemented in entt::Attachee< Entity, Type >.
- -Definition at line 89 of file attachee.hpp.
- -
-
|
- -inline | -
Returns the owner of an attachee.
-Definition at line 61 of file attachee.hpp.
- -
-
|
- -default | -
Default copy assignment operator.
-
-
|
- -default | -
Default move assignment operator.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.map b/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.map
deleted file mode 100644
index ef4fa59fd..000000000
--- a/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.map
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.md5 b/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.md5
deleted file mode 100644
index a89cd2b56..000000000
--- a/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-8c21d26f3e6d0119d1531c2ad74b3eaf
\ No newline at end of file
diff --git a/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.png b/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.png
deleted file mode 100644
index 67ca68fa0..000000000
Binary files a/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.png and /dev/null differ
diff --git a/classentt_1_1ContinuousLoader-members.html b/classentt_1_1ContinuousLoader-members.html
deleted file mode 100644
index 53c15591f..000000000
--- a/classentt_1_1ContinuousLoader-members.html
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::ContinuousLoader< Entity >, including all inherited members.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1ContinuousLoader.html b/classentt_1_1ContinuousLoader.html
deleted file mode 100644
index da9dc4cbc..000000000
--- a/classentt_1_1ContinuousLoader.html
+++ /dev/null
@@ -1,633 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Utility class for continuous loading. - More...
- -#include <snapshot.hpp>
-Public Types | |
| -using | entity_type = Entity |
| Underlying entity identifier. | |
-Public Member Functions | |
| ContinuousLoader (Registry< entity_type > ®istry) ENTT_NOEXCEPT | |
| Constructs a loader that is bound to a given registry. More... | |
| - | ContinuousLoader (const ContinuousLoader &)=delete |
| Copying a snapshot loader isn't allowed. | |
| - | ContinuousLoader (ContinuousLoader &&)=default |
| Default move constructor. | |
| ContinuousLoader & | operator= (const ContinuousLoader &)=delete |
| Copying a snapshot loader isn't allowed. More... | |
| ContinuousLoader & | operator= (ContinuousLoader &&)=default |
| Default move assignment operator. More... | |
| template<typename Archive > | |
| ContinuousLoader & | entities (Archive &archive) |
| Restores entities that were in use during serialization. More... | |
| template<typename Archive > | |
| ContinuousLoader & | destroyed (Archive &archive) |
| Restores entities that were destroyed during serialization. More... | |
| template<typename... Component, typename Archive , typename... Type, typename... Member> | |
| ContinuousLoader & | component (Archive &archive, Member Type::*... member) |
| Restores components and assigns them to the right entities. More... | |
| template<typename... Tag, typename Archive , typename... Type, typename... Member> | |
| ContinuousLoader & | tag (Archive &archive, Member Type::*... member) |
| Restores tags and assigns them to the right entities. More... | |
| ContinuousLoader & | shrink () |
| Helps to purge entities that no longer have a conterpart. More... | |
| ContinuousLoader & | orphans () |
| Destroys those entities that have neither components nor tags. More... | |
| bool | has (entity_type entity) const ENTT_NOEXCEPT |
| Tests if a loader knows about a given entity. More... | |
| entity_type | map (entity_type entity) const ENTT_NOEXCEPT |
| Returns the identifier to which an entity refers. More... | |
Utility class for continuous loading.
-A continuous loader is designed to load data from a source registry to a (possibly) non-empty destination. The loader can accomodate in a registry more than one snapshot in a sort of continuous loading that updates the destination one step at a time.
- Identifiers that entities originally had are not transferred to the target. Instead, the loader maps remote identifiers to local ones while restoring a snapshot.
- An example of use is the implementation of a client-server applications with the requirement of transferring somehow parts of the representation side to side.
| Entity | A valid entity type (see entt_traits for more details). |
Definition at line 434 of file snapshot.hpp.
-
-
|
- -inline | -
Constructs a loader that is bound to a given registry.
-| registry | A valid reference to a registry. |
Definition at line 533 of file snapshot.hpp.
- -
-
|
- -inline | -
Restores components and assigns them to the right entities.
-The template parameter list must be exactly the same used during serialization. In the event that the entity to which the component is assigned doesn't exist yet, the loader will take care to create a local counterpart for it.
- Members can be either data members of type entity_type or containers of entities. In both cases, the loader will visit them and update the entities by replacing each one with its local counterpart.
| Component | Type of component to restore. |
| Archive | Type of input archive. |
| Type | Types of components to update with local counterparts. |
| Member | Types of members to update with their local counterparts. |
| archive | A valid reference to an input archive. |
| member | Members to update with their local counterparts. |
Definition at line 599 of file snapshot.hpp.
- -
-
|
- -inline | -
Restores entities that were destroyed during serialization.
-This function restores the entities that were destroyed during serialization and creates local counterparts for them if required.
-| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 574 of file snapshot.hpp.
- -
-
|
- -inline | -
Restores entities that were in use during serialization.
-This function restores the entities that were in use during serialization and creates local counterparts for them if required.
-| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 558 of file snapshot.hpp.
- -
-
|
- -inline | -
Tests if a loader knows about a given entity.
-| entity | An entity identifier. |
entity is managed by the loader, false otherwise. Definition at line 694 of file snapshot.hpp.
- -
-
|
- -inline | -
Returns the identifier to which an entity refers.
-| entity | An entity identifier. |
entity refers in the target registry. Definition at line 710 of file snapshot.hpp.
- -
-
|
- -delete | -
Copying a snapshot loader isn't allowed.
-
-
|
- -default | -
Default move assignment operator.
-
-
|
- -inline | -
Destroys those entities that have neither components nor tags.
-In case all the entities were serialized but only part of the components and tags was saved, it could happen that some of the entities have neither components nor tags once restored.
- This functions helps to identify and destroy those entities.
Definition at line 681 of file snapshot.hpp.
- -
-
|
- -inline | -
Helps to purge entities that no longer have a conterpart.
-Users should invoke this member function after restoring each snapshot, unless they know exactly what they are doing.
-Definition at line 649 of file snapshot.hpp.
- -
-
|
- -inline | -
Restores tags and assigns them to the right entities.
-The template parameter list must be exactly the same used during serialization. In the event that the entity to which the tag is assigned doesn't exist yet, the loader will take care to create a local counterpart for it.
- Members can be either data members of type entity_type or containers of entities. In both cases, the loader will visit them and update the entities by replacing each one with its local counterpart.
| Tag | Type of tag to restore. |
| Archive | Type of input archive. |
| Type | Types of components to update with local counterparts. |
| Member | Types of members to update with their local counterparts. |
| archive | A valid reference to an input archive. |
| member | Members to update with their local counterparts. |
Definition at line 630 of file snapshot.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1Delegate_3_01Ret_07Args_8_8_8_08_4-members.html b/classentt_1_1Delegate_3_01Ret_07Args_8_8_8_08_4-members.html
deleted file mode 100644
index 82ab9e5d2..000000000
--- a/classentt_1_1Delegate_3_01Ret_07Args_8_8_8_08_4-members.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::Delegate< Ret(Args...)>, including all inherited members.
-| connect() ENTT_NOEXCEPT | entt::Delegate< Ret(Args...)> | inline |
| connect(Class *instance) ENTT_NOEXCEPT | entt::Delegate< Ret(Args...)> | inline |
| connect(Class *instance) ENTT_NOEXCEPT | entt::Delegate< Ret(Args...)> | inline |
| Delegate() ENTT_NOEXCEPT | entt::Delegate< Ret(Args...)> | inline |
| empty() const ENTT_NOEXCEPT | entt::Delegate< Ret(Args...)> | inline |
| operator()(Args... args) const | entt::Delegate< Ret(Args...)> | inline |
| operator==(const Delegate< Ret(Args...)> &other) const ENTT_NOEXCEPT | entt::Delegate< Ret(Args...)> | inline |
| reset() ENTT_NOEXCEPT | entt::Delegate< Ret(Args...)> | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1Delegate_3_01Ret_07Args_8_8_8_08_4.html b/classentt_1_1Delegate_3_01Ret_07Args_8_8_8_08_4.html
deleted file mode 100644
index 6329d37c6..000000000
--- a/classentt_1_1Delegate_3_01Ret_07Args_8_8_8_08_4.html
+++ /dev/null
@@ -1,416 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Utility class to send around functions and member functions. - More...
- -#include <delegate.hpp>
-Public Member Functions | |
| - | Delegate () ENTT_NOEXCEPT |
| Default constructor. | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether a delegate actually stores a listener. More... | |
| template<Ret(*)(Args...) Function> | |
| void | connect () ENTT_NOEXCEPT |
| Binds a free function to a delegate. More... | |
| template<typename Class , Ret(Class::*)(Args...) const Member> | |
| void | connect (Class *instance) ENTT_NOEXCEPT |
| Connects a member function for a given instance to a delegate. More... | |
| template<typename Class , Ret(Class::*)(Args...) Member> | |
| void | connect (Class *instance) ENTT_NOEXCEPT |
| Connects a member function for a given instance to a delegate. More... | |
| void | reset () ENTT_NOEXCEPT |
| Resets a delegate. More... | |
| Ret | operator() (Args... args) const |
| Triggers a delegate. More... | |
| bool | operator== (const Delegate< Ret(Args...)> &other) const ENTT_NOEXCEPT |
| Checks if the contents of the two delegates are different. More... | |
Utility class to send around functions and member functions.
-Unmanaged delegate for function pointers and member functions. Users of this class are in charge of disconnecting instances before deleting them.
-A delegate can be used as general purpose invoker with no memory overhead for free functions and member functions provided along with an instance on which to invoke them.
-| Ret | Return type of a function type. |
| Args | Types of arguments of a function type. |
Definition at line 36 of file delegate.hpp.
-
-
|
- -inline | -
Binds a free function to a delegate.
-| Function | A valid free function pointer. |
Definition at line 75 of file delegate.hpp.
- -
-
|
- -inline | -
Connects a member function for a given instance to a delegate.
-The delegate isn't responsible for the connected object. Users must guarantee that the lifetime of the instance overcomes the one of the delegate.
-| Class | Type of class to which the member function belongs. |
| Member | Member function to connect to the delegate. |
| instance | A valid instance of type pointer to Class. |
Definition at line 91 of file delegate.hpp.
- -
-
|
- -inline | -
Connects a member function for a given instance to a delegate.
-The delegate isn't responsible for the connected object. Users must guarantee that the lifetime of the instance overcomes the one of the delegate.
-| Class | Type of class to which the member function belongs. |
| Member | Member function to connect to the delegate. |
| instance | A valid instance of type pointer to Class. |
Definition at line 107 of file delegate.hpp.
- -
-
|
- -inline | -
Checks whether a delegate actually stores a listener.
-Definition at line 65 of file delegate.hpp.
- -
-
|
- -inline | -
Triggers a delegate.
-| args | Arguments to use to invoke the underlying function. |
Definition at line 125 of file delegate.hpp.
- -
-
|
- -inline | -
Checks if the contents of the two delegates are different.
-Two delegates are identical if they contain the same listener.
-| other | Delegate with which to compare. |
Definition at line 137 of file delegate.hpp.
- -
-
|
- -inline | -
Resets a delegate.
-After a reset, a delegate can be safely invoked with no effect.
- -Definition at line 116 of file delegate.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1HashedString.html b/classentt_1_1HashedString.html
deleted file mode 100644
index 38e9c2940..000000000
--- a/classentt_1_1HashedString.html
+++ /dev/null
@@ -1,304 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Zero overhead resource identifier. - More...
- -#include <hashed_string.hpp>
-Public Types | |
| -using | hash_type = std::uint64_t |
| Unsigned integer type. | |
-Public Member Functions | |
| template<std::size_t N> | |
| constexpr | HashedString (const char(&str)[N]) ENTT_NOEXCEPT |
| Constructs a hashed string from an array of const chars. More... | |
| constexpr | HashedString (ConstCharWrapper wrapper) ENTT_NOEXCEPT |
Explicit constructor on purpose to avoid constructing a hashed string directly from a const char *. More... | |
| constexpr | operator const char * () const ENTT_NOEXCEPT |
| Returns the human-readable representation of a hashed string. More... | |
| constexpr | operator hash_type () const ENTT_NOEXCEPT |
| Returns the numeric representation of a hashed string. More... | |
| constexpr bool | operator== (const HashedString &other) const ENTT_NOEXCEPT |
| Compares two hashed strings. More... | |
Zero overhead resource identifier.
-A hashed string is a compile-time tool that allows users to use human-readable identifers in the codebase while using their numeric counterparts at runtime.
- Because of that, a hashed string can also be used in constant expressions if required.
Definition at line 22 of file hashed_string.hpp.
-
-
|
- -inline | -
Constructs a hashed string from an array of const chars.
-Forcing template resolution avoids implicit conversions. An human-readable identifier can be anything but a plain, old bunch of characters.
- Example of use:
| N | Number of characters of the identifier. |
| str | Human-readable identifer. |
Definition at line 56 of file hashed_string.hpp.
- -
-
|
- -inlineexplicit | -
Explicit constructor on purpose to avoid constructing a hashed string directly from a const char *.
| wrapper | Helps achieving the purpose by relying on overloading. |
Definition at line 66 of file hashed_string.hpp.
- -
-
|
- -inline | -
Returns the human-readable representation of a hashed string.
-Definition at line 74 of file hashed_string.hpp.
- -
-
|
- -inline | -
Returns the numeric representation of a hashed string.
-Definition at line 80 of file hashed_string.hpp.
- -
-
|
- -inline | -
Compares two hashed strings.
-| other | Hashed string with which to compare. |
Definition at line 87 of file hashed_string.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1Identifier.html b/classentt_1_1Identifier.html
deleted file mode 100644
index 735dce5e1..000000000
--- a/classentt_1_1Identifier.html
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Types identifiers. - More...
- -#include <ident.hpp>
-Public Types | |
| -using | identifier_type = std::size_t |
| Unsigned integer type. | |
-Static Public Member Functions | |
| template<typename Type > | |
| static constexpr identifier_type | get () ENTT_NOEXCEPT |
| Returns the identifier associated with a given type. More... | |
Types identifiers.
-TURN_OFF_DOXYGEN Variable template used to generate identifiers at compile-time for the given types. Use the get member function to know what's the identifier associated to the specific type.
| Types | List of types for which to generate identifiers. |
-
|
- -inlinestatic | -
- 1.8.13
-
-
-
diff --git a/classentt_1_1Meta-members.html b/classentt_1_1Meta-members.html
deleted file mode 100644
index 5e7d10a38..000000000
--- a/classentt_1_1Meta-members.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
This is the complete list of members for entt::Meta, including all inherited members.
-| factory_type typedef (defined in entt::Meta) | entt::Meta | |
| reflect(const char *str, Property &&... property) ENTT_NOEXCEPT (defined in entt::Meta) | entt::Meta | inlinestatic |
| resolve() ENTT_NOEXCEPT (defined in entt::Meta) | entt::Meta | inlinestatic |
| resolve(const char *str) ENTT_NOEXCEPT (defined in entt::Meta) | entt::Meta | inlinestatic |
- 1.8.13
-
-
-
diff --git a/classentt_1_1Meta.html b/classentt_1_1Meta.html
deleted file mode 100644
index 144303d8e..000000000
--- a/classentt_1_1Meta.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
-Public Types | |
| -template<typename Type > | |
| using | factory_type = MetaFactory< Type > |
-Static Public Member Functions | |
| -template<typename Type , typename... Property> | |
| static factory_type< std::decay_t< Type > > | reflect (const char *str, Property &&... property) ENTT_NOEXCEPT |
| -template<typename Type > | |
| static MetaType * | resolve () ENTT_NOEXCEPT |
| -static MetaType * | resolve (const char *str) ENTT_NOEXCEPT |
Definition at line 24 of file factory.hpp.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaCtor-members.html b/classentt_1_1MetaCtor-members.html
deleted file mode 100644
index dd2e4c2d0..000000000
--- a/classentt_1_1MetaCtor-members.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
This is the complete list of members for entt::MetaCtor, including all inherited members.
-| accept() const ENTT_NOEXCEPT (defined in entt::MetaCtor) | entt::MetaCtor | inline |
| arg(size_type index) const ENTT_NOEXCEPT (defined in entt::MetaCtor) | entt::MetaCtor | inline |
| invoke(Args &&... args) (defined in entt::MetaCtor) | entt::MetaCtor | inline |
| Meta (defined in entt::MetaCtor) | entt::MetaCtor | friend |
| properties(Op op) const ENTT_NOEXCEPT (defined in entt::MetaCtor) | entt::MetaCtor | inline |
| property(Key &&key) const ENTT_NOEXCEPT (defined in entt::MetaCtor) | entt::MetaCtor | inline |
| size() const ENTT_NOEXCEPT (defined in entt::MetaCtor) | entt::MetaCtor | inline |
| size_type typedef (defined in entt::MetaCtor) | entt::MetaCtor |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaCtor.html b/classentt_1_1MetaCtor.html
deleted file mode 100644
index edeee1d0a..000000000
--- a/classentt_1_1MetaCtor.html
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
-Public Types | |
| -using | size_type = typename internal::MetaCtorNode::size_type |
-Public Member Functions | |
| -size_type | size () const ENTT_NOEXCEPT |
| -MetaType * | arg (size_type index) const ENTT_NOEXCEPT |
| -template<typename... Args> | |
| bool | accept () const ENTT_NOEXCEPT |
| -template<typename... Args> | |
| MetaAny | invoke (Args &&... args) |
| -template<typename Op > | |
| void | properties (Op op) const ENTT_NOEXCEPT |
| -template<typename Key > | |
| MetaProp * | property (Key &&key) const ENTT_NOEXCEPT |
-Friends | |
| -class | Meta |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaData-members.html b/classentt_1_1MetaData-members.html
deleted file mode 100644
index ee3d7824b..000000000
--- a/classentt_1_1MetaData-members.html
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
This is the complete list of members for entt::MetaData, including all inherited members.
-| accept() const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
| get(const void *instance) const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
| Meta (defined in entt::MetaData) | entt::MetaData | friend |
| name() const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
| properties(Op op) const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
| property(Key &&key) const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
| readonly() const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
| set(void *instance, Type &&value) (defined in entt::MetaData) | entt::MetaData | inline |
| shared() const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
| type() const ENTT_NOEXCEPT (defined in entt::MetaData) | entt::MetaData | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaData.html b/classentt_1_1MetaData.html
deleted file mode 100644
index a20183584..000000000
--- a/classentt_1_1MetaData.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
-Public Member Functions | |
| -const char * | name () const ENTT_NOEXCEPT |
| -bool | readonly () const ENTT_NOEXCEPT |
| -bool | shared () const ENTT_NOEXCEPT |
| -MetaType * | type () const ENTT_NOEXCEPT |
| -template<typename Type > | |
| bool | accept () const ENTT_NOEXCEPT |
| -template<typename Type > | |
| void | set (void *instance, Type &&value) |
| -MetaAny | get (const void *instance) const ENTT_NOEXCEPT |
| -template<typename Op > | |
| void | properties (Op op) const ENTT_NOEXCEPT |
| -template<typename Key > | |
| MetaProp * | property (Key &&key) const ENTT_NOEXCEPT |
-Friends | |
| -class | Meta |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaDtor-members.html b/classentt_1_1MetaDtor-members.html
deleted file mode 100644
index 9cb2313bc..000000000
--- a/classentt_1_1MetaDtor-members.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
This is the complete list of members for entt::MetaDtor, including all inherited members.
-| invoke(void *instance) (defined in entt::MetaDtor) | entt::MetaDtor | inline |
| Meta (defined in entt::MetaDtor) | entt::MetaDtor | friend |
| properties(Op op) const ENTT_NOEXCEPT (defined in entt::MetaDtor) | entt::MetaDtor | inline |
| property(Key &&key) const ENTT_NOEXCEPT (defined in entt::MetaDtor) | entt::MetaDtor | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaDtor.html b/classentt_1_1MetaDtor.html
deleted file mode 100644
index fae2dba57..000000000
--- a/classentt_1_1MetaDtor.html
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
-Public Member Functions | |
| -void | invoke (void *instance) |
| -template<typename Op > | |
| void | properties (Op op) const ENTT_NOEXCEPT |
| -template<typename Key > | |
| MetaProp * | property (Key &&key) const ENTT_NOEXCEPT |
-Friends | |
| -class | Meta |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaFunc-members.html b/classentt_1_1MetaFunc-members.html
deleted file mode 100644
index bf8de980d..000000000
--- a/classentt_1_1MetaFunc-members.html
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
This is the complete list of members for entt::MetaFunc, including all inherited members.
-| accept() const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| arg(size_type index) const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| constant() const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| invoke(const void *instance, Args &&... args) const (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| invoke(void *instance, Args &&... args) (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| Meta (defined in entt::MetaFunc) | entt::MetaFunc | friend |
| name() const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| properties(Op op) const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| property(Key &&key) const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| ret() const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| shared() const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| size() const ENTT_NOEXCEPT (defined in entt::MetaFunc) | entt::MetaFunc | inline |
| size_type typedef (defined in entt::MetaFunc) | entt::MetaFunc |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaFunc.html b/classentt_1_1MetaFunc.html
deleted file mode 100644
index a3faa535e..000000000
--- a/classentt_1_1MetaFunc.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
-Public Types | |
| -using | size_type = typename internal::MetaCtorNode::size_type |
-Public Member Functions | |
| -const char * | name () const ENTT_NOEXCEPT |
| -size_type | size () const ENTT_NOEXCEPT |
| -bool | constant () const ENTT_NOEXCEPT |
| -bool | shared () const ENTT_NOEXCEPT |
| -MetaType * | ret () const ENTT_NOEXCEPT |
| -MetaType * | arg (size_type index) const ENTT_NOEXCEPT |
| -template<typename... Args> | |
| bool | accept () const ENTT_NOEXCEPT |
| -template<typename... Args> | |
| MetaAny | invoke (const void *instance, Args &&... args) const |
| -template<typename... Args> | |
| MetaAny | invoke (void *instance, Args &&... args) |
| -template<typename Op > | |
| void | properties (Op op) const ENTT_NOEXCEPT |
| -template<typename Key > | |
| MetaProp * | property (Key &&key) const ENTT_NOEXCEPT |
-Friends | |
| -class | Meta |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaProp-members.html b/classentt_1_1MetaProp-members.html
deleted file mode 100644
index bf963cb74..000000000
--- a/classentt_1_1MetaProp-members.html
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
This is the complete list of members for entt::MetaProp, including all inherited members.
-| key() const ENTT_NOEXCEPT (defined in entt::MetaProp) | entt::MetaProp | inline |
| Meta (defined in entt::MetaProp) | entt::MetaProp | friend |
| value() const ENTT_NOEXCEPT (defined in entt::MetaProp) | entt::MetaProp | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaProp.html b/classentt_1_1MetaProp.html
deleted file mode 100644
index d455c4b79..000000000
--- a/classentt_1_1MetaProp.html
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
-Public Member Functions | |
| -const MetaAny & | key () const ENTT_NOEXCEPT |
| -const MetaAny & | value () const ENTT_NOEXCEPT |
-Friends | |
| -class | Meta |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaType-members.html b/classentt_1_1MetaType-members.html
deleted file mode 100644
index a0186c27a..000000000
--- a/classentt_1_1MetaType-members.html
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
This is the complete list of members for entt::MetaType, including all inherited members.
-| construct(Args &&... args) const (defined in entt::MetaType) | entt::MetaType | inline |
| ctor(Op op) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| ctor() const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| data(Op op) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| data(const char *str) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| destroy(void *instance) (defined in entt::MetaType) | entt::MetaType | inline |
| dtor(Op op) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| dtor() const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| func(Op op) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| func(const char *str) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| Meta (defined in entt::MetaType) | entt::MetaType | friend |
| name() const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| properties(Op op) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
| property(Key &&key) const ENTT_NOEXCEPT (defined in entt::MetaType) | entt::MetaType | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1MetaType.html b/classentt_1_1MetaType.html
deleted file mode 100644
index 89b318798..000000000
--- a/classentt_1_1MetaType.html
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.2
-
- |
-
-Public Member Functions | |
| -const char * | name () const ENTT_NOEXCEPT |
| -template<typename Op > | |
| void | ctor (Op op) const ENTT_NOEXCEPT |
| -template<typename... Args> | |
| MetaCtor * | ctor () const ENTT_NOEXCEPT |
| -template<typename Op > | |
| void | dtor (Op op) const ENTT_NOEXCEPT |
| -MetaDtor * | dtor () const ENTT_NOEXCEPT |
| -template<typename Op > | |
| void | data (Op op) const ENTT_NOEXCEPT |
| -MetaData * | data (const char *str) const ENTT_NOEXCEPT |
| -template<typename Op > | |
| void | func (Op op) const ENTT_NOEXCEPT |
| -MetaFunc * | func (const char *str) const ENTT_NOEXCEPT |
| -template<typename... Args> | |
| MetaAny | construct (Args &&... args) const |
| -void | destroy (void *instance) |
| -template<typename Op > | |
| void | properties (Op op) const ENTT_NOEXCEPT |
| -template<typename Key > | |
| MetaProp * | property (Key &&key) const ENTT_NOEXCEPT |
-Friends | |
| -class | Meta |
- 1.8.13
-
-
-
diff --git a/classentt_1_1PersistentView-members.html b/classentt_1_1PersistentView-members.html
deleted file mode 100644
index 66bdfafd0..000000000
--- a/classentt_1_1PersistentView-members.html
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::PersistentView< Entity, Component >, including all inherited members.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1PersistentView.html b/classentt_1_1PersistentView.html
deleted file mode 100644
index 18a198e73..000000000
--- a/classentt_1_1PersistentView.html
+++ /dev/null
@@ -1,933 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Persistent view. - More...
- -#include <view.hpp>
-Public Types | |
| -using | entity_type = typename view_type::entity_type |
| Underlying entity identifier. | |
| -using | size_type = typename view_type::size_type |
| Unsigned integer type. | |
| -using | iterator_type = typename view_type::iterator_type |
| Input iterator type. | |
| -using | const_iterator_type = typename view_type::const_iterator_type |
| Constant input iterator type. | |
-Public Member Functions | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of entities that have the given components. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the view is empty. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| const entity_type & | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| bool | contains (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a view contains an entity. More... | |
| template<typename Comp > | |
| const Comp & | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the component assigned to the given entity. More... | |
| template<typename Comp > | |
| Comp & | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns the component assigned to the given entity. More... | |
| template<typename... Comp> | |
| std::enable_if_t<(sizeof...(Comp) > 1), std::tuple< const Comp &... > > | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the components assigned to the given entity. More... | |
| template<typename... Comp> | |
| std::enable_if_t<(sizeof...(Comp) > 1), std::tuple< Comp &... > > | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns the components assigned to the given entity. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates entities and components and applies the given function object to them. More... | |
| template<typename Func > | |
| void | each (Func func) |
| Iterates entities and components and applies the given function object to them. More... | |
| template<typename Comp > | |
| void | sort () |
| Sort the shared pool of entities according to the given component. More... | |
-Friends | |
| -class | Registry< Entity > |
| A registry is allowed to create views. | |
Persistent view.
-A persistent view returns all the 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.
- In general, persistent views don't stay true to the order of any set of components unless users explicitly sort them.
Important
-Iterators aren't invalidated if:
-In all the other cases, modifying the pools of the given components in any way invalidates all the iterators and using them results in undefined behavior.
-sort on each view to sort all of them because they share the set of entities).| Entity | A valid entity type (see entt_traits for more details). |
| Component | Types of components iterated by the view. |
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
-
|
- -inline | -
Direct access to the list of entities.
-The returned pointer is such that range [data(), data() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the view in the expected order.
-
|
- -inline | -
Iterates entities and components and applies the given function object to them.
-The function object is invoked for each entity. It is provided with the entity itself and a set of const references to all the components of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
Iterates entities and components and applies the given function object to them.
-The function object is invoked for each entity. It is provided with the entity itself and a set of references to all the components of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns the component assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Type of component to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
Returns the component assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Type of component to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
Returns the components assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Types of the components to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
Returns the components assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Types of the components to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
Sort the shared pool of entities according to the given component.
-Persistent views of the same type share with the Registry a pool of entities with its own order that doesn't depend on the order of any pool of components. Users can order the underlying data structure so that it respects the order of the pool of the given component.
-| Comp | Type of component to use to impose the order. |
- 1.8.13
-
-
-
diff --git a/classentt_1_1Prototype-members.html b/classentt_1_1Prototype-members.html
deleted file mode 100644
index 59faada7d..000000000
--- a/classentt_1_1Prototype-members.html
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::Prototype< Entity >, including all inherited members.
-| accommodate(registry_type &other, const entity_type dst) const | entt::Prototype< Entity > | inline |
| accommodate(const entity_type dst) const | entt::Prototype< Entity > | inline |
| assign(registry_type &other, const entity_type dst) const | entt::Prototype< Entity > | inline |
| assign(const entity_type dst) const | entt::Prototype< Entity > | inline |
| create(registry_type &other) const | entt::Prototype< Entity > | inline |
| create() const | entt::Prototype< Entity > | inline |
| entity_type typedef | entt::Prototype< Entity > | |
| get() const ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| get() ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| get() const ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| get() ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| has() const ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| operator()(registry_type &other, const entity_type dst) const ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| operator()(const entity_type dst) const ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| operator()(registry_type &other) const ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| operator()() const ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| operator=(const Prototype &)=delete | entt::Prototype< Entity > | |
| operator=(Prototype &&other) | entt::Prototype< Entity > | inline |
| Prototype(Registry< Entity > ®istry) | entt::Prototype< Entity > | inline |
| Prototype(const Prototype &)=delete | entt::Prototype< Entity > | |
| Prototype(Prototype &&other) | entt::Prototype< Entity > | inline |
| registry_type typedef | entt::Prototype< Entity > | |
| set(Args &&... args) | entt::Prototype< Entity > | inline |
| size_type typedef | entt::Prototype< Entity > | |
| unset() ENTT_NOEXCEPT | entt::Prototype< Entity > | inline |
| ~Prototype() | entt::Prototype< Entity > | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1RawView-members.html b/classentt_1_1RawView-members.html
deleted file mode 100644
index 9890b00ab..000000000
--- a/classentt_1_1RawView-members.html
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::RawView< Entity, Component >, including all inherited members.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1RawView.html b/classentt_1_1RawView.html
deleted file mode 100644
index 5d65faf4a..000000000
--- a/classentt_1_1RawView.html
+++ /dev/null
@@ -1,749 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Raw view. - More...
- -#include <view.hpp>
-Public Types | |
| -using | raw_type = typename pool_type::object_type |
| Type of component iterated by the view. | |
| -using | entity_type = typename pool_type::entity_type |
| Underlying entity identifier. | |
| -using | size_type = typename pool_type::size_type |
| Unsigned integer type. | |
| -using | iterator_type = typename pool_type::iterator_type |
| Input iterator type. | |
| -using | const_iterator_type = typename pool_type::const_iterator_type |
| Constant input iterator type. | |
-Public Member Functions | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of instances of the given type. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the view is empty. More... | |
| const raw_type * | raw () const ENTT_NOEXCEPT |
| Direct access to the list of components. More... | |
| raw_type * | raw () ENTT_NOEXCEPT |
| Direct access to the list of components. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the first instance of the given type. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the first instance of the given type. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the first instance of the given type. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last instance of the given type. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last instance of the given type. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator that is past the last instance of the given type. More... | |
| const raw_type & | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| raw_type & | operator[] (const size_type pos) ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates components and applies the given function object to them. More... | |
| template<typename Func > | |
| void | each (Func func) |
| Iterates components and applies the given function object to them. More... | |
-Friends | |
| -class | Registry< Entity > |
| A registry is allowed to create views. | |
Raw view.
-Raw views are meant to easily iterate components without having to resort to using any other member function, so as to further increase the performance. Whenever knowing the entity to which a component belongs isn't required, this should be the preferred tool.
- Order of elements during iterations are highly dependent on the order of the underlying data structure. See SparseSet and its specializations for more details.
Important
-Iterators aren't invalidated if:
-In all the other cases, modifying the pool of the given component in any way invalidates all the iterators and using them results in undefined behavior.
-| Entity | A valid entity type (see entt_traits for more details). |
| Component | Type of component iterated by the view. |
-
|
- -inline | -
Returns an iterator to the first instance of the given type.
-The returned iterator points to the first instance of the given type. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first instance of the given type.
-The returned iterator points to the first instance of the given type. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first instance of the given type.
-The returned iterator points to the first instance of the given type. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator that is past the last instance of the given type.
-The returned iterator points to the element following the last instance of the given type. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Direct access to the list of entities.
-The returned pointer is such that range [data(), data() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the view in the expected order.
-
|
- -inline | -
Iterates components and applies the given function object to them.
-The function object is provided with a const reference to each component of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
Iterates components and applies the given function object to them.
-The function object is provided with a reference to each component of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
-
|
- -inline | -
Returns an iterator that is past the last instance of the given type.
-The returned iterator points to the element following the last instance of the given type. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns an iterator that is past the last instance of the given type.
-The returned iterator points to the element following the last instance of the given type. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
Direct access to the list of components.
-The returned pointer is such that range [raw(), raw() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the view in the expected order.
-
|
- -inline | -
Direct access to the list of components.
-The returned pointer is such that range [raw(), raw() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the view in the expected order.
-
|
- -inline | -
- 1.8.13
-
-
-
diff --git a/classentt_1_1Registry-members.html b/classentt_1_1Registry-members.html
deleted file mode 100644
index c2f74e06c..000000000
--- a/classentt_1_1Registry-members.html
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::Registry< Entity >, including all inherited members.
-| accommodate(const entity_type entity, Args &&... args) | entt::Registry< Entity > | inline |
| alive() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| assign(tag_t, const entity_type entity, Args &&... args) | entt::Registry< Entity > | inline |
| assign(const entity_type entity, Args &&... args) | entt::Registry< Entity > | inline |
| attachee() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| capacity() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| capacity() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| component_type typedef | entt::Registry< Entity > | |
| construction(tag_t) ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| construction() ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| contains() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| create() | entt::Registry< Entity > | inline |
| current(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| data() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| destroy(tag_t) | entt::Registry< Entity > | inline |
| destroy(const entity_type entity) | entt::Registry< Entity > | inline |
| destroy(Type...) | entt::Registry< Entity > | inline |
| destruction(tag_t) ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| destruction() ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| discard() | entt::Registry< Entity > | inline |
| each(Func func) const | entt::Registry< Entity > | inline |
| empty() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| empty() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| entity(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| entity_type typedef | entt::Registry< Entity > | |
| fast(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| get() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| get() ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| get(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| get(const entity_type entity) ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| get(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| get(const entity_type entity) ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| has() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| has(tag_t, const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| has(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| move(const entity_type entity) ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| operator=(const Registry &)=delete | entt::Registry< Entity > | |
| operator=(Registry &&)=default | entt::Registry< Entity > | |
| orphan(const entity_type entity) const | entt::Registry< Entity > | inline |
| orphans(Func func) const | entt::Registry< Entity > | inline |
| prepare() | entt::Registry< Entity > | inline |
| raw() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| raw() ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| Registry()=default | entt::Registry< Entity > | |
| Registry(const Registry &)=delete | entt::Registry< Entity > | |
| Registry(Registry &&)=default | entt::Registry< Entity > | |
| remove() | entt::Registry< Entity > | inline |
| remove(const entity_type entity) | entt::Registry< Entity > | inline |
| replace(tag_t, Args &&... args) | entt::Registry< Entity > | inline |
| replace(const entity_type entity, Args &&... args) | entt::Registry< Entity > | inline |
| reserve(const size_type cap) | entt::Registry< Entity > | inline |
| reserve(const size_type cap) | entt::Registry< Entity > | inline |
| reset(const entity_type entity) | entt::Registry< Entity > | inline |
| reset() | entt::Registry< Entity > | inline |
| reset() | entt::Registry< Entity > | inline |
| restore() ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| sink_type typedef | entt::Registry< Entity > | |
| size() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| size() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| size_type typedef | entt::Registry< Entity > | |
| snapshot() const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| sort(Compare compare, Sort sort=Sort{}, Args &&... args) | entt::Registry< Entity > | inline |
| sort() | entt::Registry< Entity > | inline |
| tag_type typedef | entt::Registry< Entity > | |
| type(tag_t) ENTT_NOEXCEPT | entt::Registry< Entity > | inlinestatic |
| type() ENTT_NOEXCEPT | entt::Registry< Entity > | inlinestatic |
| valid(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| version(const entity_type entity) const ENTT_NOEXCEPT | entt::Registry< Entity > | inline |
| version_type typedef | entt::Registry< Entity > | |
| view() | entt::Registry< Entity > | inline |
| view(persistent_t) | entt::Registry< Entity > | inline |
| view(raw_t) | entt::Registry< Entity > | inline |
| view(It first, It last) | entt::Registry< Entity > | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1Registry.html b/classentt_1_1Registry.html
deleted file mode 100644
index 44d6f06df..000000000
--- a/classentt_1_1Registry.html
+++ /dev/null
@@ -1,3299 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Fast and reliable entity-component system. - More...
- -#include <registry.hpp>
-Public Types | |
| -using | entity_type = typename traits_type::entity_type |
| Underlying entity identifier. | |
| -using | version_type = typename traits_type::version_type |
| Underlying version type. | |
| -using | size_type = std::size_t |
| Unsigned integer type. | |
| -using | tag_type = typename tag_family::family_type |
| Unsigned integer type. | |
| -using | component_type = typename component_family::family_type |
| Unsigned integer type. | |
| -using | sink_type = typename signal_type::sink_type |
| Type of sink for the given component. | |
-Public Member Functions | |
| - | Registry ()=default |
| Default constructor. | |
| - | Registry (const Registry &)=delete |
| Copying a registry isn't allowed. | |
| - | Registry (Registry &&)=default |
| Default move constructor. | |
| Registry & | operator= (const Registry &)=delete |
| Copying a registry isn't allowed. More... | |
| Registry & | operator= (Registry &&)=default |
| Default move assignment operator. More... | |
| template<typename Component > | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of existing components of the given type. More... | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of entities created so far. More... | |
| size_type | alive () const ENTT_NOEXCEPT |
| Returns the number of entities still in use. More... | |
| template<typename Component > | |
| void | reserve (const size_type cap) |
| Increases the capacity of the pool for the given component. More... | |
| void | reserve (const size_type cap) |
| Increases the capacity of a registry in terms of entities. More... | |
| template<typename Component > | |
| size_type | capacity () const ENTT_NOEXCEPT |
| Returns the capacity of the pool for the given component. More... | |
| size_type | capacity () const ENTT_NOEXCEPT |
| Returns the number of entities that a registry has currently allocated space for. More... | |
| template<typename Component > | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the pool of the given component is empty. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks if there exists at least an entity still in use. More... | |
| template<typename Component > | |
| const Component * | raw () const ENTT_NOEXCEPT |
| Direct access to the list of components of a given pool. More... | |
| template<typename Component > | |
| Component * | raw () ENTT_NOEXCEPT |
| Direct access to the list of components of a given pool. More... | |
| template<typename Component > | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities of a given pool. More... | |
| bool | valid (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if an entity identifier refers to a valid entity. More... | |
| bool | fast (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if an entity identifier refers to a valid entity. More... | |
| entity_type | entity (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the entity identifier without the version. More... | |
| version_type | version (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the version stored along with an entity identifier. More... | |
| version_type | current (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the actual version for an entity identifier. More... | |
| entity_type | create () |
| Creates a new entity and returns it. More... | |
| template<typename Tag > | |
| void | destroy (tag_t) |
| Destroys the entity that owns the given tag, if any. More... | |
| void | destroy (const entity_type entity) |
| Destroys an entity and lets the registry recycle the identifier. More... | |
| template<typename... Component, typename... Type> | |
| void | destroy (Type...) |
| Destroys the entities that own the given components, if any. More... | |
| template<typename Tag , typename... Args> | |
| Tag & | assign (tag_t, const entity_type entity, Args &&... args) |
| Attaches the given tag to an entity. More... | |
| template<typename Component , typename... Args> | |
| Component & | assign (const entity_type entity, Args &&... args) |
| Assigns the given component to an entity. More... | |
| template<typename Tag > | |
| void | remove () |
| Removes the given tag from its owner, if any. More... | |
| template<typename Component > | |
| void | remove (const entity_type entity) |
| Removes the given component from an entity. More... | |
| template<typename Tag > | |
| bool | has () const ENTT_NOEXCEPT |
| Checks if the given tag has an owner. More... | |
| template<typename Tag > | |
| bool | has (tag_t, const entity_type entity) const ENTT_NOEXCEPT |
| Checks if an entity owns the given tag. More... | |
| template<typename... Component> | |
| bool | has (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if an entity has all the given components. More... | |
| template<typename Tag > | |
| const Tag & | get () const ENTT_NOEXCEPT |
| Returns a reference to the given tag. More... | |
| template<typename Tag > | |
| Tag & | get () ENTT_NOEXCEPT |
| Returns a reference to the given tag. More... | |
| template<typename Component > | |
| const Component & | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns a reference to the given component for an entity. More... | |
| template<typename Component > | |
| Component & | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns a reference to the given component for an entity. More... | |
| template<typename... Component> | |
| std::enable_if_t<(sizeof...(Component) > 1), std::tuple< const Component &... > > | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns a reference to the given components for an entity. More... | |
| template<typename... Component> | |
| std::enable_if_t<(sizeof...(Component) > 1), std::tuple< Component &... > > | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns a reference to the given components for an entity. More... | |
| template<typename Tag , typename... Args> | |
| Tag & | replace (tag_t, Args &&... args) |
| Replaces the given tag. More... | |
| template<typename Component , typename... Args> | |
| Component & | replace (const entity_type entity, Args &&... args) |
| Replaces the given component for an entity. More... | |
| template<typename Tag > | |
| entity_type | move (const entity_type entity) ENTT_NOEXCEPT |
| Changes the owner of the given tag. More... | |
| template<typename Tag > | |
| entity_type | attachee () const ENTT_NOEXCEPT |
| Gets the owner of the given tag, if any. More... | |
| template<typename Component , typename... Args> | |
| Component & | accommodate (const entity_type entity, Args &&... args) |
| Assigns or replaces the given component for an entity. More... | |
| template<typename Tag > | |
| sink_type | construction (tag_t) ENTT_NOEXCEPT |
| Returns a sink object for the given tag. More... | |
| template<typename Component > | |
| sink_type | construction () ENTT_NOEXCEPT |
| Returns a sink object for the given component. More... | |
| template<typename Tag > | |
| sink_type | destruction (tag_t) ENTT_NOEXCEPT |
| Returns a sink object for the given tag. More... | |
| template<typename Component > | |
| sink_type | destruction () ENTT_NOEXCEPT |
| Returns a sink object for the given component. More... | |
| template<typename Component , typename Compare , typename Sort = StdSort, typename... Args> | |
| void | sort (Compare compare, Sort sort=Sort{}, Args &&... args) |
| Sorts the pool of entities for the given component. More... | |
| template<typename To , typename From > | |
| void | sort () |
| Sorts two pools of components in the same way. More... | |
| template<typename Component > | |
| void | reset (const entity_type entity) |
| Resets the given component for an entity. More... | |
| template<typename Component > | |
| void | reset () |
| Resets the pool of the given component. More... | |
| void | reset () |
| Resets a whole registry. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates all the entities that are still in use. More... | |
| bool | orphan (const entity_type entity) const |
| Checks if an entity is an orphan. More... | |
| template<typename Func > | |
| void | orphans (Func func) const |
| Iterates orphans and applies them the given function object. More... | |
| template<typename... Component> | |
| View< Entity, Component... > | view () |
| Returns a standard view for the given components. More... | |
| template<typename... Component> | |
| void | prepare () |
| Prepares the internal data structures used by persistent views. More... | |
| template<typename... Component> | |
| void | discard () |
| Discards all the data structures used for a given persitent view. More... | |
| template<typename... Component> | |
| bool | contains () const ENTT_NOEXCEPT |
| Checks if a persistent view has already been prepared. More... | |
| template<typename... Component> | |
| PersistentView< Entity, Component... > | view (persistent_t) |
| Returns a persistent view for the given components. More... | |
| template<typename Component > | |
| RawView< Entity, Component > | view (raw_t) |
| Returns a raw view for the given component. More... | |
| template<typename It > | |
| RuntimeView< Entity > | view (It first, It last) |
| Returns a runtime view for the given components. More... | |
| Snapshot< Entity > | snapshot () const ENTT_NOEXCEPT |
| Returns a temporary object to use to create snapshots. More... | |
| SnapshotLoader< Entity > | restore () ENTT_NOEXCEPT |
| Returns a temporary object to use to load snapshots. More... | |
-Static Public Member Functions | |
| template<typename Tag > | |
| static tag_type | type (tag_t) ENTT_NOEXCEPT |
| Returns the numeric identifier of a type of tag at runtime. More... | |
| template<typename Component > | |
| static component_type | type () ENTT_NOEXCEPT |
| Returns the numeric identifier of a type of component at runtime. More... | |
Fast and reliable entity-component system.
-Forward declaration of the registry class.
-The registry is the core class of the entity-component framework.
- It stores entities and arranges pools of components on a per request basis. By means of a registry, users can manage entities and components and thus create views to iterate them.
| Entity | A valid entity type (see entt_traits for more details). |
Definition at line 42 of file registry.hpp.
-
-
|
- -inline | -
Assigns or replaces the given component for an entity.
-Equivalent to the following snippet (pseudocode):
-Prefer this function anyway because it has slightly better performance.
-| Component | Type of component to assign or replace. |
| Args | Types of arguments to use to construct the component. |
| entity | A valid entity identifier. |
| args | Parameters to use to initialize the component. |
Definition at line 994 of file registry.hpp.
- -
-
|
- -inline | -
Returns the number of entities still in use.
-Definition at line 304 of file registry.hpp.
- -
-
|
- -inline | -
Attaches the given tag to an entity.
-Usually, pools of components allocate enough memory to store a bunch of elements even if only one of them is used. On the other hand, there are cases where all what is needed is a single instance component to attach to an entity.
- Tags are the right tool to achieve the purpose.
| Tag | Type of tag to create. |
| Args | Types of arguments to use to construct the tag. |
| entity | A valid entity identifier. |
| args | Parameters to use to initialize the tag. |
Definition at line 657 of file registry.hpp.
- -
-
|
- -inline | -
Assigns the given component to an entity.
-A new instance of the given component is created and initialized with the arguments provided (the component must have a proper constructor or be of aggregate type). Then the component is assigned to the given entity.
-| Component | Type of component to create. |
| Args | Types of arguments to use to construct the component. |
| entity | A valid entity identifier. |
| args | Parameters to use to initialize the component. |
Definition at line 685 of file registry.hpp.
- -
-
|
- -inline | -
Gets the owner of the given tag, if any.
-| Tag | Type of tag of which to get the owner. |
Definition at line 963 of file registry.hpp.
- -
-
|
- -inline | -
Returns the capacity of the pool for the given component.
-| Component | Type of component in which one is interested. |
Definition at line 341 of file registry.hpp.
- -
-
|
- -inline | -
Returns the number of entities that a registry has currently allocated space for.
-Definition at line 350 of file registry.hpp.
- -
-
|
- -inline | -
Returns a sink object for the given tag.
-A sink is an opaque object used to connect listeners to tags.
- The sink returned by this function can be used to receive notifications whenever a new instance of the given tag is created and assigned to an entity.
The function type for a listener is:
Listeners are invoked after the tag has been assigned to the entity. The order of invocation of the listeners isn't guaranteed.
- Note also that the greater the number of listeners, the greater the performance hit when a new tag is created.
| Tag | Type of tag of which to get the sink. |
Definition at line 1027 of file registry.hpp.
- -
-
|
- -inline | -
Returns a sink object for the given component.
-A sink is an opaque object used to connect listeners to components.
- The sink returned by this function can be used to receive notifications whenever a new instance of the given component is created and assigned to an entity.
The function type for a listener is:
Listeners are invoked after the component has been assigned to the entity. The order of invocation of the listeners isn't guaranteed.
- Note also that the greater the number of listeners, the greater the performance hit when a new component is created.
| Component | Type of component of which to get the sink. |
Definition at line 1056 of file registry.hpp.
- -
-
|
- -inline | -
Checks if a persistent view has already been prepared.
-| Component | Types of components of the persistent view. |
Definition at line 1455 of file registry.hpp.
- -
-
|
- -inline | -
Creates a new entity and returns it.
-There are two kinds of entity identifiers:
-Users should not care about the type of the returned entity identifier. In case entity identifers are stored around, the valid member function can be used to know if they are still valid or the entity has been destroyed and potentially recycled.
The returned entity has no components nor tags assigned.
-Definition at line 521 of file registry.hpp.
- -
-
|
- -inline | -
Returns the actual version for an entity identifier.
-In case entity identifers are stored around, this function can be used to know if they are still valid or the entity has been destroyed and potentially recycled.
-| entity | A valid entity identifier. |
Definition at line 498 of file registry.hpp.
- -
-
|
- -inline | -
Direct access to the list of entities of a given pool.
-The returned pointer is such that range [data<Component>(), data<Component>() + size<Component>()] is always a valid range, even if the container is empty.
| Component | Type of component in which one is interested. |
Definition at line 426 of file registry.hpp.
- -
-
|
- -inline | -
Destroys the entity that owns the given tag, if any.
-Convenient shortcut to destroy an entity by means of a tag type.
- Syntactic sugar for the following snippet:
| Tag | Type of tag to use to search for the entity. |
Definition at line 556 of file registry.hpp.
- -
-
|
- -inline | -
Destroys an entity and lets the registry recycle the identifier.
-When an entity is destroyed, its version is updated and the identifier can be recycled at any time. In case entity identifers are stored around, the valid member function can be used to know if they are still valid or the entity has been destroyed and potentially recycled.
| entity | A valid entity identifier. |
Definition at line 582 of file registry.hpp.
- -
-
|
- -inline | -
Destroys the entities that own the given components, if any.
-Convenient shortcut to destroy a set of entities at once.
- Syntactic sugar for the following snippet:
| Component | Types of components to use to search for the entities. |
| Type | Type of view to use or empty to use a standard view. |
Definition at line 629 of file registry.hpp.
- -
-
|
- -inline | -
Returns a sink object for the given tag.
-A sink is an opaque object used to connect listeners to tag.
- The sink returned by this function can be used to receive notifications whenever an instance of the given tag is removed from an entity and thus destroyed.
The function type for a listener is:
Listeners are invoked before the tag has been removed from the entity. The order of invocation of the listeners isn't guaranteed.
- Note also that the greater the number of listeners, the greater the performance hit when a tag is destroyed.
| Tag | Type of tag of which to get the sink. |
Definition at line 1085 of file registry.hpp.
- -
-
|
- -inline | -
Returns a sink object for the given component.
-A sink is an opaque object used to connect listeners to components.
- The sink returned by this function can be used to receive notifications whenever an instance of the given component is removed from an entity and thus destroyed.
The function type for a listener is:
Listeners are invoked before the component has been removed from the entity. The order of invocation of the listeners isn't guaranteed.
- Note also that the greater the number of listeners, the greater the performance hit when a component is destroyed.
| Component | Type of component of which to get the sink. |
Definition at line 1114 of file registry.hpp.
- -
-
|
- -inline | -
Discards all the data structures used for a given persitent view.
-Persistent views occupy memory, no matter if they are in use or not.
- This function can be used to discard all the internal data structures dedicated to a specific persistent view, with the goal of reducing the memory pressure.
| Component | Types of components of the persistent view. |
Definition at line 1442 of file registry.hpp.
- -
-
|
- -inline | -
Iterates all the entities that are still in use.
-The function object is invoked for each entity that is still in use.
- The signature of the function should be equivalent to the following:
This function is fairly slow and should not be used frequently.
- Consider using a view if the goal is to iterate entities that have a determinate set of components. A view is usually faster than combining this function with a bunch of custom tests.
- On the other side, this function can be used to iterate all the entities that are in use, regardless of their components.
| Func | Type of the function object to invoke. |
| func | A valid function object. |
Definition at line 1282 of file registry.hpp.
- -
-
|
- -inline | -
Checks whether the pool of the given component is empty.
-| Component | Type of component in which one is interested. |
Definition at line 361 of file registry.hpp.
- -
-
|
- -inline | -
Checks if there exists at least an entity still in use.
-Definition at line 369 of file registry.hpp.
- -
-
|
- -inline | -
Returns the entity identifier without the version.
-| entity | An entity identifier, either valid or not. |
Definition at line 468 of file registry.hpp.
- -
-
|
- -inline | -
Checks if an entity identifier refers to a valid entity.
-Alternative version of valid. It accesses the internal data structures without bounds checking and thus it's both unsafe and risky to use.
- You should not invoke directly this function unless you know exactly what you are doing. Prefer the valid member function instead.
| entity | A valid entity identifier. |
Definition at line 457 of file registry.hpp.
- -
-
|
- -inline | -
Returns a reference to the given tag.
-| Tag | Type of tag to get. |
Definition at line 783 of file registry.hpp.
- -
-
|
- -inline | -
Returns a reference to the given tag.
-| Tag | Type of tag to get. |
Definition at line 801 of file registry.hpp.
- -
-
|
- -inline | -
Returns a reference to the given component for an entity.
-| Component | Type of component to get. |
| entity | A valid entity identifier. |
Definition at line 820 of file registry.hpp.
- -
-
|
- -inline | -
Returns a reference to the given component for an entity.
-| Component | Type of component to get. |
| entity | A valid entity identifier. |
Definition at line 841 of file registry.hpp.
- -
-
|
- -inline | -
Returns a reference to the given components for an entity.
-| Component | Type of components to get. |
| entity | A valid entity identifier. |
Definition at line 861 of file registry.hpp.
- -
-
|
- -inline | -
Returns a reference to the given components for an entity.
-| Component | Type of components to get. |
| entity | A valid entity identifier. |
Definition at line 881 of file registry.hpp.
- -
-
|
- -inline | -
Checks if the given tag has an owner.
-| Tag | Type of tag for which to perform the check. |
Definition at line 726 of file registry.hpp.
- -
-
|
- -inline | -
Checks if an entity owns the given tag.
-Syntactic sugar for the following snippet:
-| Tag | Type of tag for which to perform the check. |
| entity | A valid entity identifier. |
Definition at line 744 of file registry.hpp.
- -
-
|
- -inline | -
Checks if an entity has all the given components.
-| Component | Components for which to perform the check. |
| entity | A valid entity identifier. |
Definition at line 761 of file registry.hpp.
- -
-
|
- -inline | -
Changes the owner of the given tag.
-The ownership of the tag is transferred from one entity to another.
-| Tag | Type of tag of which to transfer the ownership. |
| entity | A valid entity identifier. |
Definition at line 950 of file registry.hpp.
- -
-
|
- -delete | -
Copying a registry isn't allowed.
-
-
|
- -default | -
Default move assignment operator.
-
-
|
- -inline | -
Checks if an entity is an orphan.
-An orphan is an entity that has neither assigned components nor tags.
-| entity | A valid entity identifier. |
Definition at line 1309 of file registry.hpp.
- -
-
|
- -inline | -
Iterates orphans and applies them the given function object.
-The function object is invoked for each entity that is still in use and has neither assigned components nor tags.
- The signature of the function should be equivalent to the following:
This function can be very slow and should not be used frequently.
-| Func | Type of the function object to invoke. |
| func | A valid function object. |
Definition at line 1343 of file registry.hpp.
- -
-
|
- -inline | -
Prepares the internal data structures used by persistent views.
-Persistent views are an incredibly fast tool used to iterate a packed array of entities all of which have specific components.
- The initialization of a persistent view is also a pretty cheap operation, but for the first time they are created. That's mainly because of the internal data structures of the registry that are dedicated to this kind of views and that don't exist yet the very first time they are requested.
- To avoid costly operations, internal data structures for persistent views can be prepared with this function. Just use the same set of components that would have been used otherwise to construct the view.
| Component | Types of components used to prepare the view. |
Definition at line 1407 of file registry.hpp.
- -
-
|
- -inline | -
Direct access to the list of components of a given pool.
-The returned pointer is such that range [raw<Component>(), raw<Component>() + size<Component>()] is always a valid range, even if the container is empty.
| Component | Type of component in which one is interested. |
Definition at line 388 of file registry.hpp.
- -
-
|
- -inline | -
Direct access to the list of components of a given pool.
-The returned pointer is such that range [raw<Component>(), raw<Component>() + size<Component>()] is always a valid range, even if the container is empty.
| Component | Type of component in which one is interested. |
Definition at line 407 of file registry.hpp.
- -
-
|
- -inline | -
Removes the given tag from its owner, if any.
-| Tag | Type of tag to remove. |
Definition at line 696 of file registry.hpp.
- -
-
|
- -inline | -
Removes the given component from an entity.
-| Component | Type of component to remove. |
| entity | A valid entity identifier. |
Definition at line 714 of file registry.hpp.
- -
-
|
- -inline | -
Replaces the given tag.
-A new instance of the given tag is created and initialized with the arguments provided (the tag must have a proper constructor or be of aggregate type).
-| Tag | Type of tag to replace. |
| Args | Types of arguments to use to construct the tag. |
| args | Parameters to use to initialize the tag. |
Definition at line 904 of file registry.hpp.
- -
-
|
- -inline | -
Replaces the given component for an entity.
-A new instance of the given component is created and initialized with the arguments provided (the component must have a proper constructor or be of aggregate type). Then the component is assigned to the given entity.
-| Component | Type of component to replace. |
| Args | Types of arguments to use to construct the component. |
| entity | A valid entity identifier. |
| args | Parameters to use to initialize the component. |
Definition at line 929 of file registry.hpp.
- -
-
|
- -inline | -
Increases the capacity of the pool for the given component.
-If the new capacity is greater than the current capacity, new storage is allocated, otherwise the method does nothing.
-| Component | Type of component for which to reserve storage. |
| cap | Desired capacity. |
Definition at line 318 of file registry.hpp.
- -
-
|
- -inline | -
Increases the capacity of a registry in terms of entities.
-If the new capacity is greater than the current capacity, new storage is allocated, otherwise the method does nothing.
-| cap | Desired capacity. |
Definition at line 331 of file registry.hpp.
- -
-
|
- -inline | -
Resets the given component for an entity.
-If the entity has an instance of the component, this function removes the component from the entity. Otherwise it does nothing.
-| Component | Type of component to reset. |
| entity | A valid entity identifier. |
Definition at line 1218 of file registry.hpp.
- -
-
|
- -inline | -
Resets the pool of the given component.
-For each entity that has an instance of the given component, the component itself is removed and thus destroyed.
-| Component | Type of component whose pool must be reset. |
Definition at line 1237 of file registry.hpp.
- -
-
|
- -inline | -
Resets a whole registry.
-Destroys all the entities. After a call to reset, all the entities still in use are recycled with a new version number. In case entity identifers are stored around, the valid member function can be used to know if they are still valid.
Definition at line 1254 of file registry.hpp.
- -
-
|
- -inline | -
Returns a temporary object to use to load snapshots.
-A snapshot is either a full or a partial dump of a registry.
- It can be used to save and restore its internal state or to keep two or more instances of this class in sync, as an example in a client-server architecture.
Definition at line 1613 of file registry.hpp.
- -
-
|
- -inline | -
Returns the number of existing components of the given type.
-| Component | Type of component of which to return the size. |
Definition at line 288 of file registry.hpp.
- -
-
|
- -inline | -
Returns the number of entities created so far.
-Definition at line 296 of file registry.hpp.
- -
-
|
- -inline | -
Returns a temporary object to use to create snapshots.
-A snapshot is either a full or a partial dump of a registry.
- It can be used to save and restore its internal state or to keep two or more instances of this class in sync, as an example in a client-server architecture.
Definition at line 1584 of file registry.hpp.
- -
-
|
- -inline | -
Sorts the pool of entities for the given component.
-The order of the elements in a pool is highly affected by assignments of components to entities and deletions. Components are arranged to maximize the performance during iterations and users should not make any assumption on the order.
- This function can be used to impose an order to the elements in the pool of the given component. The order is kept valid until a component of the given type is assigned or removed from an entity.
The comparison function object must return true if the first element is less than the second one, false otherwise. The signature of the comparison function should be equivalent to the following:
Moreover, the comparison function object shall induce a strict weak ordering on the values.
-The sort function oject must offer a member function template operator() that accepts three arguments:
The comparison funtion object received by the sort function object hasn't necessarily the type of the one passed along with the other parameters to this member function.
-| Component | Type of components to sort. |
| Compare | Type of comparison function object. |
| Sort | Type of sort function object. |
| Args | Types of arguments to forward to the sort function object. |
| compare | A valid comparison function object. |
| sort | A valid sort function object. |
| args | Arguments to forward to the sort function object, if any. |
Definition at line 1161 of file registry.hpp.
- -
-
|
- -inline | -
Sorts two pools of components in the same way.
-The order of the elements in a pool is highly affected by assignments of components to entities and deletions. Components are arranged to maximize the performance during iterations and users should not make any assumption on the order.
-It happens that different pools of components must be sorted the same way because of runtime and/or performance constraints. This function can be used to order a pool of components according to the order between the entities in another pool of components.
-How it works
-Being A and B the two sets where B is the master (the one the order of which rules) and A is the slave (the one to sort), after a call to this function an iterator for A will return the entities according to the following rules:
A that are also in B are returned first according to the order they have in B.A that are not in B are returned in no particular order after all the other entities.Any subsequent change to B won't affect the order in A.
| To | Type of components to sort. |
| From | Type of components to use to sort. |
Definition at line 1197 of file registry.hpp.
- -
-
|
- -inlinestatic | -
Returns the numeric identifier of a type of tag at runtime.
-The given tag doesn't need to be necessarily in use. However, the registry could decide to prepare internal data structures for it for later uses.
- Do not use this functionality to provide numeric identifiers to types at runtime.
| Tag | Type of tag to query. |
Definition at line 261 of file registry.hpp.
- -
-
|
- -inlinestatic | -
Returns the numeric identifier of a type of component at runtime.
-The given component doesn't need to be necessarily in use. However, the registry could decide to prepare internal data structures for it for later uses.
- Do not use this functionality to provide numeric identifiers to types at runtime.
| Component | Type of component to query. |
Definition at line 278 of file registry.hpp.
- -
-
|
- -inline | -
Checks if an entity identifier refers to a valid entity.
-| entity | An entity identifier, either valid or not. |
Definition at line 435 of file registry.hpp.
- -
-
|
- -inline | -
Returns the version stored along with an entity identifier.
-| entity | An entity identifier, either valid or not. |
Definition at line 477 of file registry.hpp.
- -
-
|
- -inline | -
Returns a standard view for the given components.
-This kind of views are created on the fly and share with the registry its internal data structures.
- Feel free to discard a view after the use. Creating and destroying a view is an incredibly cheap operation because they do not require any type of initialization.
- As a rule of thumb, storing a view should never be an option.
Standard views do their best to iterate the smallest set of candidate entities. In particular:
-| Component | Type of components used to construct the view. |
Definition at line 1386 of file registry.hpp.
- -
-
|
- -inline | -
Returns a persistent view for the given components.
-This kind of views are created on the fly and share with the registry its internal data structures.
- Feel free to discard a view after the use. Creating and destroying a view is an incredibly cheap operation because they do not require any type of initialization.
- As a rule of thumb, storing a view should never be an option.
Persistent views are the right choice to iterate entities when the number of components grows up and the most of the entities have all the given components.
- However they have also drawbacks:
That being said, persistent views are an incredibly powerful tool if used with care and offer a boost of performance undoubtedly.
-prepare member function to initialize the internal data structures used by persistent views when the registry is still empty. Initialization could be a costly operation otherwise and it will be performed the very first time each view is created.| Component | Types of components used to construct the view. |
Definition at line 1501 of file registry.hpp.
- -
-
|
- -inline | -
Returns a raw view for the given component.
-This kind of views are created on the fly and share with the registry its internal data structures.
- Feel free to discard a view after the use. Creating and destroying a view is an incredibly cheap operation because they do not require any type of initialization.
- As a rule of thumb, storing a view should never be an option.
Raw views are incredibly fast and must be considered the best tool to iterate components whenever knowing the entities to which they belong isn't required.
-| Component | Type of component used to construct the view. |
Definition at line 1531 of file registry.hpp.
- -
-
|
- -inline | -
Returns a runtime view for the given components.
-This kind of views are created on the fly and share with the registry its internal data structures.
- Users should throw away the view after use. Fortunately, creating and destroying a view is an incredibly cheap operation because they do not require any type of initialization.
- As a rule of thumb, storing a view should never be an option.
Runtime views are well suited when users want to construct a view from some external inputs and don't know at compile-time what are the required components.
- This is particularly well suited to plugin systems and mods in general.
| It | Type of forward iterator. |
| first | An iterator to the first element of the range of components. |
| last | An iterator past the last element of the range of components. |
Definition at line 1563 of file registry.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1ResourceCache-members.html b/classentt_1_1ResourceCache-members.html
deleted file mode 100644
index 5926cbd25..000000000
--- a/classentt_1_1ResourceCache-members.html
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::ResourceCache< Resource >, including all inherited members.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1ResourceHandle-members.html b/classentt_1_1ResourceHandle-members.html
deleted file mode 100644
index ddd8a7b34..000000000
--- a/classentt_1_1ResourceHandle-members.html
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::ResourceHandle< Resource >, including all inherited members.
-| get() const ENTT_NOEXCEPT | entt::ResourceHandle< Resource > | inline |
| operator bool() const | entt::ResourceHandle< Resource > | inlineexplicit |
| operator const Resource &() const ENTT_NOEXCEPT | entt::ResourceHandle< Resource > | inline |
| operator*() const ENTT_NOEXCEPT | entt::ResourceHandle< Resource > | inline |
| operator->() const ENTT_NOEXCEPT | entt::ResourceHandle< Resource > | inline |
| operator=(const ResourceHandle &) ENTT_NOEXCEPT=default | entt::ResourceHandle< Resource > | |
| operator=(ResourceHandle &&) ENTT_NOEXCEPT=default | entt::ResourceHandle< Resource > | |
| ResourceCache< Resource > class | entt::ResourceHandle< Resource > | friend |
| ResourceHandle(const ResourceHandle &) ENTT_NOEXCEPT=default | entt::ResourceHandle< Resource > | |
| ResourceHandle(ResourceHandle &&) ENTT_NOEXCEPT=default | entt::ResourceHandle< Resource > |
- 1.8.13
-
-
-
diff --git a/classentt_1_1RuntimeView-members.html b/classentt_1_1RuntimeView-members.html
deleted file mode 100644
index 54314c300..000000000
--- a/classentt_1_1RuntimeView-members.html
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::RuntimeView< Entity >, including all inherited members.
-| begin() const ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| begin() ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| cbegin() const ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| cend() const ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| const_iterator_type typedef | entt::RuntimeView< Entity > | |
| contains(const entity_type entity) const ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| each(Func func) const | entt::RuntimeView< Entity > | inline |
| empty() const ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| end() const ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| end() ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| entity_type typedef | entt::RuntimeView< Entity > | |
| iterator_type typedef | entt::RuntimeView< Entity > | |
| Registry< Entity > class | entt::RuntimeView< Entity > | friend |
| size() const ENTT_NOEXCEPT | entt::RuntimeView< Entity > | inline |
| size_type typedef | entt::RuntimeView< Entity > |
- 1.8.13
-
-
-
diff --git a/classentt_1_1RuntimeView.html b/classentt_1_1RuntimeView.html
deleted file mode 100644
index 2e93ddb34..000000000
--- a/classentt_1_1RuntimeView.html
+++ /dev/null
@@ -1,540 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Runtime view. - More...
- -#include <view.hpp>
-Public Types | |
| -using | entity_type = typename view_type::entity_type |
| Underlying entity identifier. | |
| -using | size_type = typename view_type::size_type |
| Unsigned integer type. | |
| -using | iterator_type = Iterator |
| Input iterator type. | |
| -using | const_iterator_type = Iterator |
| Constant input iterator type. | |
-Public Member Functions | |
| size_type | size () const ENTT_NOEXCEPT |
| Estimates the number of entities that have the given components. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks if the view is definitely empty. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| bool | contains (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a view contains an entity. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates entities and applies the given function object to them. More... | |
-Friends | |
| -class | Registry< Entity > |
| A registry is allowed to create views. | |
Runtime view.
-Runtime views iterate over those entities that have at least all the given components in their bags. During initialization, a runtime view looks at the number of entities available for each component and picks up a reference to the smallest set of candidate entities in order to get a performance boost when iterate.
- Order of elements during iterations are highly dependent on the order of the underlying data structures. See SparseSet and its specializations for more details.
Important
-Iterators aren't invalidated if:
-In all the other cases, modifying the pools of the given components in any way invalidates all the iterators and using them results in undefined behavior.
-| Entity | A valid entity type (see entt_traits for more details). |
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
-
|
- -inline | -
Iterates entities and applies the given function object to them.
-The function object is invoked for each entity. It is provided only with the entity itself. To get the components, users can use the registry with which the view was built.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
- 1.8.13
-
-
-
diff --git a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4-members.html b/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4-members.html
deleted file mode 100644
index 9a669e7a7..000000000
--- a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4-members.html
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::SigH< Ret(Args...), Collector >, including all inherited members.
-| collect(Args... args) const | entt::SigH< Ret(Args...), Collector > | inline |
| collector_type typedef | entt::SigH< Ret(Args...), Collector > | |
| empty() const ENTT_NOEXCEPT | entt::SigH< Ret(Args...), Collector > | inline |
| instance_type typedef | entt::SigH< Ret(Args...), Collector > | |
| operator==(const SigH &other) const ENTT_NOEXCEPT | entt::SigH< Ret(Args...), Collector > | inline |
| publish(Args... args) const | entt::SigH< Ret(Args...), Collector > | inline |
| sink() ENTT_NOEXCEPT | entt::SigH< Ret(Args...), Collector > | inline |
| sink_type typedef | entt::SigH< Ret(Args...), Collector > | |
| size() const ENTT_NOEXCEPT | entt::SigH< Ret(Args...), Collector > | inline |
| size_type typedef | entt::SigH< Ret(Args...), Collector > | |
| swap(SigH &lhs, SigH &rhs) | entt::SigH< Ret(Args...), Collector > | friend |
- 1.8.13
-
-
-
diff --git a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.map b/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.map
deleted file mode 100644
index 8c2e222a4..000000000
--- a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.map
+++ /dev/null
@@ -1,2 +0,0 @@
-
diff --git a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.md5 b/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.md5
deleted file mode 100644
index 6984d2f8c..000000000
--- a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-5912f9063856265db81c2fd46ab86e10
\ No newline at end of file
diff --git a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.png b/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.png
deleted file mode 100644
index b450694bb..000000000
Binary files a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__coll__graph.png and /dev/null differ
diff --git a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.map b/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.map
deleted file mode 100644
index 8c2e222a4..000000000
--- a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.map
+++ /dev/null
@@ -1,2 +0,0 @@
-
diff --git a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.md5 b/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.md5
deleted file mode 100644
index 875b972b2..000000000
--- a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-10a9db26013b49724b6014469940db4c
\ No newline at end of file
diff --git a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.png b/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.png
deleted file mode 100644
index b450694bb..000000000
Binary files a/classentt_1_1SigH_3_01Ret_07Args_8_8_8_08_00_01Collector_01_4__inherit__graph.png and /dev/null differ
diff --git a/classentt_1_1Sink_3_01Ret_07Args_8_8_8_08_4.html b/classentt_1_1Sink_3_01Ret_07Args_8_8_8_08_4.html
deleted file mode 100644
index 5148ae011..000000000
--- a/classentt_1_1Sink_3_01Ret_07Args_8_8_8_08_4.html
+++ /dev/null
@@ -1,467 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Sink implementation. - More...
- -#include <sigh.hpp>
-Public Member Functions | |
| template<Ret(*)(Args...) Function> | |
| void | connect () |
| Connects a free function to a signal. More... | |
| template<typename Class , Ret(Class::*)(Args...) const Member = &Class::receive> | |
| void | connect (Class *instance) |
| Connects a member function for a given instance to a signal. More... | |
| template<typename Class , Ret(Class::*)(Args...) Member = &Class::receive> | |
| void | connect (Class *instance) |
| Connects a member function for a given instance to a signal. More... | |
| template<Ret(*)(Args...) Function> | |
| void | disconnect () |
| Disconnects a free function from a signal. More... | |
| template<typename Class , Ret(Class::*)(Args...) const Member> | |
| void | disconnect (Class *instance) |
| Disconnects the given member function from a signal. More... | |
| template<typename Class , Ret(Class::*)(Args...) Member> | |
| void | disconnect (Class *instance) |
| Disconnects the given member function from a signal. More... | |
| template<typename Class > | |
| void | disconnect (Class *instance) |
| Removes all existing connections for the given instance. More... | |
| -void | disconnect () |
| Disconnects all the listeners from a signal. | |
-Friends | |
| -template<typename , typename > | |
| class | SigH |
| A signal is allowed to create sinks. | |
Sink implementation.
-A sink is an opaque object used to connect listeners to signals.
- The function type for a listener is the one of the signal to which it belongs.
The clear separation between a signal and a sink permits to store the former as private data member without exposing the publish functionality to the users of a class.
-| Ret | Return type of a function type. |
| Args | Types of arguments of a function type. |
-
|
- -inline | -
-
|
- -inline | -
Connects a member function for a given instance to a signal.
-The signal isn't responsible for the connected object. Users must guarantee that the lifetime of the instance overcomes the one of the signal. On the other side, the signal handler performs checks to avoid multiple connections for the same member function of a given instance.
-| Class | Type of class to which the member function belongs. |
| Member | Member function to connect to the signal. |
| instance | A valid instance of type pointer to Class. |
-
|
- -inline | -
Connects a member function for a given instance to a signal.
-The signal isn't responsible for the connected object. Users must guarantee that the lifetime of the instance overcomes the one of the signal. On the other side, the signal handler performs checks to avoid multiple connections for the same member function of a given instance.
-| Class | Type of class to which the member function belongs. |
| Member | Member function to connect to the signal. |
| instance | A valid instance of type pointer to Class. |
-
|
- -inline | -
-
|
- -inline | -
Disconnects the given member function from a signal.
-| Class | Type of class to which the member function belongs. |
| Member | Member function to connect to the signal. |
| instance | A valid instance of type pointer to Class. |
-
|
- -inline | -
Disconnects the given member function from a signal.
-| Class | Type of class to which the member function belongs. |
| Member | Member function to connect to the signal. |
| instance | A valid instance of type pointer to Class. |
-
|
- -inline | -
- 1.8.13
-
-
-
diff --git a/classentt_1_1Snapshot-members.html b/classentt_1_1Snapshot-members.html
deleted file mode 100644
index 67783580c..000000000
--- a/classentt_1_1Snapshot-members.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::Snapshot< Entity >, including all inherited members.
-| component(Archive &archive) const | entt::Snapshot< Entity > | inline |
| component(Archive &archive) const | entt::Snapshot< Entity > | inline |
| component(Archive &archive, It first, It last) const | entt::Snapshot< Entity > | inline |
| destroyed(Archive &archive) const | entt::Snapshot< Entity > | inline |
| entities(Archive &archive) const | entt::Snapshot< Entity > | inline |
| operator=(const Snapshot &)=delete | entt::Snapshot< Entity > | |
| operator=(Snapshot &&)=default | entt::Snapshot< Entity > | |
| Registry< Entity > class | entt::Snapshot< Entity > | friend |
| Snapshot(const Snapshot &)=delete | entt::Snapshot< Entity > | |
| Snapshot(Snapshot &&)=default | entt::Snapshot< Entity > | |
| tag(Archive &archive) const | entt::Snapshot< Entity > | inline |
| tag(Archive &archive) const | entt::Snapshot< Entity > | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1Snapshot.html b/classentt_1_1Snapshot.html
deleted file mode 100644
index 7d41bf86a..000000000
--- a/classentt_1_1Snapshot.html
+++ /dev/null
@@ -1,581 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Utility class to create snapshots from a registry. - More...
- -#include <snapshot.hpp>
-Public Member Functions | |
| - | Snapshot (const Snapshot &)=delete |
| Copying a snapshot isn't allowed. | |
| - | Snapshot (Snapshot &&)=default |
| Default move constructor. | |
| Snapshot & | operator= (const Snapshot &)=delete |
| Copying a snapshot isn't allowed. More... | |
| Snapshot & | operator= (Snapshot &&)=default |
| Default move assignment operator. More... | |
| template<typename Archive > | |
| const Snapshot & | entities (Archive &archive) const |
| Puts aside all the entities that are still in use. More... | |
| template<typename Archive > | |
| const Snapshot & | destroyed (Archive &archive) const |
| Puts aside destroyed entities. More... | |
| template<typename Component , typename Archive > | |
| const Snapshot & | component (Archive &archive) const |
| Puts aside the given component. More... | |
| template<typename... Component, typename Archive > | |
| std::enable_if_t<(sizeof...(Component) > 1), const Snapshot & > | component (Archive &archive) const |
| Puts aside the given components. More... | |
| template<typename... Component, typename Archive , typename It > | |
| const Snapshot & | component (Archive &archive, It first, It last) const |
| Puts aside the given components for the entities in a range. More... | |
| template<typename Tag , typename Archive > | |
| const Snapshot & | tag (Archive &archive) const |
| Puts aside the given tag. More... | |
| template<typename... Tag, typename Archive > | |
| std::enable_if_t<(sizeof...(Tag) > 1), const Snapshot & > | tag (Archive &archive) const |
| Puts aside the given tags. More... | |
-Friends | |
| -class | Registry< Entity > |
| A registry is allowed to create snapshots. | |
Utility class to create snapshots from a registry.
-A snapshot can be either a dump of the entire registry or a narrower selection of components and tags of interest.
- This type can be used in both cases if provided with a correctly configured output archive.
| Entity | A valid entity type (see entt_traits for more details). |
Definition at line 38 of file snapshot.hpp.
-
-
|
- -inline | -
Puts aside the given component.
-Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.
-| Component | Type of component to serialize. |
| Archive | Type of output archive. |
| archive | A valid reference to an output archive. |
Definition at line 148 of file snapshot.hpp.
- -
-
|
- -inline | -
Puts aside the given components.
-Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.
-| Component | Types of components to serialize. |
| Archive | Type of output archive. |
| archive | A valid reference to an output archive. |
Definition at line 175 of file snapshot.hpp.
- -
-
|
- -inline | -
Puts aside the given components for the entities in a range.
-Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.
-| Component | Types of components to serialize. |
| Archive | Type of output archive. |
| It | Type of input iterator. |
| archive | A valid reference to an output archive. |
| first | An iterator to the first element of the range to serialize. |
| last | An iterator past the last element of the range to serialize. |
Definition at line 197 of file snapshot.hpp.
- -
-
|
- -inline | -
Puts aside destroyed entities.
-Entities are serialized along with their versions. Entities that are still in use are not taken in consideration by this function.
-| Archive | Type of output archive. |
| archive | A valid reference to an output archive. |
Definition at line 119 of file snapshot.hpp.
- -
-
|
- -inline | -
Puts aside all the entities that are still in use.
-Entities are serialized along with their versions. Destroyed entities are not taken in consideration by this function.
-| Archive | Type of output archive. |
| archive | A valid reference to an output archive. |
Definition at line 102 of file snapshot.hpp.
- -
-
|
- -delete | -
Copying a snapshot isn't allowed.
-
-
|
- -default | -
Default move assignment operator.
-
-
|
- -inline | -
Puts aside the given tag.
-Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.
-| Tag | Type of tag to serialize. |
| Archive | Type of output archive. |
| archive | A valid reference to an output archive. |
Definition at line 214 of file snapshot.hpp.
- -
-
|
- -inline | -
Puts aside the given tags.
-Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.
-| Tag | Types of tags to serialize. |
| Archive | Type of output archive. |
| archive | A valid reference to an output archive. |
Definition at line 240 of file snapshot.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1SnapshotLoader-members.html b/classentt_1_1SnapshotLoader-members.html
deleted file mode 100644
index 7b01374e6..000000000
--- a/classentt_1_1SnapshotLoader-members.html
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::SnapshotLoader< Entity >, including all inherited members.
-| component(Archive &archive) const | entt::SnapshotLoader< Entity > | inline |
| destroyed(Archive &archive) const | entt::SnapshotLoader< Entity > | inline |
| entities(Archive &archive) const | entt::SnapshotLoader< Entity > | inline |
| operator=(const SnapshotLoader &)=delete | entt::SnapshotLoader< Entity > | |
| operator=(SnapshotLoader &&)=default | entt::SnapshotLoader< Entity > | |
| orphans() const | entt::SnapshotLoader< Entity > | inline |
| Registry< Entity > class | entt::SnapshotLoader< Entity > | friend |
| SnapshotLoader(const SnapshotLoader &)=delete | entt::SnapshotLoader< Entity > | |
| SnapshotLoader(SnapshotLoader &&)=default | entt::SnapshotLoader< Entity > | |
| tag(Archive &archive) const | entt::SnapshotLoader< Entity > | inline |
- 1.8.13
-
-
-
diff --git a/classentt_1_1SnapshotLoader.html b/classentt_1_1SnapshotLoader.html
deleted file mode 100644
index b715f0237..000000000
--- a/classentt_1_1SnapshotLoader.html
+++ /dev/null
@@ -1,440 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Utility class to restore a snapshot as a whole. - More...
- -#include <snapshot.hpp>
-Public Member Functions | |
| - | SnapshotLoader (const SnapshotLoader &)=delete |
| Copying a snapshot loader isn't allowed. | |
| - | SnapshotLoader (SnapshotLoader &&)=default |
| Default move constructor. | |
| SnapshotLoader & | operator= (const SnapshotLoader &)=delete |
| Copying a snapshot loader isn't allowed. More... | |
| SnapshotLoader & | operator= (SnapshotLoader &&)=default |
| Default move assignment operator. More... | |
| template<typename Archive > | |
| const SnapshotLoader & | entities (Archive &archive) const |
| Restores entities that were in use during serialization. More... | |
| template<typename Archive > | |
| const SnapshotLoader & | destroyed (Archive &archive) const |
| Restores entities that were destroyed during serialization. More... | |
| template<typename... Component, typename Archive > | |
| const SnapshotLoader & | component (Archive &archive) const |
| Restores components and assigns them to the right entities. More... | |
| template<typename... Tag, typename Archive > | |
| const SnapshotLoader & | tag (Archive &archive) const |
| Restores tags and assigns them to the right entities. More... | |
| const SnapshotLoader & | orphans () const |
| Destroys those entities that have neither components nor tags. More... | |
-Friends | |
| -class | Registry< Entity > |
| A registry is allowed to create snapshot loaders. | |
Utility class to restore a snapshot as a whole.
-A snapshot loader requires that the destination registry be empty and loads all the data at once while keeping intact the identifiers that the entities originally had.
- An example of use is the implementation of a save/restore utility.
| Entity | A valid entity type (see entt_traits for more details). |
Definition at line 265 of file snapshot.hpp.
-
-
|
- -inline | -
Restores components and assigns them to the right entities.
-The template parameter list must be exactly the same used during serialization. In the event that the entity to which the component is assigned doesn't exist yet, the loader will take care to create it with the version it originally had.
-| Component | Types of components to restore. |
| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 365 of file snapshot.hpp.
- -
-
|
- -inline | -
Restores entities that were destroyed during serialization.
-This function restores the entities that were destroyed during serialization and gives them the versions they originally had.
-| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 345 of file snapshot.hpp.
- -
-
|
- -inline | -
Restores entities that were in use during serialization.
-This function restores the entities that were in use during serialization and gives them the versions they originally had.
-| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 328 of file snapshot.hpp.
- -
-
|
- -delete | -
Copying a snapshot loader isn't allowed.
-
-
|
- -default | -
Default move assignment operator.
-
-
|
- -inline | -
Destroys those entities that have neither components nor tags.
-In case all the entities were serialized but only part of the components and tags was saved, it could happen that some of the entities have neither components nor tags once restored.
- This functions helps to identify and destroy those entities.
Definition at line 403 of file snapshot.hpp.
- -
-
|
- -inline | -
Restores tags and assigns them to the right entities.
-The template parameter list must be exactly the same used during serialization. In the event that the entity to which the tag is assigned doesn't exist yet, the loader will take care to create it with the version it originally had.
-| Tag | Types of tags to restore. |
| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 386 of file snapshot.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4-members.html b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4-members.html
deleted file mode 100644
index 2f8c4538c..000000000
--- a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4-members.html
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::SparseSet< Entity, Type >, including all inherited members.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4.html b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4.html
deleted file mode 100644
index 796493cd9..000000000
--- a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4.html
+++ /dev/null
@@ -1,1148 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Extended sparse set implementation. - More...
- -#include <sparse_set.hpp>


-Public Types | |
| -using | object_type = Type |
| Type of the objects associated to the entities. | |
| -using | entity_type = typename underlying_type::entity_type |
| Underlying entity identifier. | |
| -using | size_type = typename underlying_type::size_type |
| Unsigned integer type. | |
| -using | iterator_type = Iterator< false > |
| Input iterator type. | |
| -using | const_iterator_type = Iterator< true > |
| Constant input iterator type. | |
Public Types inherited from entt::SparseSet< Entity > | |
| -using | entity_type = Entity |
| Underlying entity identifier. | |
| -using | size_type = std::size_t |
| Unsigned integer type. | |
| -using | iterator_type = Iterator |
| Input iterator type. | |
| -using | const_iterator_type = Iterator |
| Constant input iterator type. | |
-Public Member Functions | |
| - | SparseSet () ENTT_NOEXCEPT=default |
| Default constructor. | |
| - | SparseSet (const SparseSet &)=delete |
| Copying a sparse set isn't allowed. | |
| - | SparseSet (SparseSet &&)=default |
| Default move constructor. | |
| SparseSet & | operator= (const SparseSet &)=delete |
| Copying a sparse set isn't allowed. More... | |
| SparseSet & | operator= (SparseSet &&)=default |
| Default move assignment operator. More... | |
| void | reserve (const size_type cap) |
| Increases the capacity of a sparse set. More... | |
| const object_type * | raw () const ENTT_NOEXCEPT |
| Direct access to the array of objects. More... | |
| object_type * | raw () ENTT_NOEXCEPT |
| Direct access to the array of objects. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const object_type & | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| object_type & | operator[] (const size_type pos) ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| const object_type & | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the object associated to an entity. More... | |
| object_type & | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns the object associated to an entity. More... | |
| template<typename... Args> | |
| std::enable_if_t< std::is_constructible< Type, Args... >::value, object_type & > | construct (const entity_type entity, Args &&... args) |
| Assigns an entity to a sparse set and constructs its object. More... | |
| template<typename... Args> | |
| std::enable_if_t<!std::is_constructible< Type, Args... >::value, object_type & > | construct (const entity_type entity, Args &&... args) |
| Assigns an entity to a sparse set and constructs its object. More... | |
| void | destroy (const entity_type entity) override |
| Removes an entity from a sparse set and destroies its object. More... | |
| template<typename Compare , typename Sort = StdSort, typename... Args> | |
| void | sort (Compare compare, Sort sort=Sort{}, Args &&... args) |
| Sort components according to the given comparison function. More... | |
| void | respect (const SparseSet< Entity > &other) ENTT_NOEXCEPT |
| Sort components according to the order of the entities in another sparse set. More... | |
| -void | reset () override |
| Resets a sparse set. | |
Public Member Functions inherited from entt::SparseSet< Entity > | |
| - | SparseSet () ENTT_NOEXCEPT=default |
| Default constructor. | |
| -virtual | ~SparseSet () ENTT_NOEXCEPT=default |
| Default destructor. | |
| - | SparseSet (const SparseSet &)=delete |
| Copying a sparse set isn't allowed. | |
| - | SparseSet (SparseSet &&)=default |
| Default move constructor. | |
| SparseSet & | operator= (const SparseSet &)=delete |
| Copying a sparse set isn't allowed. More... | |
| SparseSet & | operator= (SparseSet &&)=default |
| Default move assignment operator. More... | |
| void | reserve (const size_type cap) |
| Increases the capacity of a sparse set. More... | |
| size_type | capacity () const ENTT_NOEXCEPT |
| Returns the number of elements that a sparse set has currently allocated space for. More... | |
| size_type | extent () const ENTT_NOEXCEPT |
| Returns the extent of a sparse set. More... | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of elements in a sparse set. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether a sparse set is empty. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the internal packed array. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const entity_type & | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| bool | has (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a sparse set contains an entity. More... | |
| bool | fast (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a sparse set contains an entity (unsafe). More... | |
| size_type | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the position of an entity in a sparse set. More... | |
| void | construct (const entity_type entity) |
| Assigns an entity to a sparse set. More... | |
| void | swap (const size_type lhs, const size_type rhs) ENTT_NOEXCEPT |
| Swaps the position of two entities in the internal packed array. More... | |
| void | respect (const SparseSet< Entity > &other) ENTT_NOEXCEPT |
| Sort entities according to their order in another sparse set. More... | |
Extended sparse set implementation.
-This specialization of a sparse set associates an object to an entity. The main purpose of this class is to use sparse sets to store components in a Registry. It guarantees fast access both to the elements and to the entities.
-raw and size member functions for that). Use begin and end instead.| Entity | A valid entity type (see entt_traits for more details). |
| Type | Type of objects assigned to the entities. |
Definition at line 576 of file sparse_set.hpp.
-
-
|
- -inline | -
Returns an iterator to the beginning.
-The returned iterator points to the first instance of the given type. If the sparse set is empty, the returned iterator will be equal to end().
sort or respect.Definition at line 790 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns an iterator to the beginning.
-The returned iterator points to the first instance of the given type. If the sparse set is empty, the returned iterator will be equal to end().
sort or respect.Definition at line 806 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns an iterator to the beginning.
-The returned iterator points to the first instance of the given type. If the sparse set is empty, the returned iterator will be equal to end().
sort or respect.Definition at line 773 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns an iterator to the end.
-The returned iterator points to the element following the last instance of the given type. Attempting to dereference the returned iterator results in undefined behavior.
-sort or respect.Definition at line 825 of file sparse_set.hpp.
- -
-
|
- -inline | -
Assigns an entity to a sparse set and constructs its object.
-| Args | Types of arguments to use to construct the object. |
| entity | A valid entity identifier. |
| args | Parameters to use to construct an object for the entity. |
Definition at line 937 of file sparse_set.hpp.
- -
-
|
- -inline | -
Assigns an entity to a sparse set and constructs its object.
-| Args | Types of arguments to use to construct the object. |
| entity | A valid entity identifier. |
| args | Parameters to use to construct an object for the entity. |
Definition at line 965 of file sparse_set.hpp.
- -
-
|
- -inlineoverridevirtual | -
Removes an entity from a sparse set and destroies its object.
-| entity | A valid entity identifier. |
Reimplemented from entt::SparseSet< Entity >.
- -Definition at line 982 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns an iterator to the end.
-The returned iterator points to the element following the last instance of the given type. Attempting to dereference the returned iterator results in undefined behavior.
-sort or respect.Definition at line 843 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns an iterator to the end.
-The returned iterator points to the element following the last instance of the given type. Attempting to dereference the returned iterator results in undefined behavior.
-sort or respect.Definition at line 861 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns the object associated to an entity.
-| entity | A valid entity identifier. |
Definition at line 895 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns the object associated to an entity.
-| entity | A valid entity identifier. |
Definition at line 911 of file sparse_set.hpp.
- -
-
|
- -delete | -
Copying a sparse set isn't allowed.
-
-
|
- -default | -
Default move assignment operator.
-
-
|
- -inline | -
Returns a reference to the element at the given position.
-| pos | Position of the element to return. |
Definition at line 870 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns a reference to the element at the given position.
-| pos | Position of the element to return. |
Definition at line 879 of file sparse_set.hpp.
- -
-
|
- -inline | -
Direct access to the array of objects.
-The returned pointer is such that range [raw(), raw() + size()] is always a valid range, even if the container is empty.
sort or respect has been previously invoked. Internal data structures arrange elements to maximize performance. Accessing them directly gives a performance boost but less guarantees. Use begin and end if you want to iterate the sparse set in the expected order.Definition at line 738 of file sparse_set.hpp.
- -
-
|
- -inline | -
Direct access to the array of objects.
-The returned pointer is such that range [raw(), raw() + size()] is always a valid range, even if the container is empty.
sort or respect has been previously invoked. Internal data structures arrange elements to maximize performance. Accessing them directly gives a performance boost but less guarantees. Use begin and end if you want to iterate the sparse set in the expected order.Definition at line 757 of file sparse_set.hpp.
- -
-
|
- -inline | -
Increases the capacity of a sparse set.
-If the new capacity is greater than the current capacity, new storage is allocated, otherwise the method does nothing.
-| cap | Desired capacity. |
Definition at line 718 of file sparse_set.hpp.
- -
-
|
- -inline | -
Sort components according to the order of the entities in another sparse set.
-Entities that are part of both the sparse sets are ordered internally according to the order they have in other. All the other entities goes to the end of the list and there are no guarantess on their order. Components are sorted according to the entities to which they belong.
- In other terms, this function can be used to impose the same order on two sets by using one of them as a master and the other one as a slave.
Iterating the sparse set with a couple of iterators returns elements in the expected order after a call to respect. See begin and end for more details.
data or raw gives no guarantees on the order, even though respect has been invoked.| other | The sparse sets that imposes the order of the entities. |
Definition at line 1080 of file sparse_set.hpp.
- -
-
|
- -inline | -
Sort components according to the given comparison function.
-Sort the elements so that iterating the sparse set with a couple of iterators returns them in the expected order. See begin and end for more details.
The comparison function object must return true if the first element is less than the second one, false otherwise. The signature of the comparison function should be equivalent to the following:
Moreover, the comparison function object shall induce a strict weak ordering on the values.
-The sort function oject must offer a member function template operator() that accepts three arguments:
The comparison funtion object received by the sort function object hasn't necessarily the type of the one passed along with the other parameters to this member function.
-data or raw gives no guarantees on the order, even though sort has been invoked.| Compare | Type of comparison function object. |
| Sort | Type of sort function object. |
| Args | Types of arguments to forward to the sort function object. |
| compare | A valid comparison function object. |
| sort | A valid sort function object. |
| args | Arguments to forward to the sort function object, if any. |
Definition at line 1033 of file sparse_set.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.map b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.map
deleted file mode 100644
index afb611447..000000000
--- a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.map
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.md5 b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.md5
deleted file mode 100644
index 0397c6a51..000000000
--- a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-9dd00cc071bb6f77cee0a01806ec26e8
\ No newline at end of file
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.png b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.png
deleted file mode 100644
index 60efc29ea..000000000
Binary files a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__coll__graph.png and /dev/null differ
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.map b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.map
deleted file mode 100644
index afb611447..000000000
--- a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.map
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.md5 b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.md5
deleted file mode 100644
index 90dfdf9e9..000000000
--- a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-5d66a969af4ef8af36b07c3ce805bc3f
\ No newline at end of file
diff --git a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.png b/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.png
deleted file mode 100644
index 60efc29ea..000000000
Binary files a/classentt_1_1SparseSet_3_01Entity_00_01Type_01_4__inherit__graph.png and /dev/null differ
diff --git a/classentt_1_1SparseSet_3_01Entity_01_4-members.html b/classentt_1_1SparseSet_3_01Entity_01_4-members.html
deleted file mode 100644
index a0346757b..000000000
--- a/classentt_1_1SparseSet_3_01Entity_01_4-members.html
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::SparseSet< Entity >, including all inherited members.
-| begin() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| begin() ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| capacity() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| cbegin() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| cend() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| const_iterator_type typedef | entt::SparseSet< Entity > | |
| construct(const entity_type entity) | entt::SparseSet< Entity > | inline |
| data() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| destroy(const entity_type entity) | entt::SparseSet< Entity > | inlinevirtual |
| empty() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| end() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| end() ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| entity_type typedef | entt::SparseSet< Entity > | |
| extent() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| fast(const entity_type entity) const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| get(const entity_type entity) const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| has(const entity_type entity) const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| iterator_type typedef | entt::SparseSet< Entity > | |
| operator=(const SparseSet &)=delete | entt::SparseSet< Entity > | |
| operator=(SparseSet &&)=default | entt::SparseSet< Entity > | |
| operator[](const size_type pos) const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| reserve(const size_type cap) | entt::SparseSet< Entity > | inline |
| reset() | entt::SparseSet< Entity > | inlinevirtual |
| respect(const SparseSet< Entity > &other) ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| size() const ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| size_type typedef | entt::SparseSet< Entity > | |
| SparseSet() ENTT_NOEXCEPT=default | entt::SparseSet< Entity > | |
| SparseSet(const SparseSet &)=delete | entt::SparseSet< Entity > | |
| SparseSet(SparseSet &&)=default | entt::SparseSet< Entity > | |
| swap(const size_type lhs, const size_type rhs) ENTT_NOEXCEPT | entt::SparseSet< Entity > | inline |
| ~SparseSet() ENTT_NOEXCEPT=default | entt::SparseSet< Entity > | virtual |
- 1.8.13
-
-
-
diff --git a/classentt_1_1SparseSet_3_01Entity_01_4.html b/classentt_1_1SparseSet_3_01Entity_01_4.html
deleted file mode 100644
index 675c39976..000000000
--- a/classentt_1_1SparseSet_3_01Entity_01_4.html
+++ /dev/null
@@ -1,1036 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Basic sparse set implementation. - More...
- -#include <sparse_set.hpp>

-Public Types | |
| -using | entity_type = Entity |
| Underlying entity identifier. | |
| -using | size_type = std::size_t |
| Unsigned integer type. | |
| -using | iterator_type = Iterator |
| Input iterator type. | |
| -using | const_iterator_type = Iterator |
| Constant input iterator type. | |
-Public Member Functions | |
| - | SparseSet () ENTT_NOEXCEPT=default |
| Default constructor. | |
| -virtual | ~SparseSet () ENTT_NOEXCEPT=default |
| Default destructor. | |
| - | SparseSet (const SparseSet &)=delete |
| Copying a sparse set isn't allowed. | |
| - | SparseSet (SparseSet &&)=default |
| Default move constructor. | |
| SparseSet & | operator= (const SparseSet &)=delete |
| Copying a sparse set isn't allowed. More... | |
| SparseSet & | operator= (SparseSet &&)=default |
| Default move assignment operator. More... | |
| void | reserve (const size_type cap) |
| Increases the capacity of a sparse set. More... | |
| size_type | capacity () const ENTT_NOEXCEPT |
| Returns the number of elements that a sparse set has currently allocated space for. More... | |
| size_type | extent () const ENTT_NOEXCEPT |
| Returns the extent of a sparse set. More... | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of elements in a sparse set. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether a sparse set is empty. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the internal packed array. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const entity_type & | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| bool | has (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a sparse set contains an entity. More... | |
| bool | fast (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a sparse set contains an entity (unsafe). More... | |
| size_type | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the position of an entity in a sparse set. More... | |
| void | construct (const entity_type entity) |
| Assigns an entity to a sparse set. More... | |
| virtual void | destroy (const entity_type entity) |
| Removes an entity from a sparse set. More... | |
| void | swap (const size_type lhs, const size_type rhs) ENTT_NOEXCEPT |
| Swaps the position of two entities in the internal packed array. More... | |
| void | respect (const SparseSet< Entity > &other) ENTT_NOEXCEPT |
| Sort entities according to their order in another sparse set. More... | |
| -virtual void | reset () |
| Resets a sparse set. | |
Basic sparse set implementation.
-Sparse set or packed array or whatever is the name users give it.
- Two arrays: an external one and an internal one; a sparse one and a packed one; one used for direct access through contiguous memory, the other one used to get the data through an extra level of indirection.
- This is largely used by the Registry to offer users the fastest access ever to the components. View and PersistentView are entirely designed around sparse sets.
This type of data structure is widely documented in the literature and on the web. This is nothing more than a customized implementation suitable for the purpose of the framework.
-data and size member functions for that). Use begin and end instead.| Entity | A valid entity type (see entt_traits for more details). |
Definition at line 60 of file sparse_set.hpp.
-
-
|
- -inline | -
Returns an iterator to the beginning.
-The returned iterator points to the first entity of the internal packed array. If the sparse set is empty, the returned iterator will be equal to end().
respect.Definition at line 298 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns an iterator to the beginning.
-The returned iterator points to the first entity of the internal packed array. If the sparse set is empty, the returned iterator will be equal to end().
respect.Definition at line 314 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns the number of elements that a sparse set has currently allocated space for.
-Definition at line 210 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns an iterator to the beginning.
-The returned iterator points to the first entity of the internal packed array. If the sparse set is empty, the returned iterator will be equal to end().
respect.Definition at line 281 of file sparse_set.hpp.
- -
-
|
- -inline | -
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.
-respect.Definition at line 331 of file sparse_set.hpp.
- -
-
|
- -inline | -
Assigns an entity to a sparse set.
-| entity | A valid entity identifier. |
Definition at line 442 of file sparse_set.hpp.
- -
-
|
- -inline | -
Direct access to the internal packed array.
-The returned pointer is such that range [data(), data() + size()] is always a valid range, even if the container is empty.
respect has been previously invoked. Internal data structures arrange elements to maximize performance. Accessing them directly gives a performance boost but less guarantees. Use begin and end if you want to iterate the sparse set in the expected order.Definition at line 265 of file sparse_set.hpp.
- -
-
|
- -inlinevirtual | -
Removes an entity from a sparse set.
-| entity | A valid entity identifier. |
Reimplemented in entt::SparseSet< Entity, Type >.
- -Definition at line 466 of file sparse_set.hpp.
- -
-
|
- -inline | -
Checks whether a sparse set is empty.
-Definition at line 246 of file sparse_set.hpp.
- -
-
|
- -inline | -
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.
-respect.Definition at line 348 of file sparse_set.hpp.
- -
-
|
- -inline | -
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.
-respect.Definition at line 365 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns the extent of a sparse set.
-The extent of a sparse set is also the size of the internal sparse array. There is no guarantee that the internal packed array has the same size. Usually the size of the internal sparse array is equal or greater than the one of the internal packed array.
-Definition at line 224 of file sparse_set.hpp.
- -
-
|
- -inline | -
Checks if a sparse set contains an entity (unsafe).
-Alternative version of has. It accesses the underlying data structures without bounds checking and thus it's both unsafe and risky to use.
- You should not invoke directly this function unless you know exactly what you are doing. Prefer the has member function instead.
| entity | A valid entity identifier. |
Definition at line 406 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns the position of an entity in a sparse set.
-| entity | A valid entity identifier. |
Definition at line 425 of file sparse_set.hpp.
- -
-
|
- -inline | -
Checks if a sparse set contains an entity.
-| entity | A valid entity identifier. |
Definition at line 383 of file sparse_set.hpp.
- -
-
|
- -delete | -
Copying a sparse set isn't allowed.
-
-
|
- -default | -
Default move assignment operator.
-
-
|
- -inline | -
Returns a reference to the element at the given position.
-| pos | Position of the element to return. |
Definition at line 374 of file sparse_set.hpp.
- -
-
|
- -inline | -
Increases the capacity of a sparse set.
-If the new capacity is greater than the current capacity, new storage is allocated, otherwise the method does nothing.
-| cap | Desired capacity. |
Definition at line 201 of file sparse_set.hpp.
- -
-
|
- -inline | -
Sort entities according to their order in another sparse set.
-Entities that are part of both the sparse sets are ordered internally according to the order they have in other. All the other entities goes to the end of the list and there are no guarantess on their order.
- In other terms, this function can be used to impose the same order on two sets by using one of them as a master and the other one as a slave.
Iterating the sparse set with a couple of iterators returns elements in the expected order after a call to respect. See begin and end for more details.
data gives no guarantees on the order, even though respect has been invoked.| other | The sparse sets that imposes the order of the entities. |
Definition at line 520 of file sparse_set.hpp.
- -
-
|
- -inline | -
Returns the number of elements in a sparse set.
-The number of elements is also the size of the internal packed array. There is no guarantee that the internal sparse array has the same size. Usually the size of the internal sparse array is equal or greater than the one of the internal packed array.
-Definition at line 238 of file sparse_set.hpp.
- -
-
|
- -inline | -
Swaps the position of two entities in the internal packed array.
-For what it's worth, this function affects both the internal sparse array and the internal packed array. Users should not care of that anyway.
-| lhs | A valid position within the sparse set. |
| rhs | A valid position within the sparse set. |
Definition at line 492 of file sparse_set.hpp.
- -
- 1.8.13
-
-
-
diff --git a/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.map b/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.map
deleted file mode 100644
index d25f98594..000000000
--- a/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.map
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.md5 b/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.md5
deleted file mode 100644
index 877ab7b26..000000000
--- a/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.md5
+++ /dev/null
@@ -1 +0,0 @@
-6d71b221f475a29f7b7544220a193386
\ No newline at end of file
diff --git a/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.png b/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.png
deleted file mode 100644
index 53642da80..000000000
Binary files a/classentt_1_1SparseSet_3_01Entity_01_4__inherit__graph.png and /dev/null differ
diff --git a/classentt_1_1View-members.html b/classentt_1_1View-members.html
deleted file mode 100644
index 12e829c09..000000000
--- a/classentt_1_1View-members.html
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::View< Entity, Component >, including all inherited members.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1View.html b/classentt_1_1View.html
deleted file mode 100644
index 94e867c44..000000000
--- a/classentt_1_1View.html
+++ /dev/null
@@ -1,809 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Multi component view. - More...
- -#include <view.hpp>
-Public Types | |
| -using | entity_type = typename view_type::entity_type |
| Underlying entity identifier. | |
| -using | size_type = typename view_type::size_type |
| Unsigned integer type. | |
| -using | iterator_type = Iterator |
| Input iterator type. | |
| -using | const_iterator_type = Iterator |
| Constant input iterator type. | |
-Public Member Functions | |
| size_type | size () const ENTT_NOEXCEPT |
| Estimates the number of entities that have the given components. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks if the view is definitely empty. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| bool | contains (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a view contains an entity. More... | |
| template<typename Comp > | |
| const Comp & | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the component assigned to the given entity. More... | |
| template<typename Comp > | |
| Comp & | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns the component assigned to the given entity. More... | |
| template<typename... Comp> | |
| std::enable_if_t<(sizeof...(Comp) > 1), std::tuple< const Comp &... > > | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the components assigned to the given entity. More... | |
| template<typename... Comp> | |
| std::enable_if_t<(sizeof...(Comp) > 1), std::tuple< Comp &... > > | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns the components assigned to the given entity. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates entities and components and applies the given function object to them. More... | |
| template<typename Func > | |
| void | each (Func func) |
| Iterates entities and components and applies the given function object to them. More... | |
-Friends | |
| -class | Registry< Entity > |
| A registry is allowed to create views. | |
Multi component view.
-Multi component views iterate over those entities that have at least all the given components in their bags. During initialization, a multi component view looks at the number of entities available for each component and picks up a reference to the smallest set of candidate entities in order to get a performance boost when iterate.
- Order of elements during iterations are highly dependent on the order of the underlying data structures. See SparseSet and its specializations for more details.
Important
-Iterators aren't invalidated if:
-In all the other cases, modifying the pools of the given components in any way invalidates all the iterators and using them results in undefined behavior.
-| Entity | A valid entity type (see entt_traits for more details). |
| Component | Types of components iterated by the view. |
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given components.
-The returned iterator points to the first entity that has the given components. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
-
|
- -inline | -
Iterates entities and components and applies the given function object to them.
-The function object is invoked for each entity. It is provided with the entity itself and a set of const references to all the components of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
Iterates entities and components and applies the given function object to them.
-The function object is invoked for each entity. It is provided with the entity itself and a set of references to all the components of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given components.
-The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns the component assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Type of component to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
Returns the component assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Type of component to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
Returns the components assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Types of the components to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
Returns the components assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| Comp | Types of the components to get. |
| entity | A valid entity identifier. |
-
|
- -inline | -
- 1.8.13
-
-
-
diff --git a/classentt_1_1View_3_01Entity_00_01Component_01_4-members.html b/classentt_1_1View_3_01Entity_00_01Component_01_4-members.html
deleted file mode 100644
index 53b7f9abc..000000000
--- a/classentt_1_1View_3_01Entity_00_01Component_01_4-members.html
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
This is the complete list of members for entt::View< Entity, Component >, including all inherited members.
-
- 1.8.13
-
-
-
diff --git a/classentt_1_1View_3_01Entity_00_01Component_01_4.html b/classentt_1_1View_3_01Entity_00_01Component_01_4.html
deleted file mode 100644
index 5d6811049..000000000
--- a/classentt_1_1View_3_01Entity_00_01Component_01_4.html
+++ /dev/null
@@ -1,839 +0,0 @@
-
-
-
-
-
-
-
-|
- EnTT
- 2.7.3
-
- |
-
Single component view specialization. - More...
- -#include <view.hpp>
-Public Types | |
| -using | raw_type = typename pool_type::object_type |
| Type of component iterated by the view. | |
| -using | entity_type = typename pool_type::entity_type |
| Underlying entity identifier. | |
| -using | size_type = typename pool_type::size_type |
| Unsigned integer type. | |
| -using | iterator_type = typename view_type::iterator_type |
| Input iterator type. | |
| -using | const_iterator_type = typename view_type::const_iterator_type |
| Constant input iterator type. | |
-Public Member Functions | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of entities that have the given component. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the view is empty. More... | |
| const raw_type * | raw () const ENTT_NOEXCEPT |
| Direct access to the list of components. More... | |
| raw_type * | raw () ENTT_NOEXCEPT |
| Direct access to the list of components. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given component. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given component. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given component. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given component. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given component. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given component. More... | |
| const entity_type & | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns a reference to the element at the given position. More... | |
| bool | contains (const entity_type entity) const ENTT_NOEXCEPT |
| Checks if a view contains an entity. More... | |
| const Component & | get (const entity_type entity) const ENTT_NOEXCEPT |
| Returns the component assigned to the given entity. More... | |
| Component & | get (const entity_type entity) ENTT_NOEXCEPT |
| Returns the component assigned to the given entity. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates entities and components and applies the given function object to them. More... | |
| template<typename Func > | |
| void | each (Func func) |
| Iterates entities and components and applies the given function object to them. More... | |
-Friends | |
| -class | Registry< Entity > |
| A registry is allowed to create views. | |
Single component view specialization.
-Single component views are specialized in order to get a boost in terms of performance. This kind of views can access the underlying data structure directly and avoid superfluous checks.
- Order of elements during iterations are highly dependent on the order of the underlying data structure. See SparseSet and its specializations for more details.
Important
-Iterators aren't invalidated if:
-In all the other cases, modifying the pool of the given component in any way invalidates all the iterators and using them results in undefined behavior.
-| Entity | A valid entity type (see entt_traits for more details). |
| Component | Type of component iterated by the view. |
-
|
- -inline | -
Returns an iterator to the first entity that has the given component.
-The returned iterator points to the first entity that has the given component. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given component.
-The returned iterator points to the first entity that has the given component. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator to the first entity that has the given component.
-The returned iterator points to the first entity that has the given component. If the view is empty, the returned iterator will be equal to end().
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given component.
-The returned iterator points to the entity following the last entity that has the given component. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
-
|
- -inline | -
Direct access to the list of entities.
-The returned pointer is such that range [data(), data() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the view in the expected order.
-
|
- -inline | -
Iterates entities and components and applies the given function object to them.
-The function object is invoked for each entity. It is provided with the entity itself and a const reference to the component of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
Iterates entities and components and applies the given function object to them.
-The function object is invoked for each entity. It is provided with the entity itself and a reference to the component of the view.
- The signature of the function should be equivalent to the following:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
-
|
- -inline | -
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given component.
-The returned iterator points to the entity following the last entity that has the given component. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns an iterator that is past the last entity that has the given component.
-The returned iterator points to the entity following the last entity that has the given component. Attempting to dereference the returned iterator results in undefined behavior.
-
-
|
- -inline | -
Returns the component assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| entity | A valid entity identifier. |
-
|
- -inline | -
Returns the component assigned to the given entity.
-Prefer this function instead of Registry::get during iterations. It has far better performance than its companion function.
| entity | A valid entity identifier. |
-
|
- -inline | -
-
|
- -inline | -
Direct access to the list of components.
-The returned pointer is such that range [raw(), raw() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the view in the expected order.
-
|
- -inline | -
Direct access to the list of components.
-The returned pointer is such that range [raw(), raw() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the view in the expected order.
-
|
- -inline | -
- 1.8.13
-
-
-
diff --git a/classentt_1_1basic__continuous__loader-members.html b/classentt_1_1basic__continuous__loader-members.html
new file mode 100644
index 000000000..9fb83034b
--- /dev/null
+++ b/classentt_1_1basic__continuous__loader-members.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 3.0.0
+
+ |
+
This is the complete list of members for entt::basic_continuous_loader< Entity >, including all inherited members.
+| basic_continuous_loader(basic_registry< entity_type > &source) ENTT_NOEXCEPT | entt::basic_continuous_loader< Entity > | inline |
| basic_continuous_loader(basic_continuous_loader &&)=default | entt::basic_continuous_loader< Entity > | |
| component(Archive &archive, Member Type::*... member) | entt::basic_continuous_loader< Entity > | inline |
| destroyed(Archive &archive) | entt::basic_continuous_loader< Entity > | inline |
| entities(Archive &archive) | entt::basic_continuous_loader< Entity > | inline |
| entity_type typedef | entt::basic_continuous_loader< Entity > | |
| has(entity_type entt) const ENTT_NOEXCEPT | entt::basic_continuous_loader< Entity > | inline |
| map(entity_type entt) const ENTT_NOEXCEPT | entt::basic_continuous_loader< Entity > | inline |
| operator=(basic_continuous_loader &&)=default | entt::basic_continuous_loader< Entity > | |
| orphans() | entt::basic_continuous_loader< Entity > | inline |
| shrink() | entt::basic_continuous_loader< Entity > | inline |
+ 1.8.13
+
+
+
diff --git a/classentt_1_1basic__continuous__loader.html b/classentt_1_1basic__continuous__loader.html
new file mode 100644
index 000000000..57c8608d6
--- /dev/null
+++ b/classentt_1_1basic__continuous__loader.html
@@ -0,0 +1,527 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 3.0.0
+
+ |
+
Utility class for continuous loading. + More...
+ +#include <snapshot.hpp>
+Public Types | |
| +using | entity_type = Entity |
| Underlying entity identifier. | |
+Public Member Functions | |
| basic_continuous_loader (basic_registry< entity_type > &source) ENTT_NOEXCEPT | |
| Constructs a loader that is bound to a given registry. More... | |
| + | basic_continuous_loader (basic_continuous_loader &&)=default |
| Default move constructor. | |
| basic_continuous_loader & | operator= (basic_continuous_loader &&)=default |
| Default move assignment operator. More... | |
| template<typename Archive > | |
| basic_continuous_loader & | entities (Archive &archive) |
| Restores entities that were in use during serialization. More... | |
| template<typename Archive > | |
| basic_continuous_loader & | destroyed (Archive &archive) |
| Restores entities that were destroyed during serialization. More... | |
| template<typename... Component, typename Archive , typename... Type, typename... Member> | |
| basic_continuous_loader & | component (Archive &archive, Member Type::*... member) |
| Restores components and assigns them to the right entities. More... | |
| basic_continuous_loader & | shrink () |
| Helps to purge entities that no longer have a conterpart. More... | |
| basic_continuous_loader & | orphans () |
| Destroys those entities that have no components. More... | |
| bool | has (entity_type entt) const ENTT_NOEXCEPT |
| Tests if a loader knows about a given entity. More... | |
| entity_type | map (entity_type entt) const ENTT_NOEXCEPT |
| Returns the identifier to which an entity refers. More... | |
Utility class for continuous loading.
+A continuous loader is designed to load data from a source registry to a (possibly) non-empty destination. The loader can accomodate in a registry more than one snapshot in a sort of continuous loading that updates the destination one step at a time.
+ Identifiers that entities originally had are not transferred to the target. Instead, the loader maps remote identifiers to local ones while restoring a snapshot.
+ An example of use is the implementation of a client-server applications with the requirement of transferring somehow parts of the representation side to side.
| Entity | A valid entity type (see entt_traits for more details). |
+
|
+ +inline | +
Constructs a loader that is bound to a given registry.
+| source | A valid reference to a registry. |
Definition at line 439 of file snapshot.hpp.
+ +
+
|
+ +inline | +
Restores components and assigns them to the right entities.
+The template parameter list must be exactly the same used during serialization. In the event that the entity to which the component is assigned doesn't exist yet, the loader will take care to create a local counterpart for it.
+ Members can be either data members of type entity_type or containers of entities. In both cases, the loader will visit them and update the entities by replacing each one with its local counterpart.
| Component | Type of component to restore. |
| Archive | Type of input archive. |
| Type | Types of components to update with local counterparts. |
| Member | Types of members to update with their local counterparts. |
| archive | A valid reference to an input archive. |
| member | Members to update with their local counterparts. |
Definition at line 501 of file snapshot.hpp.
+ +
+
|
+ +inline | +
Restores entities that were destroyed during serialization.
+This function restores the entities that were destroyed during serialization and creates local counterparts for them if required.
+| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 476 of file snapshot.hpp.
+ +
+
|
+ +inline | +
Restores entities that were in use during serialization.
+This function restores the entities that were in use during serialization and creates local counterparts for them if required.
+| Archive | Type of input archive. |
| archive | A valid reference to an input archive. |
Definition at line 460 of file snapshot.hpp.
+ +
+
|
+ +inline | +
Tests if a loader knows about a given entity.
+| entt | An entity identifier. |
entity is managed by the loader, false otherwise. Definition at line 560 of file snapshot.hpp.
+ +
+
|
+ +inline | +
Returns the identifier to which an entity refers.
+| entt | An entity identifier. |
Definition at line 569 of file snapshot.hpp.
+ +
+
|
+ +default | +
Default move assignment operator.
+
+
|
+ +inline | +
Destroys those entities that have no components.
+In case all the entities were serialized but only part of the components was saved, it could happen that some of the entities have no components once restored.
+ This functions helps to identify and destroy those entities.
Definition at line 547 of file snapshot.hpp.
+ +
+
|
+ +inline | +
Helps to purge entities that no longer have a conterpart.
+Users should invoke this member function after restoring each snapshot, unless they know exactly what they are doing.
+Definition at line 515 of file snapshot.hpp.
+ +
+ 1.8.13
+
+
+
diff --git a/classentt_1_1SparseSet.html b/classentt_1_1basic__group.html
similarity index 78%
rename from classentt_1_1SparseSet.html
rename to classentt_1_1basic__group.html
index 840056a13..02da03b1c 100644
--- a/classentt_1_1SparseSet.html
+++ b/classentt_1_1basic__group.html
@@ -5,7 +5,7 @@
-Sparse set. - More...
+Group. + More...
-#include <sparse_set.hpp>
#include <group.hpp>
Sparse set.
+Group.
Primary template isn't defined on purpose. All the specializations give a compile-time error, but for a few reasonable cases.
-Definition at line 29 of file sparse_set.hpp.
+|
+ EnTT
+ 3.0.0
+
+ |
+
This is the complete list of members for entt::basic_group< Entity, get_t< Get... >, Owned... >, including all inherited members.
+
+ 1.8.13
+
+
+
diff --git a/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_00_01Owned_8_8_8_01_4.html b/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_00_01Owned_8_8_8_01_4.html
new file mode 100644
index 000000000..4036aa21f
--- /dev/null
+++ b/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_00_01Owned_8_8_8_01_4.html
@@ -0,0 +1,828 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 3.0.0
+
+ |
+
Owning group. + More...
+ +#include <group.hpp>
+Public Types | |
| +using | entity_type = typename sparse_set< Entity >::entity_type |
| Underlying entity identifier. | |
| +using | size_type = typename sparse_set< Entity >::size_type |
| Unsigned integer type. | |
| +using | iterator_type = typename sparse_set< Entity >::iterator_type |
| Input iterator type. | |
+Public Member Functions | |
| template<typename Component > | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of existing components of the given type. More... | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of entities that have the given components. More... | |
| template<typename Component > | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the pool of a given component is empty. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the group is empty. More... | |
| template<typename Component > | |
| Component * | raw () const ENTT_NOEXCEPT |
| Direct access to the list of components of a given pool. More... | |
| template<typename Component > | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities of a given pool. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities. More... | |
| iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| iterator_type | find (const entity_type entt) const ENTT_NOEXCEPT |
| Finds an entity. More... | |
| entity_type | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns the identifier that occupies the given position. More... | |
| bool | contains (const entity_type entt) const ENTT_NOEXCEPT |
| Checks if a group contains an entity. More... | |
| template<typename... Component> | |
| decltype(auto) | get ([[maybe_unused]] const entity_type entt) const ENTT_NOEXCEPT |
| Returns the components assigned to the given entity. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates entities and components and applies the given function object to them. More... | |
| template<typename... Component, typename Compare , typename Sort = std_sort, typename... Args> | |
| void | sort (Compare compare, Sort algo=Sort{}, Args &&... args) |
| Sort a group according to the given comparison function. More... | |
+Friends | |
| +class | basic_registry< Entity > |
| A registry is allowed to create groups. | |
Owning group.
+Owning groups return all the entities and only the entities that have at least the given components. Moreover:
+The more types of components are owned by a group, the faster it is to iterate them.
+Important
+Iterators aren't invalidated if:
+In all the other cases, modifying the pools of the given components in any way invalidates all the iterators and using them results in undefined behavior.
+sort on each instance to sort all of them because they share the underlying data structure).| Entity | A valid entity type (see entt_traits for more details). |
| Get | Types of components observed by the group. |
| Owned | Types of components owned by the group. |
+
|
+ +inline | +
Returns an iterator to the first entity that has the given components.
+The returned iterator points to the first entity that has the given components. If the group is empty, the returned iterator will be equal to end().
+
|
+ +inline | +
+
|
+ +inline | +
Direct access to the list of entities of a given pool.
+The returned pointer is such that range [data<Component>(), data<Component>() + size<Component>()] is always a valid range, even if the container is empty.
+ Moreover, in case the group owns the given component, the range [data<Component>(), data<Component>() + size()] is such that it contains the entities that are part of the group itself.
begin and end if you want to iterate the group in the expected order.| Component | Type of component in which one is interested. |
+
|
+ +inline | +
Direct access to the list of entities.
+The returned pointer is such that range [data(), data() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the group in the expected order.
+
|
+ +inline | +
Iterates entities and components and applies the given function object to them.
+The function object is invoked for each entity. It is provided with the entity itself and a set of references to all its components. The constness of the components is as requested.
+ The signature of the function must be equivalent to one of the following forms:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Returns an iterator that is past the last entity that has the given components.
+The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
+
+
|
+ +inline | +
+
|
+ +inline | +
Returns the components assigned to the given entity.
+Prefer this function instead of registry::get during iterations. It has far better performance than its companion function.
| Component | Types of components to get. |
| entt | A valid entity identifier. |
+
|
+ +inline | +
+
|
+ +inline | +
Direct access to the list of components of a given pool.
+The returned pointer is such that range [raw<Component>(), raw<Component>() + size<Component>()] is always a valid range, even if the container is empty.
+ Moreover, in case the group owns the given component, the range [raw<Component>(), raw<Component>() + size()] is such that it contains the instances that are part of the group itself.
begin and end if you want to iterate the group in the expected order.| Component | Type of component in which one is interested. |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Sort a group according to the given comparison function.
+Sort the group so that iterating it with a couple of iterators returns entities and components in the expected order. See begin and end for more details.
The comparison function object must return true if the first element is less than the second one, false otherwise. The signature of the comparison function should be equivalent to one of the following:
Where Component are either owned types or not but still such that they are iterated by the group.
+ Moreover, the comparison function object shall induce a strict weak ordering on the values.
The sort function oject must offer a member function template operator() that accepts three arguments:
The comparison function object received by the sort function object hasn't necessarily the type of the one passed along with the other parameters to this member function.
+data or raw gives no guarantees on the order, even though sort has been invoked.| Component | Optional types of components to compare. |
| Compare | Type of comparison function object. |
| Sort | Type of sort function object. |
| Args | Types of arguments to forward to the sort function object. |
| compare | A valid comparison function object. |
| algo | A valid sort function object. |
| args | Arguments to forward to the sort function object, if any. |
+ 1.8.13
+
+
+
diff --git a/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_01_4-members.html b/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_01_4-members.html
new file mode 100644
index 000000000..255cc2b8b
--- /dev/null
+++ b/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_01_4-members.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 3.0.0
+
+ |
+
This is the complete list of members for entt::basic_group< Entity, get_t< Get... > >, including all inherited members.
+
+ 1.8.13
+
+
+
diff --git a/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_01_4.html b/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_01_4.html
new file mode 100644
index 000000000..11857d098
--- /dev/null
+++ b/classentt_1_1basic__group_3_01Entity_00_01get__t_3_01Get_8_8_8_01_4_01_4.html
@@ -0,0 +1,822 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 3.0.0
+
+ |
+
Non-owning group. + More...
+ +#include <group.hpp>
+Public Types | |
| +using | entity_type = typename sparse_set< Entity >::entity_type |
| Underlying entity identifier. | |
| +using | size_type = typename sparse_set< Entity >::size_type |
| Unsigned integer type. | |
| +using | iterator_type = typename sparse_set< Entity >::iterator_type |
| Input iterator type. | |
+Public Member Functions | |
| template<typename Component > | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of existing components of the given type. More... | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of entities that have the given components. More... | |
| size_type | capacity () const ENTT_NOEXCEPT |
| Returns the number of elements that a group has currently allocated space for. More... | |
| +void | shrink_to_fit () |
| Requests the removal of unused capacity. | |
| template<typename Component > | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the pool of a given component is empty. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether the group is empty. More... | |
| template<typename Component > | |
| Component * | raw () const ENTT_NOEXCEPT |
| Direct access to the list of components of a given pool. More... | |
| template<typename Component > | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities of a given pool. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the list of entities. More... | |
| iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the first entity that has the given components. More... | |
| iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator that is past the last entity that has the given components. More... | |
| iterator_type | find (const entity_type entt) const ENTT_NOEXCEPT |
| Finds an entity. More... | |
| entity_type | operator[] (const size_type pos) const ENTT_NOEXCEPT |
| Returns the identifier that occupies the given position. More... | |
| bool | contains (const entity_type entt) const ENTT_NOEXCEPT |
| Checks if a group contains an entity. More... | |
| template<typename... Component> | |
| decltype(auto) | get ([[maybe_unused]] const entity_type entt) const ENTT_NOEXCEPT |
| Returns the components assigned to the given entity. More... | |
| template<typename Func > | |
| void | each (Func func) const |
| Iterates entities and components and applies the given function object to them. More... | |
| template<typename Component > | |
| void | sort () const |
| Sort the shared pool of entities according to the given component. More... | |
+Friends | |
| +class | basic_registry< Entity > |
| A registry is allowed to create groups. | |
Non-owning group.
+A non-owning group returns all the 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.
+ In general, non-owning groups don't stay true to the order of any set of components unless users explicitly sort them.
Important
+Iterators aren't invalidated if:
+In all the other cases, modifying the pools of the given components in any way invalidates all the iterators and using them results in undefined behavior.
+sort on each instance to sort all of them because they share the set of entities).| Entity | A valid entity type (see entt_traits for more details). |
| Get | Types of components observed by the group. |
+
|
+ +inline | +
Returns an iterator to the first entity that has the given components.
+The returned iterator points to the first entity that has the given components. If the group is empty, the returned iterator will be equal to end().
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Direct access to the list of entities of a given pool.
+The returned pointer is such that range [data<Component>(), data<Component>() + size<Component>()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the group in the expected order.| Component | Type of component in which one is interested. |
+
|
+ +inline | +
Direct access to the list of entities.
+The returned pointer is such that range [data(), data() + size()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the group in the expected order.
+
|
+ +inline | +
Iterates entities and components and applies the given function object to them.
+The function object is invoked for each entity. It is provided with the entity itself and a set of references to all its components. The constness of the components is as requested.
+ The signature of the function must be equivalent to one of the following forms:
| Func | Type of the function object to invoke. |
| func | A valid function object. |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Returns an iterator that is past the last entity that has the given components.
+The returned iterator points to the entity following the last entity that has the given components. Attempting to dereference the returned iterator results in undefined behavior.
+
+
|
+ +inline | +
+
|
+ +inline | +
Returns the components assigned to the given entity.
+Prefer this function instead of registry::get during iterations. It has far better performance than its companion function.
| Component | Types of components to get. |
| entt | A valid entity identifier. |
+
|
+ +inline | +
+
|
+ +inline | +
Direct access to the list of components of a given pool.
+The returned pointer is such that range [raw<Component>(), raw<Component>() + size<Component>()] is always a valid range, even if the container is empty.
begin and end if you want to iterate the group in the expected order.| Component | Type of component in which one is interested. |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Sort the shared pool of entities according to the given component.
+Non-owning groups of the same type share with the registry a pool of entities with its own order that doesn't depend on the order of any pool of components. Users can order the underlying data structure so that it respects the order of the pool of the given component.
+| Component | Type of component to use to impose the order. |
+ 1.8.13
+
+
+
diff --git a/classentt_1_1basic__prototype-members.html b/classentt_1_1basic__prototype-members.html
new file mode 100644
index 000000000..2879e4d41
--- /dev/null
+++ b/classentt_1_1basic__prototype-members.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 3.0.0
+
+ |
+
This is the complete list of members for entt::basic_prototype< Entity >, including all inherited members.
+
+ 1.8.13
+
+
+
diff --git a/classentt_1_1Prototype.html b/classentt_1_1basic__prototype.html
similarity index 55%
rename from classentt_1_1Prototype.html
rename to classentt_1_1basic__prototype.html
index b6a9af9b0..6cbb633c1 100644
--- a/classentt_1_1Prototype.html
+++ b/classentt_1_1basic__prototype.html
@@ -5,7 +5,7 @@
-Prototype container for concepts. - More...
+Prototype container for concepts. + More...
#include <prototype.hpp>
Public Types | |
| -using | registry_type = Registry< Entity > |
| Registry type. | |
| -using | entity_type = Entity |
| Underlying entity identifier. | |
| -using | size_type = std::size_t |
| Unsigned integer type. | |
| +using | registry_type = basic_registry< Entity > |
| Registry type. | |
| +using | entity_type = Entity |
| Underlying entity identifier. | |
| +using | size_type = std::size_t |
| Unsigned integer type. | |
Public Member Functions | |
| Prototype (Registry< Entity > ®istry) | |
| Constructs a prototype that is bound to a given registry. More... | |
| - | ~Prototype () |
| Releases all its resources. | |
| - | Prototype (const Prototype &)=delete |
| Copying a prototype isn't allowed. | |
| Prototype (Prototype &&other) | |
| Move constructor. More... | |
| Prototype & | operator= (const Prototype &)=delete |
| Copying a prototype isn't allowed. More... | |
| Prototype & | operator= (Prototype &&other) |
| Move assignment operator. More... | |
| template<typename Component , typename... Args> | |
| Component & | set (Args &&... args) |
| Assigns to or replaces the given component of a prototype. More... | |
| template<typename Component > | |
| void | unset () ENTT_NOEXCEPT |
| Removes the given component from a prototype. More... | |
| template<typename... Component> | |
| bool | has () const ENTT_NOEXCEPT |
| Checks if a prototype owns all the given components. More... | |
| template<typename Component > | |
| const Component & | get () const ENTT_NOEXCEPT |
| Returns a reference to the given component. More... | |
| template<typename Component > | |
| Component & | get () ENTT_NOEXCEPT |
| Returns a reference to the given component. More... | |
| template<typename... Component> | |
| std::enable_if_t<(sizeof...(Component) > 1), std::tuple< const Component &... > > | get () const ENTT_NOEXCEPT |
| Returns a reference to the given components. More... | |
| template<typename... Component> | |
| std::enable_if_t<(sizeof...(Component) > 1), std::tuple< Component &... > > | get () ENTT_NOEXCEPT |
| Returns a reference to the given components. More... | |
| entity_type | create (registry_type &other) const |
| Creates a new entity using a given prototype. More... | |
| entity_type | create () const |
| Creates a new entity using a given prototype. More... | |
| void | assign (registry_type &other, const entity_type dst) const |
| Assigns the components of a prototype to a given entity. More... | |
| void | assign (const entity_type dst) const |
| Assigns the components of a prototype to a given entity. More... | |
| void | accommodate (registry_type &other, const entity_type dst) const |
| Assigns or replaces the components of a prototype for an entity. More... | |
| void | accommodate (const entity_type dst) const |
| Assigns or replaces the components of a prototype for an entity. More... | |
| void | operator() (registry_type &other, const entity_type dst) const ENTT_NOEXCEPT |
| Assigns the components of a prototype to an entity. More... | |
| void | operator() (const entity_type dst) const ENTT_NOEXCEPT |
| Assigns the components of a prototype to an entity. More... | |
| entity_type | operator() (registry_type &other) const ENTT_NOEXCEPT |
| Creates a new entity using a given prototype. More... | |
| entity_type | operator() () const ENTT_NOEXCEPT |
| Creates a new entity using a given prototype. More... | |
| basic_prototype (registry_type &ref) | |
| Constructs a prototype that is bound to a given registry. More... | |
| + | ~basic_prototype () |
| Releases all its resources. | |
| basic_prototype (basic_prototype &&other) | |
| Move constructor. More... | |
| basic_prototype & | operator= (basic_prototype &&other) |
| Move assignment operator. More... | |
| template<typename Component , typename... Args> | |
| Component & | set (Args &&... args) |
| Assigns to or replaces the given component of a prototype. More... | |
| template<typename Component > | |
| void | unset () ENTT_NOEXCEPT |
| Removes the given component from a prototype. More... | |
| template<typename... Component> | |
| bool | has () const ENTT_NOEXCEPT |
| Checks if a prototype owns all the given components. More... | |
| template<typename... Component> | |
| decltype(auto) | get () const ENTT_NOEXCEPT |
| Returns references to the given components. More... | |
| template<typename... Component> | |
| decltype(auto) | get () ENTT_NOEXCEPT |
| Returns references to the given components. More... | |
| template<typename... Component> | |
| auto | try_get () const ENTT_NOEXCEPT |
| Returns pointers to the given components. More... | |
| template<typename... Component> | |
| auto | try_get () ENTT_NOEXCEPT |
| Returns pointers to the given components. More... | |
| entity_type | create (registry_type &other) const |
| Creates a new entity using a given prototype. More... | |
| entity_type | create () const |
| Creates a new entity using a given prototype. More... | |
| void | assign (registry_type &other, const entity_type dst) const |
| Assigns the components of a prototype to a given entity. More... | |
| void | assign (const entity_type dst) const |
| Assigns the components of a prototype to a given entity. More... | |
| void | assign_or_replace (registry_type &other, const entity_type dst) const |
| Assigns or replaces the components of a prototype for an entity. More... | |
| void | assign_or_replace (const entity_type dst) const |
| Assigns or replaces the components of a prototype for an entity. More... | |
| void | operator() (registry_type &other, const entity_type dst) const ENTT_NOEXCEPT |
| Assigns the components of a prototype to an entity. More... | |
| void | operator() (const entity_type dst) const ENTT_NOEXCEPT |
| Assigns the components of a prototype to an entity. More... | |
| entity_type | operator() (registry_type &other) const ENTT_NOEXCEPT |
| Creates a new entity using a given prototype. More... | |
| entity_type | operator() () const ENTT_NOEXCEPT |
| Creates a new entity using a given prototype. More... | |
| const registry_type & | backend () const ENTT_NOEXCEPT |
| Returns a reference to the underlying registry. More... | |
| registry_type & | backend () ENTT_NOEXCEPT |
| Returns a reference to the underlying registry. More... | |
Prototype container for concepts.
+Prototype container for concepts.
A prototype is used to define a concept in terms of components.
Prototypes act as templates for those specific types of an application which users would otherwise define through a series of component assignments to entities. In other words, prototypes can be used to assign components to entities of a registry at once.
Definition at line 40 of file prototype.hpp.
+| entt::Prototype< Entity >::Prototype | +entt::basic_prototype< Entity >::basic_prototype | ( | -Registry< Entity > & | -registry | ) | +registry_type & | +ref | ) |
Constructs a prototype that is bound to a given registry.
| registry | A valid reference to a registry. |
| ref | A valid reference to a registry. |
Definition at line 70 of file prototype.hpp.
+Definition at line 71 of file prototype.hpp.
- -| entt::Prototype< Entity >::Prototype | +entt::basic_prototype< Entity >::basic_prototype | ( | -Prototype< Entity > && | +basic_prototype< Entity > && | other | ) |
|
- -inline | - -
Assigns or replaces the components of a prototype for an entity.
-Existing components are overwritten, if any. All the other components will be copied over to the target entity.
-| other | A valid reference to a registry. |
| dst | A valid entity identifier. |
Definition at line 357 of file prototype.hpp.
- -
-
|
- -inline | -
Assigns or replaces the components of a prototype for an entity.
-Existing components are overwritten, if any. All the other components will be copied over to the target entity.
-| dst | A valid entity identifier. |
Definition at line 381 of file prototype.hpp.
- -
-
Definition at line 83 of file delegate.hpp. +Constructor & Destructor Documentation+ +◆ delegate() [1/2]+ +
+
+
+
+
+template<typename Ret , typename... Args>
+
+template<auto Function>
+
+
+
+Constructs a delegate and connects a free function to it. +
Definition at line 100 of file delegate.hpp. + +◆ delegate() [2/2]+ +
+
+
+
+template<typename Ret , typename... Args>
+
+template<auto Candidate, typename Type >
+
+
+
+Constructs a delegate and connects a member for a given instance or a free function with payload. +
Definition at line 114 of file delegate.hpp. + +Member Function Documentation+ +◆ connect() [1/2]+ +
+
+
+
+
+template<typename Ret , typename... Args>
+
+template<auto Function>
+
+
+
+Connects a free function to a delegate. +
Definition at line 125 of file delegate.hpp. + +◆ connect() [2/2]+ +
+
+
+
+
+template<typename Ret , typename... Args>
+
+template<auto Candidate, typename Type >
+
+
+
+Connects a member function for a given instance or a free function with payload to a delegate. +The delegate isn't responsible for the connected object or the payload. Users must always guarantee that the lifetime of the instance overcomes the one of the delegate.
Definition at line 151 of file delegate.hpp. + +◆ instance()+ +
+
+
+
+
+template<typename Ret , typename... Args>
+
+
+
+Returns the instance linked to a delegate, if any. +
Definition at line 183 of file delegate.hpp. + +◆ operator bool()+ +
+
+
+
+
+template<typename Ret , typename... Args>
+
+
+
+Checks whether a delegate actually stores a listener. +
Definition at line 210 of file delegate.hpp. + +◆ operator()()+ +
+
+
+
+
+template<typename Ret , typename... Args>
+
+
+
+Triggers a delegate. +The delegate invokes the underlying function and returns the result. +
Definition at line 201 of file delegate.hpp. + +◆ operator==()+ +
+
+
+
+
+template<typename Ret , typename... Args>
+
+
+
+Checks if the connected functions differ. +Instances connected to delegates are ignored by this operator. Use the
Definition at line 224 of file delegate.hpp. + +◆ reset()+ +
+
+
+
+template<typename Ret , typename... Args>
+
+
+
+Resets a delegate. +After a reset, a delegate cannot be invoked anymore. + +Definition at line 174 of file delegate.hpp. + +The documentation for this class was generated from the following file:
+Generated by +
+ 1.8.13
+
+
+
diff --git a/classentt_1_1dispatcher-members.html b/classentt_1_1dispatcher-members.html
new file mode 100644
index 000000000..b1f2c87fe
--- /dev/null
+++ b/classentt_1_1dispatcher-members.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+entt::dispatcher Member List
+
+
+
+This is the complete list of members for entt::dispatcher, including all inherited members. +
+Generated by +
+ 1.8.13
+
+
+
diff --git a/classentt_1_1Dispatcher.html b/classentt_1_1dispatcher.html
similarity index 53%
rename from classentt_1_1Dispatcher.html
rename to classentt_1_1dispatcher.html
index 18f218e76..14ba50676 100644
--- a/classentt_1_1Dispatcher.html
+++ b/classentt_1_1dispatcher.html
@@ -5,7 +5,7 @@
-
|
EnTT
- 2.7.3
+ 3.0.0
@@ -67,56 +67,65 @@ $(function() {
Classes |
Public Types |
Public Member Functions |
-List of all members
+List of all members
-
+entt::Dispatcher Class Referencefinal entt::dispatcher Class Reference
Basic dispatcher implementation. - More... + More...
Detailed DescriptionBasic dispatcher implementation. A dispatcher can be used either to trigger an immediate event or to enqueue events to be published all together once per tick. void(const Event &) Member functions named Event, listeners are such that they can be invoked with an argument of type const Event &, no matter what the return type is.
+The type of the instances is Definition at line 35 of file dispatcher.hpp. +Definition at line 31 of file dispatcher.hpp. Member Function Documentation- -◆ enqueue()+ +◆ enqueue() [1/2]
@@ -127,7 +136,7 @@ template<typename Event , typename... Args>
|
Definition at line 145 of file dispatcher.hpp. +Definition at line 190 of file dispatcher.hpp. - -◆ sink()+ +◆ enqueue() [2/2]
@@ -173,7 +182,52 @@ template<typename Event >
|
+
+inline |
+
+
+
+
+
+Enqueues an event of the given type. +An event of the given type is queued. No listener is invoked. Use the
Definition at line 204 of file dispatcher.hpp. + +◆ sink()+ +
+
+
+template<typename Event >
+
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||