|
vecs
Fast, flexible ecs in C++ with ergonomic API
|
A container for a single entity and its components, as a result of a query. More...
#include <vecs.h>
Public Member Functions | |
| Single ()=default | |
| Default constructor for an invalid state. | |
| Single (const std::tuple< Components *... > &components) | |
Constructs a valid Single result from a tuple of component pointers. | |
| std::tuple< Components &... > | operator* () |
| Dereferences the components. | |
| operator bool () const | |
Checks if the Single is valid. | |
Friends | |
| class | Query |
A container for a single entity and its components, as a result of a query.
The Single struct represents the result of a single entity matching the query, including references to its components.
|
inline |
Constructs a valid Single result from a tuple of component pointers.
| components | The tuple of component pointers to be dereferenced. |
|
inline |
|
inline |
Dereferences the components.
Single.