diff --git a/CONTRIBUTING_8md_source.html b/CONTRIBUTING_8md_source.html index 980dcb744..65bcbca97 100644 --- a/CONTRIBUTING_8md_source.html +++ b/CONTRIBUTING_8md_source.html @@ -22,7 +22,7 @@
| ▼Nentt | EnTT default namespace |
| CActor | Dedicated to those who aren't confident with entity-component systems |
| Cbreak_t | Break type used to disambiguate overloads |
| 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 |
| 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 |
|
+ EnTT
+ 2.7.3
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/autotoc_md0.html b/autotoc_md0.html
index d051bcbbe..a88903a50 100644
--- a/autotoc_md0.html
+++ b/autotoc_md0.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.3
+
+ |
+
EnTT comes with a bunch of core functionalities mostly used by the other parts of the library itself.
+ Hardly users will include these features in their code, but it's worth describing what EnTT offers so as not to reinvent the wheel in case of need.
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.
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.
+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.
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.
+ 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:
+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:
+
+ 1.8.13
+
+
+
diff --git a/autotoc_md41.html b/autotoc_md41.html
new file mode 100644
index 000000000..9cf9e38a1
--- /dev/null
+++ b/autotoc_md41.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 2.7.3
+
+ |
+
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:
+
+ 1.8.13
+
+
+
diff --git a/autotoc_md44.html b/autotoc_md44.html
new file mode 100644
index 000000000..b7c8c9452
--- /dev/null
+++ b/autotoc_md44.html
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 2.7.3
+
+ |
+
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 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 succeeded();
It's invoked in case of success, immediately after an update and during the same tick.
+void failed();
It's invoked in case of errors, immediately after an update and during the same tick.
+void aborted();
It's invoked only if a process is explicitly aborted. There is no guarantee that it executes in the same tick, this depends solely on whether the process is aborted immediately or not.
+Derived 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.
The function call operator has a signature similar to the one of the update function of a process but for the fact that it receives two extra arguments to call whenever a process is terminated with success or with an error:
Parameters have the following meaning:
+delta is the elapsed time.data is an opaque pointer to user data if any, nullptr otherwise.succeed is a function to call when a process terminates with success.fail is a function to call when a process terminates with errors.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.
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:
+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.
+ As a minimal example of use:
To update a scheduler and thus 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:
+ 1.8.13
+
+
+
diff --git a/autotoc_md49.html b/autotoc_md49.html
new file mode 100644
index 000000000..dc39051cc
--- /dev/null
+++ b/autotoc_md49.html
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 2.7.3
+
+ |
+
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 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.
+ 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.
+ 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.
+ 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.
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.
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:
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.
+
+ 1.8.13
+
+
+
diff --git a/autotoc_md52.html b/autotoc_md52.html
new file mode 100644
index 000000000..f6fb54a2e
--- /dev/null
+++ b/autotoc_md52.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..66fc871f2
--- /dev/null
+++ b/autotoc_md53.html
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+|
+ 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_md8.html b/autotoc_md8.html
new file mode 100644
index 000000000..699d95ad5
--- /dev/null
+++ b/autotoc_md8.html
@@ -0,0 +1,461 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 2.7.3
+
+ |
+
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:
+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.
+ 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.
+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).
+ 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>.
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:
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:
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.
+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:
+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.
+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.
+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.
The code is not production-ready and overall performance can be highly improved. However, I sacrificed optimizations in favor of a more readable piece of code. I hope I succeeded.
+ Note also that this isn't neither the only nor (probably) the best way to do it. In fact, the right way depends on the scripting language and the problem one is facing in general.
+ That being said, feel free to use it at your own risk.
The basic idea is that of creating a compile-time component aimed to map all the runtime components assigned to an entity.
+ Identifiers come in use to address the right function from a map when invoked from the runtime environment and to filter entities when iterating.
+ With a bit of gymnastic, one can narrow views and improve the performance to some extent but it was not the goal of the example.
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.
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.
+ 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.
+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.
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.
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.
+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.
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).
+ 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.
+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.
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.
Archives must publicly expose a predefined set of member functions. The API is straightforward and consists only of a group of function call operators that are invoked by the snapshot class and the loaders.
+In particular:
+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 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.
+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.
The code is not production-ready and it isn't neither the only nor (probably) the best way to do it. However, feel free to use it at your own risk.
+The basic idea is to store everything in a group of queues in memory, then bring everything back to the registry with different loaders.
+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.
Creating an entity from a prototype is straightforward:
+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.
+The so called helpers are small classes and functions mainly designed to offer built-in support for the most basic functionalities.
+ The list of helpers will grow longer as time passes and new ideas come out.
A 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.
+ 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:
+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.
+ 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.
+ 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.
+ 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.
+ 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.
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.
+ 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.
+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.
+Views 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.
+ 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.
+ 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.
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.
+ 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.
+ 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.
+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:
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.
+
+ 1.8.13
+
+
+
diff --git a/cache_8hpp_source.html b/cache_8hpp_source.html
index 0c28e23d4..d81aec370 100644
--- a/cache_8hpp_source.html
+++ b/cache_8hpp_source.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.3
+
+ |
+
#include <attachee.hpp>
Primary template isn't defined on purpose. All the specializations give a compile-time error, but for a few reasonable cases.
+ +Definition at line 22 of file attachee.hpp.
+
+ 1.8.13
+
+
+
diff --git a/classentt_1_1Attachee_3_01Entity_00_01Type_01_4-members.html b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4-members.html
new file mode 100644
index 000000000..535a49068
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4-members.html
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..f865cf463
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4.html
@@ -0,0 +1,472 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..d082ee3e2
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.map
@@ -0,0 +1,3 @@
+
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
new file mode 100644
index 000000000..8ad7cbd0c
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.md5
@@ -0,0 +1 @@
+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
new file mode 100644
index 000000000..c94746720
Binary files /dev/null and b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__coll__graph.png 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
new file mode 100644
index 000000000..d082ee3e2
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.map
@@ -0,0 +1,3 @@
+
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
new file mode 100644
index 000000000..42196e769
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.md5
@@ -0,0 +1 @@
+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
new file mode 100644
index 000000000..c94746720
Binary files /dev/null and b/classentt_1_1Attachee_3_01Entity_00_01Type_01_4__inherit__graph.png differ
diff --git a/classentt_1_1Attachee_3_01Entity_01_4-members.html b/classentt_1_1Attachee_3_01Entity_01_4-members.html
new file mode 100644
index 000000000..519157fd7
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_01_4-members.html
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..741967c57
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_01_4.html
@@ -0,0 +1,324 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..ef4fa59fd
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.map
@@ -0,0 +1,3 @@
+
diff --git a/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.md5 b/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.md5
new file mode 100644
index 000000000..a89cd2b56
--- /dev/null
+++ b/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.md5
@@ -0,0 +1 @@
+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
new file mode 100644
index 000000000..67ca68fa0
Binary files /dev/null and b/classentt_1_1Attachee_3_01Entity_01_4__inherit__graph.png differ
diff --git a/classentt_1_1ContinuousLoader-members.html b/classentt_1_1ContinuousLoader-members.html
index 972d2f3b7..53c15591f 100644
--- a/classentt_1_1ContinuousLoader-members.html
+++ b/classentt_1_1ContinuousLoader-members.html
@@ -22,7 +22,7 @@
Definition at line 430 of file snapshot.hpp.
+Definition at line 434 of file snapshot.hpp.
Definition at line 529 of file snapshot.hpp.
+Definition at line 533 of file snapshot.hpp.
@@ -247,7 +247,7 @@ template<typename... Component, typename Archive , typename... Type, typenameDefinition at line 595 of file snapshot.hpp.
+Definition at line 599 of file snapshot.hpp.
@@ -295,7 +295,7 @@ template<typename Archive >Definition at line 570 of file snapshot.hpp.
+Definition at line 574 of file snapshot.hpp.
@@ -343,7 +343,7 @@ template<typename Archive >Definition at line 554 of file snapshot.hpp.
+Definition at line 558 of file snapshot.hpp.
@@ -382,7 +382,7 @@ template<typename Entity >entity is managed by the loader, false otherwise. Definition at line 690 of file snapshot.hpp.
+Definition at line 694 of file snapshot.hpp.
@@ -423,7 +423,7 @@ template<typename Entity >entity refers in the target registry. Definition at line 706 of file snapshot.hpp.
+Definition at line 710 of file snapshot.hpp.
@@ -519,7 +519,7 @@ template<typename Entity > This functions helps to identify and destroy those entities.Definition at line 677 of file snapshot.hpp.
+Definition at line 681 of file snapshot.hpp.
@@ -552,7 +552,7 @@ template<typename Entity >Users should invoke this member function after restoring each snapshot, unless they know exactly what they are doing.
Definition at line 645 of file snapshot.hpp.
+Definition at line 649 of file snapshot.hpp.
@@ -615,7 +615,7 @@ template<typename... Tag, typename Archive , typename... Type, typename... MeDefinition at line 626 of file snapshot.hpp.
+Definition at line 630 of file snapshot.hpp.
diff --git a/classentt_1_1Delegate.html b/classentt_1_1Delegate.html index c14f27c1a..5386e438f 100644 --- a/classentt_1_1Delegate.html +++ b/classentt_1_1Delegate.html @@ -22,7 +22,7 @@| connect() 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 |
| 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 |
Definition at line 36 of file delegate.hpp.
Definition at line 70 of file delegate.hpp.
+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.
+ +Definition at line 86 of file delegate.hpp.
+Definition at line 107 of file delegate.hpp.
Checks whether a delegate actually stores a listener.
Definition at line 60 of file delegate.hpp.
+Definition at line 65 of file delegate.hpp.
@@ -274,7 +326,7 @@ template<typename Ret , typename... Args>Definition at line 104 of file delegate.hpp.
+Definition at line 125 of file delegate.hpp.
@@ -314,7 +366,7 @@ template<typename Ret , typename... Args>Definition at line 116 of file delegate.hpp.
+Definition at line 137 of file delegate.hpp.
@@ -346,7 +398,7 @@ template<typename Ret , typename... Args>Resets a delegate.
After a reset, a delegate can be safely invoked with no effect.
-Definition at line 95 of file delegate.hpp.
+Definition at line 116 of file delegate.hpp.
diff --git a/classentt_1_1Dispatcher-members.html b/classentt_1_1Dispatcher-members.html index af5735ae8..2313612b8 100644 --- a/classentt_1_1Dispatcher-members.html +++ b/classentt_1_1Dispatcher-members.html @@ -22,7 +22,7 @@Types identifiers.
-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.
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.
|
+ 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
new file mode 100644
index 000000000..144303d8e
--- /dev/null
+++ b/classentt_1_1Meta.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..dd2e4c2d0
--- /dev/null
+++ b/classentt_1_1MetaCtor-members.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..edeee1d0a
--- /dev/null
+++ b/classentt_1_1MetaCtor.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..ee3d7824b
--- /dev/null
+++ b/classentt_1_1MetaData-members.html
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..a20183584
--- /dev/null
+++ b/classentt_1_1MetaData.html
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..9cb2313bc
--- /dev/null
+++ b/classentt_1_1MetaDtor-members.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..fae2dba57
--- /dev/null
+++ b/classentt_1_1MetaDtor.html
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..bf8de980d
--- /dev/null
+++ b/classentt_1_1MetaFunc-members.html
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..a3faa535e
--- /dev/null
+++ b/classentt_1_1MetaFunc.html
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..bf963cb74
--- /dev/null
+++ b/classentt_1_1MetaProp-members.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..d455c4b79
--- /dev/null
+++ b/classentt_1_1MetaProp.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..a0186c27a
--- /dev/null
+++ b/classentt_1_1MetaType-members.html
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+|
+ 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
new file mode 100644
index 000000000..89b318798
--- /dev/null
+++ b/classentt_1_1MetaType.html
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+|
+ 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
index f5837e4c8..66bdfafd0 100644
--- a/classentt_1_1PersistentView-members.html
+++ b/classentt_1_1PersistentView-members.html
@@ -22,7 +22,7 @@
Definition at line 39 of file prototype.hpp.
+Definition at line 40 of file prototype.hpp.
Definition at line 69 of file prototype.hpp.
+Definition at line 70 of file prototype.hpp.
@@ -265,7 +265,7 @@ template<typename Entity > -Definition at line 93 of file prototype.hpp.
+Definition at line 94 of file prototype.hpp.
@@ -319,7 +319,7 @@ template<typename Entity > -Definition at line 356 of file prototype.hpp.
+Definition at line 357 of file prototype.hpp.
@@ -361,7 +361,7 @@ template<typename Entity > -Definition at line 380 of file prototype.hpp.
+Definition at line 381 of file prototype.hpp.
@@ -415,7 +415,7 @@ template<typename Entity > -Definition at line 307 of file prototype.hpp.
+Definition at line 308 of file prototype.hpp.
@@ -458,7 +458,7 @@ template<typename Entity > -Definition at line 333 of file prototype.hpp.
+Definition at line 334 of file prototype.hpp.
@@ -490,7 +490,7 @@ template<typename Entity >Creates a new entity using a given prototype.
Utility shortcut, equivalent to the following snippet:
-| other | A valid reference to a registry. | |||||||||||||
| other | A valid reference to a registry. | |||||||||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
||||||||||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
||||||||||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
||||||||||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
||||||||||||||
| Tag | Type of tag of which to get the owner. |
Definition at line 924 of file registry.hpp.
+Definition at line 963 of file registry.hpp.
Definition at line 268 of file registry.hpp.
+Definition at line 341 of file registry.hpp.
@@ -715,7 +713,7 @@ template<typename Entity>Returns the number of entities that a registry has currently allocated space for.
Definition at line 277 of file registry.hpp.
+Definition at line 350 of file registry.hpp.
@@ -761,7 +759,7 @@ template<typename Tag >Definition at line 989 of file registry.hpp.
+Definition at line 1027 of file registry.hpp.
@@ -806,7 +804,7 @@ template<typename Component >Definition at line 1018 of file registry.hpp.
+Definition at line 1056 of file registry.hpp.
@@ -846,7 +844,7 @@ template<typename... Component>Definition at line 1422 of file registry.hpp.
+Definition at line 1455 of file registry.hpp.
@@ -885,7 +883,7 @@ template<typename Entity>The returned entity has no components nor tags assigned.
Definition at line 448 of file registry.hpp.
+Definition at line 521 of file registry.hpp.
@@ -927,7 +925,7 @@ template<typename Entity>Definition at line 425 of file registry.hpp.
+Definition at line 498 of file registry.hpp.
@@ -969,7 +967,7 @@ template<typename Component >Definition at line 353 of file registry.hpp.
+Definition at line 426 of file registry.hpp.
@@ -1004,14 +1002,14 @@ template<typename Tag >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 483 of file registry.hpp.
+Definition at line 556 of file registry.hpp.
@@ -1054,7 +1052,7 @@ Attempting to use an invalid entity results in undefined behavior.Definition at line 509 of file registry.hpp.
+Definition at line 582 of file registry.hpp.
@@ -1089,7 +1087,7 @@ template<typename... Component, typename... Type>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. | |||||||||||||
| Tag | Type of tag for which to perform the check. |
Definition at line 696 of file registry.hpp.
+Definition at line 744 of file registry.hpp.
@@ -1862,7 +1860,7 @@ template<typename... Component>Definition at line 713 of file registry.hpp.
+Definition at line 761 of file registry.hpp.
@@ -1912,7 +1910,7 @@ template<typename Tag >Definition at line 902 of file registry.hpp.
+Definition at line 950 of file registry.hpp.
@@ -2014,7 +2012,7 @@ template<typename Entity>Definition at line 1276 of file registry.hpp.
+Definition at line 1309 of file registry.hpp.
@@ -2063,7 +2061,7 @@ template<typename Func > -Definition at line 1310 of file registry.hpp.
+Definition at line 1343 of file registry.hpp.
@@ -2105,7 +2103,7 @@ template<typename... Component> -Definition at line 1374 of file registry.hpp.
+Definition at line 1407 of file registry.hpp.
@@ -2147,7 +2145,7 @@ template<typename Component >Definition at line 315 of file registry.hpp.
+Definition at line 388 of file registry.hpp.
@@ -2189,7 +2187,7 @@ template<typename Component >Definition at line 334 of file registry.hpp.
+Definition at line 407 of file registry.hpp.
@@ -2228,7 +2226,7 @@ template<typename Tag > -Definition at line 632 of file registry.hpp.
+Definition at line 696 of file registry.hpp.
@@ -2276,7 +2274,7 @@ template<typename Component > -Definition at line 655 of file registry.hpp.
+Definition at line 714 of file registry.hpp.
@@ -2337,7 +2335,7 @@ template<typename Tag , typename... Args>Definition at line 856 of file registry.hpp.
+Definition at line 904 of file registry.hpp.
@@ -2399,7 +2397,7 @@ template<typename Component , typename... Args>Definition at line 881 of file registry.hpp.
+Definition at line 929 of file registry.hpp.
@@ -2446,7 +2444,7 @@ template<typename Component > -Definition at line 245 of file registry.hpp.
+Definition at line 318 of file registry.hpp.
@@ -2485,7 +2483,7 @@ template<typename Entity> -Definition at line 258 of file registry.hpp.
+Definition at line 331 of file registry.hpp.
@@ -2534,7 +2532,7 @@ template<typename Component > -Definition at line 1180 of file registry.hpp.
+Definition at line 1218 of file registry.hpp.
@@ -2574,7 +2572,7 @@ template<typename Component > -Definition at line 1201 of file registry.hpp.
+Definition at line 1237 of file registry.hpp.
@@ -2606,7 +2604,7 @@ template<typename Entity>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 1221 of file registry.hpp.
+Definition at line 1254 of file registry.hpp.
@@ -2641,7 +2639,7 @@ template<typename Entity>Definition at line 1580 of file registry.hpp.
+Definition at line 1613 of file registry.hpp.
@@ -2681,7 +2679,7 @@ template<typename Component >Definition at line 215 of file registry.hpp.
+Definition at line 288 of file registry.hpp.
@@ -2713,7 +2711,7 @@ template<typename Entity>Returns the number of entities created so far.
Definition at line 223 of file registry.hpp.
+Definition at line 296 of file registry.hpp.
@@ -2747,7 +2745,7 @@ template<typename Entity> 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 1551 of file registry.hpp.
+Definition at line 1584 of file registry.hpp.
@@ -2825,7 +2823,7 @@ template<typename Component , typename Compare , typename Sort = StdSort, ty -Definition at line 1123 of file registry.hpp.
+Definition at line 1161 of file registry.hpp.
@@ -2874,7 +2872,7 @@ template<typename To , typename From > -Definition at line 1159 of file registry.hpp.
+Definition at line 1197 of file registry.hpp.
@@ -2917,7 +2915,7 @@ template<typename Tag >Definition at line 188 of file registry.hpp.
+Definition at line 261 of file registry.hpp.
@@ -2959,7 +2957,7 @@ template<typename Component >Definition at line 205 of file registry.hpp.
+Definition at line 278 of file registry.hpp.
@@ -2998,7 +2996,7 @@ template<typename Entity>Definition at line 362 of file registry.hpp.
+Definition at line 435 of file registry.hpp.
@@ -3037,7 +3035,7 @@ template<typename Entity>Definition at line 404 of file registry.hpp.
+Definition at line 477 of file registry.hpp.
@@ -3096,7 +3094,7 @@ template<typename... Component>Definition at line 1353 of file registry.hpp.
+Definition at line 1386 of file registry.hpp.
@@ -3157,7 +3155,7 @@ template<typename... Component>Definition at line 1468 of file registry.hpp.
+Definition at line 1501 of file registry.hpp.
@@ -3211,7 +3209,7 @@ template<typename Component >Definition at line 1498 of file registry.hpp.
+Definition at line 1531 of file registry.hpp.
@@ -3283,7 +3281,7 @@ template<typename It >Definition at line 1530 of file registry.hpp.
+Definition at line 1563 of file registry.hpp.
diff --git a/classentt_1_1ResourceCache-members.html b/classentt_1_1ResourceCache-members.html index 645183e45..5926cbd25 100644 --- a/classentt_1_1ResourceCache-members.html +++ b/classentt_1_1ResourceCache-members.html @@ -22,7 +22,7 @@Definition at line 112 of file sigh.hpp.
+Definition at line 121 of file sigh.hpp.
Definition at line 255 of file sigh.hpp.
+Definition at line 299 of file sigh.hpp.
Definition at line 271 of file sigh.hpp.
+Definition at line 315 of file sigh.hpp.
@@ -225,7 +225,7 @@ template<typename Ret , typename... Args, typename Collector >Definition at line 321 of file sigh.hpp.
+Definition at line 365 of file sigh.hpp.
@@ -257,7 +257,7 @@ template<typename Ret , typename... Args, typename Collector >Returns false if at least a listener is connected to the signal.
Definition at line 285 of file sigh.hpp.
+Definition at line 329 of file sigh.hpp.
@@ -297,7 +297,7 @@ template<typename Ret , typename... Args, typename Collector >Definition at line 352 of file sigh.hpp.
+Definition at line 396 of file sigh.hpp.
@@ -336,7 +336,7 @@ template<typename Ret , typename... Args, typename Collector > -Definition at line 309 of file sigh.hpp.
+Definition at line 353 of file sigh.hpp.
@@ -370,7 +370,7 @@ template<typename Ret , typename... Args, typename Collector > The function type for a listener is the one of the signal to which it belongs. The order of invocation of the listeners isn't guaranteed.Definition at line 298 of file sigh.hpp.
+Definition at line 342 of file sigh.hpp.
@@ -402,7 +402,7 @@ template<typename Ret , typename... Args, typename Collector >Number of listeners connected to the signal.
Definition at line 277 of file sigh.hpp.
+Definition at line 321 of file sigh.hpp.
@@ -452,7 +452,7 @@ template<typename Ret , typename... Args, typename Collector > -Definition at line 338 of file sigh.hpp.
+Definition at line 382 of file sigh.hpp.
diff --git a/classentt_1_1Sink.html b/classentt_1_1Sink.html index d95cb426e..a934536e4 100644 --- a/classentt_1_1Sink.html +++ b/classentt_1_1Sink.html @@ -22,7 +22,7 @@Sink implementation.
-Primary template isn't defined on purpose. All the specializations give a compile-time error unless the template parameter is a function type.
+TURN_OFF_DOXYGEN Primary template isn't defined on purpose. All the specializations give a compile-time error unless the template parameter is a function type.
| Function | A valid function type. | |||||||||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
||||||||||||||
| connect() | entt::Sink< Ret(Args...)> | inline | |||||
| connect(Class *instance) | entt::Sink< Ret(Args...)> | inline | |||||
| disconnect() | entt::Sink< Ret(Args...)> | inline | |||||
| connect(Class *instance) | entt::Sink< Ret(Args...)> | inline | |||||
| disconnect() | entt::Sink< Ret(Args...)> | inline | |||||
| disconnect(Class *instance) | entt::Sink< Ret(Args...)> | inline | |||||
| disconnect(Class *instance) | entt::Sink< Ret(Args...)> | inline | |||||
| disconnect(Class *instance) | entt::Sink< Ret(Args...)> | inline | |||||
| disconnect() | entt::Sink< Ret(Args...)> | inline | |||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
| 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... | |||||||
| 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... | |||||||
+
|
+ +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 | +
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. |
Definition at line 144 of file snapshot.hpp.
+Definition at line 148 of file snapshot.hpp.
@@ -239,7 +239,7 @@ template<typename... Component, typename Archive >Definition at line 171 of file snapshot.hpp.
+Definition at line 175 of file snapshot.hpp.
@@ -307,7 +307,7 @@ template<typename... Component, typename Archive , typename It >Definition at line 193 of file snapshot.hpp.
+Definition at line 197 of file snapshot.hpp.
@@ -514,7 +514,7 @@ template<typename Tag , typename Archive >Definition at line 210 of file snapshot.hpp.
+Definition at line 214 of file snapshot.hpp.
@@ -563,7 +563,7 @@ template<typename... Tag, typename Archive >Definition at line 236 of file snapshot.hpp.
+Definition at line 240 of file snapshot.hpp.
diff --git a/classentt_1_1SnapshotLoader-members.html b/classentt_1_1SnapshotLoader-members.html index 644479de6..7b01374e6 100644 --- a/classentt_1_1SnapshotLoader-members.html +++ b/classentt_1_1SnapshotLoader-members.html @@ -22,7 +22,7 @@Definition at line 261 of file snapshot.hpp.
+Definition at line 265 of file snapshot.hpp.
Definition at line 361 of file snapshot.hpp.
+Definition at line 365 of file snapshot.hpp.
@@ -229,7 +229,7 @@ template<typename Archive >Definition at line 341 of file snapshot.hpp.
+Definition at line 345 of file snapshot.hpp.
@@ -277,7 +277,7 @@ template<typename Archive >Definition at line 324 of file snapshot.hpp.
+Definition at line 328 of file snapshot.hpp.
@@ -373,7 +373,7 @@ template<typename Entity > This functions helps to identify and destroy those entities.Definition at line 399 of file snapshot.hpp.
+Definition at line 403 of file snapshot.hpp.
@@ -422,7 +422,7 @@ template<typename... Tag, typename Archive >Definition at line 382 of file snapshot.hpp.
+Definition at line 386 of file snapshot.hpp.
diff --git a/classentt_1_1SparseSet.html b/classentt_1_1SparseSet.html index 6175a3020..840056a13 100644 --- a/classentt_1_1SparseSet.html +++ b/classentt_1_1SparseSet.html @@ -22,7 +22,7 @@Definition at line 573 of file sparse_set.hpp.
+Definition at line 576 of file sparse_set.hpp.
sort or respect.Definition at line 785 of file sparse_set.hpp.
+Definition at line 790 of file sparse_set.hpp.
@@ -380,7 +380,7 @@ template<typename Entity , typename Type >sort or respect.Definition at line 801 of file sparse_set.hpp.
+Definition at line 806 of file sparse_set.hpp.
@@ -414,7 +414,7 @@ template<typename Entity , typename Type >sort or respect.Definition at line 768 of file sparse_set.hpp.
+Definition at line 773 of file sparse_set.hpp.
@@ -448,7 +448,7 @@ template<typename Entity , typename Type >sort or respect.Definition at line 820 of file sparse_set.hpp.
+Definition at line 825 of file sparse_set.hpp.
@@ -510,7 +510,7 @@ template<typename... Args>Definition at line 932 of file sparse_set.hpp.
+Definition at line 937 of file sparse_set.hpp.
@@ -572,7 +572,7 @@ template<typename... Args>Definition at line 960 of file sparse_set.hpp.
+Definition at line 965 of file sparse_set.hpp.
@@ -614,7 +614,7 @@ template<typename Entity , typename Type >Reimplemented from entt::SparseSet< Entity >.
-Definition at line 977 of file sparse_set.hpp.
+Definition at line 982 of file sparse_set.hpp.
@@ -648,7 +648,7 @@ template<typename Entity , typename Type >sort or respect.Definition at line 838 of file sparse_set.hpp.
+Definition at line 843 of file sparse_set.hpp.
@@ -682,7 +682,7 @@ template<typename Entity , typename Type >sort or respect.Definition at line 856 of file sparse_set.hpp.
+Definition at line 861 of file sparse_set.hpp.
@@ -723,7 +723,7 @@ template<typename Entity , typename Type >Definition at line 890 of file sparse_set.hpp.
+Definition at line 895 of file sparse_set.hpp.
@@ -764,7 +764,7 @@ template<typename Entity , typename Type >Definition at line 906 of file sparse_set.hpp.
+Definition at line 911 of file sparse_set.hpp.
@@ -865,7 +865,7 @@ template<typename Entity , typename Type >Definition at line 865 of file sparse_set.hpp.
+Definition at line 870 of file sparse_set.hpp.
@@ -904,7 +904,7 @@ template<typename Entity , typename Type >Definition at line 874 of file sparse_set.hpp.
+Definition at line 879 of file sparse_set.hpp.
@@ -938,7 +938,7 @@ template<typename Entity , typename Type >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 733 of file sparse_set.hpp.
+Definition at line 738 of file sparse_set.hpp.
@@ -972,7 +972,7 @@ template<typename Entity , typename Type >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 752 of file sparse_set.hpp.
+Definition at line 757 of file sparse_set.hpp.
@@ -1011,7 +1011,7 @@ template<typename Entity , typename Type > -Definition at line 713 of file sparse_set.hpp.
+Definition at line 718 of file sparse_set.hpp.
@@ -1053,7 +1053,7 @@ template<typename Entity , typename Type > -Definition at line 1075 of file sparse_set.hpp.
+Definition at line 1080 of file sparse_set.hpp.
@@ -1130,7 +1130,7 @@ template<typename Compare , typename Sort = StdSort, typename... Args> -Definition at line 1028 of file sparse_set.hpp.
+Definition at line 1033 of file sparse_set.hpp.
diff --git a/classentt_1_1SparseSet_3_01Entity_01_4-members.html b/classentt_1_1SparseSet_3_01Entity_01_4-members.html index 870d7297b..a0346757b 100644 --- a/classentt_1_1SparseSet_3_01Entity_01_4-members.html +++ b/classentt_1_1SparseSet_3_01Entity_01_4-members.html @@ -22,7 +22,7 @@respect.Definition at line 296 of file sparse_set.hpp.
+Definition at line 298 of file sparse_set.hpp.
@@ -279,7 +279,7 @@ template<typename Entity >respect.Definition at line 312 of file sparse_set.hpp.
+Definition at line 314 of file sparse_set.hpp.
@@ -311,7 +311,7 @@ template<typename Entity >Returns the number of elements that a sparse set has currently allocated space for.
Definition at line 208 of file sparse_set.hpp.
+Definition at line 210 of file sparse_set.hpp.
@@ -345,7 +345,7 @@ template<typename Entity >respect.Definition at line 279 of file sparse_set.hpp.
+Definition at line 281 of file sparse_set.hpp.
@@ -379,7 +379,7 @@ template<typename Entity >respect.Definition at line 329 of file sparse_set.hpp.
+Definition at line 331 of file sparse_set.hpp.
@@ -419,7 +419,7 @@ template<typename Entity > -Definition at line 439 of file sparse_set.hpp.
+Definition at line 442 of file sparse_set.hpp.
@@ -453,7 +453,7 @@ template<typename Entity >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 263 of file sparse_set.hpp.
+Definition at line 265 of file sparse_set.hpp.
@@ -495,7 +495,7 @@ template<typename Entity >Reimplemented in entt::SparseSet< Entity, Type >.
-Definition at line 463 of file sparse_set.hpp.
+Definition at line 466 of file sparse_set.hpp.
@@ -527,7 +527,7 @@ template<typename Entity >Checks whether a sparse set is empty.
Definition at line 244 of file sparse_set.hpp.
+Definition at line 246 of file sparse_set.hpp.
@@ -561,7 +561,7 @@ template<typename Entity >respect.Definition at line 346 of file sparse_set.hpp.
+Definition at line 348 of file sparse_set.hpp.
@@ -595,7 +595,7 @@ template<typename Entity >respect.Definition at line 363 of file sparse_set.hpp.
+Definition at line 365 of file sparse_set.hpp.
@@ -628,7 +628,7 @@ template<typename Entity >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 222 of file sparse_set.hpp.
+Definition at line 224 of file sparse_set.hpp.
@@ -671,7 +671,7 @@ template<typename Entity >Definition at line 404 of file sparse_set.hpp.
+Definition at line 406 of file sparse_set.hpp.
@@ -712,7 +712,7 @@ template<typename Entity >Definition at line 423 of file sparse_set.hpp.
+Definition at line 425 of file sparse_set.hpp.
@@ -751,7 +751,7 @@ template<typename Entity >Definition at line 381 of file sparse_set.hpp.
+Definition at line 383 of file sparse_set.hpp.
@@ -852,7 +852,7 @@ template<typename Entity >Definition at line 372 of file sparse_set.hpp.
+Definition at line 374 of file sparse_set.hpp.
@@ -891,7 +891,7 @@ template<typename Entity > -Definition at line 199 of file sparse_set.hpp.
+Definition at line 201 of file sparse_set.hpp.
@@ -933,7 +933,7 @@ template<typename Entity > -Definition at line 517 of file sparse_set.hpp.
+Definition at line 520 of file sparse_set.hpp.
@@ -966,7 +966,7 @@ template<typename Entity >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 236 of file sparse_set.hpp.
+Definition at line 238 of file sparse_set.hpp.
@@ -1018,7 +1018,7 @@ template<typename Entity > -Definition at line 489 of file sparse_set.hpp.
+Definition at line 492 of file sparse_set.hpp.
diff --git a/classentt_1_1View-members.html b/classentt_1_1View-members.html index 9b0f3cd11..12e829c09 100644 --- a/classentt_1_1View-members.html +++ b/classentt_1_1View-members.html @@ -22,7 +22,7 @@
|
| ||||
| Registry (entt) | SparseSet (entt) | |||
| Actor (entt) | Emitter (entt) | ResourceCache (entt) | SparseSet< Entity > (entt) | ||
| entt_traits (entt) | Monostate (entt) | ResourceHandle (entt) | SparseSet< Entity, Type > (entt) | |
| entt_traits< std::uint16_t > (entt) |
| ||||
| Attachee (entt) | entt_traits (entt) | Monostate (entt) | ResourceHandle (entt) | SparseSet< Entity, Type > (entt) | |
| Attachee< Entity > (entt) | entt_traits< std::uint16_t > (entt) |
| ResourceLoader (entt) | StdSort (entt) | |
| break_t (entt) | entt_traits< std::uint32_t > (entt) | RuntimeView (entt) |
| ||
| Attachee< Entity, Type > (entt) | entt_traits< std::uint32_t > (entt) | RuntimeView (entt) |
| ||
| entt_traits< std::uint64_t > (entt) | OneShotBubbleSort (entt) |
| ||
| raw_t (entt) | |||||
|
+ EnTT
+ 2.7.3
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/delegate_8hpp_source.html b/delegate_8hpp_source.html
index b318a50e0..84bc0b1c8 100644
--- a/delegate_8hpp_source.html
+++ b/delegate_8hpp_source.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.2
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/dir_de8f4e6ba3f54a2a21309f742e93a373.html b/dir_de8f4e6ba3f54a2a21309f742e93a373.html
index 2d5eac20a..f6db24e45 100644
--- a/dir_de8f4e6ba3f54a2a21309f742e93a373.html
+++ b/dir_de8f4e6ba3f54a2a21309f742e93a373.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.3
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/entt_8hpp_source.html b/entt_8hpp_source.html
index ae75251fb..1acf28d47 100644
--- a/entt_8hpp_source.html
+++ b/entt_8hpp_source.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.2
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/family_8hpp_source.html b/family_8hpp_source.html
index 41befce38..c727c484c 100644
--- a/family_8hpp_source.html
+++ b/family_8hpp_source.html
@@ -22,7 +22,7 @@
| Centt::Actor< Entity > | Dedicated to those who aren't confident with entity-component systems |
| Centt::break_t | Break type used to disambiguate overloads |
| ▼Cconnection_type | |
| Centt::Emitter< Derived >::Connection< Event > | Generic connection type for events |
| Centt::ContinuousLoader< Entity > | Utility class for continuous loading |
| Centt::Delegate< typename > | Basic delegate implementation |
| Centt::Delegate< Ret(Args...)> | Utility class to send around functions and member functions |
| Centt::Dispatcher | Basic dispatcher implementation |
| Centt::Emitter< Derived > | General purpose event emitter |
| Centt::entt_traits< typename > | Entity traits |
| Centt::entt_traits< std::uint16_t > | Entity traits for a 16 bits entity identifier |
| Centt::entt_traits< std::uint32_t > | Entity traits for a 32 bits entity identifier |
| Centt::entt_traits< std::uint64_t > | Entity traits for a 64 bits entity identifier |
| Centt::Family<... > | Dynamic identifier generator |
| ▼CFunc | |
| Centt::ProcessAdaptor< Func, Delta > | Adaptor for lambdas and functors to turn them into processes |
| Centt::HashedString | Zero overhead resource identifier |
| Centt::Identifier< Types > | Types identifiers |
| Centt::InsertionSort | Function object for performing insertion sort |
| ▼CInvoker | |
| Centt::SigH< Ret(Args...), Collector > | Unmanaged signal handler definition |
| Centt::Monostate< hash_type > | Minimal implementation of the monostate pattern |
| Centt::OneShotBubbleSort | Function object for performing bubble sort (single iteration) |
| Centt::persistent_t | Persistent view type used to disambiguate overloads |
| Centt::PersistentView< Entity, Component > | Persistent view |
| Centt::Process< Derived, Delta > | Base class for processes |
| ▼Centt::Process< ProcessAdaptor< Func, Delta >, Delta > | |
| Centt::ProcessAdaptor< Func, Delta > | Adaptor for lambdas and functors to turn them into processes |
| Centt::Prototype< Entity > | Prototype container for concepts |
| Centt::raw_t | Raw view type used to disambiguate overloads |
| Centt::RawView< Entity, Component > | Raw view |
| Centt::Registry< Entity > | Fast and reliable entity-component system |
| Centt::ResourceCache< Resource > | Simple cache for resources of a given type |
| Centt::ResourceHandle< Resource > | Shared resource handle |
| Centt::ResourceLoader< Loader, Resource > | Base class for resource loaders |
| Centt::RuntimeView< Entity > | Runtime view |
| Centt::Scheduler< Delta > | Cooperative scheduler for processes |
| Centt::ServiceLocator< Service > | Service locator, nothing more |
| Centt::SigH< Function, Collector > | Unmanaged signal handler declaration |
| Centt::SigH< void(const Event &)> | |
| Centt::Sink< Function > | Sink implementation |
| Centt::Sink< Ret(Args...)> | Sink implementation |
| Centt::Snapshot< Entity > | Utility class to create snapshots from a registry |
| Centt::SnapshotLoader< Entity > | Utility class to restore a snapshot as a whole |
| Centt::SparseSet<... > | Sparse set |
| ▼Centt::SparseSet< Entity > | Basic sparse set implementation |
| Centt::SparseSet< Entity, Type > | Extended sparse set implementation |
| Centt::StdSort | Function object to wrap std::sort in a class type |
| Centt::tag_t | Tag class type used to disambiguate overloads |
| Centt::View< Entity, Component > | Multi component view |
| Centt::View< Entity, Component > | Single component view specialization |
| Centt::Attachee<... > | Attachee |
| ▼Centt::Attachee< Entity > | Basic attachee implementation |
| Centt::Attachee< Entity, Type > | Extended attachee implementation |
| Centt::Attachee< Entity, Tag > | |
| ▼Cconnection_type | |
| Centt::Emitter< Derived >::Connection< Event > | Generic connection type for events |
| Centt::ContinuousLoader< Entity > | Utility class for continuous loading |
| Centt::Delegate< typename > | Basic delegate implementation |
| Centt::Delegate< Ret(Args...)> | Utility class to send around functions and member functions |
| Centt::Dispatcher | Basic dispatcher implementation |
| Centt::Emitter< Derived > | General purpose event emitter |
| Centt::entt_traits< typename > | Entity traits |
| Centt::entt_traits< std::uint16_t > | Entity traits for a 16 bits entity identifier |
| Centt::entt_traits< std::uint32_t > | Entity traits for a 32 bits entity identifier |
| Centt::entt_traits< std::uint64_t > | Entity traits for a 64 bits entity identifier |
| Centt::Family<... > | Dynamic identifier generator |
| ▼CFunc | |
| Centt::ProcessAdaptor< Func, Delta > | Adaptor for lambdas and functors to turn them into processes |
| Centt::HashedString | Zero overhead resource identifier |
| Centt::Identifier< Types > | Types identifiers |
| Centt::InsertionSort | Function object for performing insertion sort |
| ▼CInvoker | |
| Centt::SigH< Ret(Args...), Collector > | Unmanaged signal handler definition |
| Centt::Monostate< hash_type > | Minimal implementation of the monostate pattern |
| Centt::OneShotBubbleSort | Function object for performing bubble sort (single iteration) |
| Centt::persistent_t | Persistent view type used to disambiguate overloads |
| Centt::PersistentView< Entity, Component > | Persistent view |
| Centt::Process< Derived, Delta > | Base class for processes |
| ▼Centt::Process< ProcessAdaptor< Func, Delta >, Delta > | |
| Centt::ProcessAdaptor< Func, Delta > | Adaptor for lambdas and functors to turn them into processes |
| Centt::Prototype< Entity > | Prototype container for concepts |
| Centt::raw_t | Raw view type used to disambiguate overloads |
| Centt::RawView< Entity, Component > | Raw view |
| Centt::Registry< Entity > | Fast and reliable entity-component system |
| Centt::ResourceCache< Resource > | Simple cache for resources of a given type |
| Centt::ResourceHandle< Resource > | Shared resource handle |
| Centt::ResourceLoader< Loader, Resource > | Base class for resource loaders |
| Centt::RuntimeView< Entity > | Runtime view |
| Centt::Scheduler< Delta > | Cooperative scheduler for processes |
| Centt::ServiceLocator< Service > | Service locator, nothing more |
| Centt::SigH< Function, Collector > | Unmanaged signal handler declaration |
| Centt::SigH< void(const Event &)> | |
| Centt::SigH< void(Registry &, const Entity)> | |
| Centt::Sink< Function > | Sink implementation |
| Centt::Sink< Ret(Args...)> | Sink implementation |
| Centt::Snapshot< Entity > | Utility class to create snapshots from a registry |
| Centt::SnapshotLoader< Entity > | Utility class to restore a snapshot as a whole |
| Centt::SparseSet<... > | Sparse set |
| ▼Centt::SparseSet< Entity > | Basic sparse set implementation |
| Centt::SparseSet< Entity, Type > | Extended sparse set implementation |
| Centt::SparseSet< Entity, Component > | |
| Centt::StdSort | Function object to wrap std::sort in a class type |
| Centt::tag_t | Tag class type used to disambiguate overloads |
| Centt::View< Entity, Component > | Multi component view |
| Centt::View< Entity, Component > | Single component view specialization |
EnTT is a header-only, tiny and easy to use entity-component system (and much more) written in modern C++.
+
EnTT is a header-only, tiny and easy to use entity-component system (and much more) written in modern C++ and even used by Mojang in Minecraft.
The entity-component-system (also known as ECS) is an architectural pattern used mostly in game development. For further details:
Consider it a work in progress. The whole API is also fully documented in-code for those who are brave enough to read it.
Currently, EnTT is tested on Linux, Microsoft Windows and OS X. It has proven to work also on both Android and iOS.
Most likely it will not be problematic on other systems as well, but has not been sufficiently tested so far.
I started working on EnTT because of the wrong reason: my goal was to design an entity-component system that beated another well known open source solution in terms of performance and used (possibly) less memory in the average case.
In the end, I did it, but it wasn't much satisfying. Actually it wasn't satisfying at all. The fastest and nothing more, fairly little indeed. When I realized it, I tried hard to keep intact the great performance of EnTT and to add all the features I wanted to see in my own library at the same time.
Nowadays, EnTT is finally what I was looking for: still faster than its competitors, lower memory usage in the average case, a really good API and an amazing set of features. And even more, of course.
As it stands right now, EnTT is just fast enough for my requirements if compared to my first choice (it was already amazingly fast actually).
Below is a comparison between the two (both of them compiled with GCC 7.3.0 on a Dell XPS 13 out of the mid 2014):
EnTT, choose it because of its API, features and performance, not because there is a benchmark somewhere that makes it seem the fastest.
Probably I'll try to get out of EnTT more features and even better performance in the future, mainly for fun.
If you want to contribute and/or have any suggestion, feel free to make a PR or open an issue to discuss your idea.
To be able to use EnTT, users must provide a full-featured compiler that supports at least C++14.
The requirements below are mandatory to compile the tests and to extract the documentation:
EnTT is a header-only library. This means that including the entt.hpp header is enough to include the library as a whole and use it. For those who are interested only in the entity-component system, consider to include the sole entity/registry.hpp header instead.
It's a matter of adding the following line to the top of a file:
Use the line below to include only the entity-component system instead:
Then pass the proper -I argument to the compiler to add the src directory to the include paths.
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.
-The documentation is based on doxygen. To build it:
$ cd build $ cmake .. -DBUILD_DOCS=ON $ make
The API reference will be created in HTML format within the directory build/docs/html. To navigate it with your favorite browser:
$ cd build $ your_favorite_browser docs/html/index.html -
To compile and run the tests, EnTT requires googletest.
cmake will download and compile the library before compiling anything else. In order to build without tests set CMake option BUILD_TESTING=OFF.
$ make testNote that benchmarks are not part of this set.
-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:
-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.
- 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.
-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).
- 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>.
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:
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:
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.
-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:
-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.
-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.
-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.
The code is not production-ready and overall performance can be highly improved. However, I sacrificed optimizations in favor of a more readable piece of code. I hope I succeeded.
- Note also that this isn't neither the only nor (probably) the best way to do it. In fact, the right way depends on the scripting language and the problem one is facing in general.
- That being said, feel free to use it at your own risk.
The basic idea is that of creating a compile-time component aimed to map all the runtime components assigned to an entity.
- Identifiers come in use to address the right function from a map when invoked from the runtime environment and to filter entities when iterating.
- With a bit of gymnastic, one can narrow views and improve the performance to some extent but it was not the goal of the example.
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.
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.
- 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.
-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.
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.
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.
-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.
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).
- 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.
-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.
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.
Archives must publicly expose a predefined set of member functions. The API is straightforward and consists only of a group of function call operators that are invoked by the snapshot class and the loaders.
-In particular:
-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 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.
-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.
The code is not production-ready and it isn't neither the only nor (probably) the best way to do it. However, feel free to use it at your own risk.
-The basic idea is to store everything in a group of queues in memory, then bring everything back to the registry with different loaders.
-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.
Creating an entity from a prototype is straightforward:
-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.
-The so called helpers are small classes and functions mainly designed to offer built-in support for the most basic functionalities.
- The list of helpers will grow longer as time passes and new ideas come out.
A 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.
- A dependency can easily be broken by means of the same 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:
-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.
- 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.
- 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.
- 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.
- 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.
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.
- 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.
-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.
-Views 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.
- 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.
- 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.
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.
- 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.
- 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.
-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:
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.
-EnTT comes with a bunch of core functionalities mostly used by the other parts of the library itself.
- Hardly users will include these features in their code, but it's worth describing what EnTT offers so as not to reinvent the wheel in case of need.
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.
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.
-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.
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.
- 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:
-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:
-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 the user knows 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:
-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 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 succeeded();
It's invoked in case of success, immediately after an update and during the same tick.
-void failed();
It's invoked in case of errors, immediately after an update and during the same tick.
-void aborted();
It's invoked only if a process is explicitly aborted. There is no guarantee that it executes in the same tick, this depends solely on whether the process is aborted immediately or not.
-Derived 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.
The function call operator has a signature similar to the one of the update function of a process but for the fact that it receives two extra arguments to call whenever a process is terminated with success or with an error:
Parameters have the following meaning:
-delta is the elapsed time.data is an opaque pointer to user data if any, nullptr otherwise.succeed is a function to call when a process terminates with success.fail is a function to call when a process terminates with errors.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.
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:
-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.
- As a minimal example of use:
To update a scheduler and thus 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 the user wants 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 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.
- 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.
- 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 the user leaves 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.
- 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.
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.
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:
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.
-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 the user is 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 the user 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 the user 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.
-EnTT is available for some of the most known packaging tools. In particular:
Consider this list a work in progress and help me to make it longer.
-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.
EnTT.UE4.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 the list.
Code and documentation Copyright (c) 2017-2018 Michele Caini.
Logo Copyright (c) 2018 Richard Caseres.
-The default actor is the best choice for almost all the applications.
Users should have a really good reason to choose something different.
The default prototype is the best choice for almost all the applications.
Users should have a really good reason to choose something different.
Definition at line 490 of file prototype.hpp.
+Definition at line 491 of file prototype.hpp.
@@ -314,7 +320,7 @@ VariablesThe default registry is the best choice for almost all the applications.
Users should have a really good reason to choose something different.
Definition at line 1623 of file registry.hpp.
+Definition at line 1656 of file registry.hpp.
@@ -346,8 +352,54 @@ template<typename HashedString::hash_type Value>
+
|
+ +inline | +
Connects a dependency function to the given sink.
+A dependency function is a built-in listener 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:
| Dependency | Types of components to assign to an entity if triggered. |
| Entity | A valid entity type (see entt_traits for more details). |
| sink | A sink object properly initialized. |
Definition at line 55 of file helper.hpp.
+ +
-
-
-
-
-Connects a dependency function to the given sink. -A dependency function is a built-in listener to use to automatically assign components to an entity when a type has a dependency on some other types. -The following adds components entt::DefaultRegistry registry; entt::dependency<AType, AnotherType>(registry.construction<MyType>());
Definition at line 55 of file helper.hpp. - -◆ dependency() [3/3]- - |
+ +inline | +
Disconnects a dependency function from the given sink.
A dependency function is a built-in listener to use to automatically assign components to an entity when a type has a dependency on some other types.
-The following breaks the dependency between the component MyType and the components AType and AnotherType:
The following breaks the dependency between the component MyType and the components AType and AnotherType:
| Dependency | Types of components used to create the dependency. | ||||||
| Entity | A valid entity type (see entt_traits for more details). | ||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
|||||||
|
+ EnTT
+ 2.7.3
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/prototype_8hpp_source.html b/prototype_8hpp_source.html
index 0b3ec0657..cc869e20a 100644
--- a/prototype_8hpp_source.html
+++ b/prototype_8hpp_source.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.3
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/scheduler_8hpp_source.html b/scheduler_8hpp_source.html
index b6a8a0381..de034ab5c 100644
--- a/scheduler_8hpp_source.html
+++ b/scheduler_8hpp_source.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.3
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/sigh_8hpp_source.html b/sigh_8hpp_source.html
index 0dd5b7a07..65dd16d96 100644
--- a/sigh_8hpp_source.html
+++ b/sigh_8hpp_source.html
@@ -22,7 +22,7 @@
|
+ EnTT
+ 2.7.3
+
+ |
+
+ 1.8.13
+
+
+
diff --git a/snapshot_8hpp_source.html b/snapshot_8hpp_source.html
index 8156bbdc6..70434a9b7 100644
--- a/snapshot_8hpp_source.html
+++ b/snapshot_8hpp_source.html
@@ -22,7 +22,7 @@
This is the complete list of members for entt::Actor< Entity >, including all inherited members.
| Actor(Registry< Entity > ®) | entt::Actor< Entity > | inline | |||||
| Actor(const Actor &)=default | entt::Actor< Entity > | ||||||
| Actor(Actor &&)=default | entt::Actor< Entity > | ||||||
| Actor(const Actor &)=delete | entt::Actor< Entity > | ||||||
| Actor(Actor &&other) | entt::Actor< Entity > | inline | |||||
| assign(tag_t, Args &&... args) | entt::Actor< Entity > | inline | |||||
| assign(Args &&... args) | entt::Actor< Entity > | inline | |||||
| entity() const ENTT_NOEXCEPT | entt::Actor< Entity > | inline | |||||
| get() ENTT_NOEXCEPT | entt::Actor< Entity > | inline | |||||
| has(tag_t) const ENTT_NOEXCEPT | entt::Actor< Entity > | inline | |||||
| has() const ENTT_NOEXCEPT | entt::Actor< Entity > | inline | |||||
| operator=(const Actor &)=default | entt::Actor< Entity > | ||||||
| operator=(Actor &&)=default | entt::Actor< Entity > | ||||||
| operator=(const Actor &)=delete | entt::Actor< Entity > | ||||||
| operator=(Actor &&other) | entt::Actor< Entity > | inline | |||||
| registry() const ENTT_NOEXCEPT | entt::Actor< Entity > | inline | |||||
| registry() ENTT_NOEXCEPT | entt::Actor< Entity > | inline | |||||
| registry_type typedef | entt::Actor< Entity > | ||||||
|
EnTT
- 2.7.2
+ 2.7.3
|
~Actor () | ||||||
| Default destructor. | |||||||
| - | Actor (const Actor &)=default | ||||||
| Default copy constructor. | |||||||
| - | Actor (Actor &&)=default | ||||||
| Default move constructor. | |||||||
| Actor & | operator= (const Actor &)=default | ||||||
| Default copy assignment operator. More... | |||||||
| Actor & | operator= (Actor &&)=default | ||||||
| Default move assignment operator. More... | |||||||
| + | Actor (const Actor &)=delete | ||||||
| Copying an actor isn't allowed. | |||||||
| Actor (Actor &&other) | |||||||
| Move constructor. More... | |||||||
| Actor & | operator= (const Actor &)=delete | ||||||
| Default copy assignment operator. More... | |||||||
| Actor & | operator= (Actor &&other) | ||||||
| Move assignment operator. More... | |||||||
| template<typename Tag , typename... Args> | |||||||
| Tag & | assign (tag_t, Args &&... args) | ||||||
| Assigns the given tag to an actor. More... | |||||||
+
|
+ +inline | +
Definition at line 66 of file actor.hpp.
+Definition at line 98 of file actor.hpp.
@@ -320,7 +358,7 @@ template<typename Component , typename... Args>Definition at line 85 of file actor.hpp.
+Definition at line 117 of file actor.hpp.
@@ -352,7 +390,7 @@ template<typename Entity >Returns the entity associated with an actor.
Definition at line 189 of file actor.hpp.
+Definition at line 221 of file actor.hpp.
@@ -393,7 +431,7 @@ template<typename Tag >Definition at line 134 of file actor.hpp.
+Definition at line 166 of file actor.hpp.
@@ -434,7 +472,7 @@ template<typename Tag >Definition at line 145 of file actor.hpp.
+Definition at line 177 of file actor.hpp.
@@ -474,7 +512,7 @@ template<typename Component >Definition at line 155 of file actor.hpp.
+Definition at line 187 of file actor.hpp.
@@ -514,7 +552,7 @@ template<typename Component >Definition at line 165 of file actor.hpp.
+Definition at line 197 of file actor.hpp.
@@ -555,7 +593,7 @@ template<typename Tag >Definition at line 114 of file actor.hpp.
+Definition at line 146 of file actor.hpp.
@@ -595,12 +633,12 @@ template<typename Component >Definition at line 124 of file actor.hpp.
+Definition at line 156 of file actor.hpp.
- -Default move assignment operator.
+Move assignment operator.
+After actor move assignment, instances that have been moved from are placed in a valid but unspecified state. It's highly discouraged to continue using them.
+| other | The instance to move from. |
Returns a reference to the underlying registry.
Definition at line 173 of file actor.hpp.
+Definition at line 205 of file actor.hpp.
@@ -721,7 +768,7 @@ template<typename Entity >Returns a reference to the underlying registry.
Definition at line 104 of file actor.hpp.
+Definition at line 136 of file actor.hpp.
diff --git a/structentt_1_1Emitter_1_1Connection-members.html b/structentt_1_1Emitter_1_1Connection-members.html index a438c7335..cfb0d46b4 100644 --- a/structentt_1_1Emitter_1_1Connection-members.html +++ b/structentt_1_1Emitter_1_1Connection-members.html @@ -22,7 +22,7 @@|
+ EnTT
+ 2.7.2
+
+ |
+
This is the complete list of members for entt::MetaAny, including all inherited members.
+| convertible() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| data() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| data() ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| data() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| data() ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| MetaAny() ENTT_NOEXCEPT=default (defined in entt::MetaAny) | entt::MetaAny | |
| MetaAny(Type &&type) (defined in entt::MetaAny) | entt::MetaAny | inline |
| MetaAny(const MetaAny &)=delete (defined in entt::MetaAny) | entt::MetaAny | |
| MetaAny(MetaAny &&)=default (defined in entt::MetaAny) | entt::MetaAny | |
| operator bool() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inlineexplicit |
| operator const void *() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| operator void *() ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| operator=(const MetaAny &other)=delete (defined in entt::MetaAny) | entt::MetaAny | |
| operator=(MetaAny &&)=default (defined in entt::MetaAny) | entt::MetaAny | |
| operator==(const MetaAny &other) const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| to() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| to() ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| type() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
| valid() const ENTT_NOEXCEPT (defined in entt::MetaAny) | entt::MetaAny | inline |
+ 1.8.13
+
+
+
diff --git a/structentt_1_1MetaAny.html b/structentt_1_1MetaAny.html
new file mode 100644
index 000000000..4c06ff190
--- /dev/null
+++ b/structentt_1_1MetaAny.html
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+|
+ EnTT
+ 2.7.2
+
+ |
+
+Public Member Functions | |
| +template<typename Type > | |
| MetaAny (Type &&type) | |
| + | MetaAny (const MetaAny &)=delete |
| + | MetaAny (MetaAny &&)=default |
| +MetaAny & | operator= (const MetaAny &other)=delete |
| +MetaAny & | operator= (MetaAny &&)=default |
| +bool | valid () const ENTT_NOEXCEPT |
| +MetaType * | type () const ENTT_NOEXCEPT |
| +template<typename Type > | |
| bool | convertible () const ENTT_NOEXCEPT |
| +template<typename Type > | |
| const std::decay_t< Type > & | to () const ENTT_NOEXCEPT |
| +template<typename Type > | |
| std::decay_t< Type > & | to () ENTT_NOEXCEPT |
| +template<typename Type > | |
| const Type * | data () const ENTT_NOEXCEPT |
| +template<typename Type > | |
| Type * | data () ENTT_NOEXCEPT |
| +const void * | data () const ENTT_NOEXCEPT |
| +void * | data () ENTT_NOEXCEPT |
| + | operator const void * () const ENTT_NOEXCEPT |
| + | operator void * () ENTT_NOEXCEPT |
| + | operator bool () const ENTT_NOEXCEPT |
| +bool | operator== (const MetaAny &other) const ENTT_NOEXCEPT |
+ 1.8.13
+
+
+
diff --git a/structentt_1_1Monostate-members.html b/structentt_1_1Monostate-members.html
index ff7cd0558..36c23b3b4 100644
--- a/structentt_1_1Monostate-members.html
+++ b/structentt_1_1Monostate-members.html
@@ -22,7 +22,7 @@