![]() |
Gaia-ECS v0.9.3
A simple and powerful entity component system
|
Cache for compile-time defined components. More...
#include <component_cache.h>
Public Member Functions | |
| ComponentCache (ComponentCache &&)=delete | |
| ComponentCache (const ComponentCache &)=delete | |
| ComponentCache & | operator= (ComponentCache &&)=delete |
| ComponentCache & | operator= (const ComponentCache &)=delete |
| template<typename T > | |
| GAIA_NODISCARD GAIA_FORCEINLINE const ComponentCacheItem & | add (Entity entity, util::str_view scopePath={}) |
| Registers the component item for. | |
| GAIA_NODISCARD const ComponentCacheItem & | add (Entity entity, const ecs::ComponentDesc &desc, util::str_view scopePath={}) |
| Registers a runtime-defined component. | |
| GAIA_NODISCARD const ComponentCacheItem & | add (Entity entity, const ComponentCacheItem::ComponentCacheItemCtx &item, util::str_view scopePath={}) |
| Registers a runtime-defined component. | |
| GAIA_NODISCARD bool | add_field (Entity component, const RuntimeFieldDesc &field) |
| Adds runtime field metadata to a registered component. | |
| GAIA_NODISCARD const ComponentCacheItem * | find (Entity entity) const noexcept |
| Searches for the component cache item. | |
| GAIA_NODISCARD ComponentCacheItem * | find (Entity entity) noexcept |
| Searches for the component cache item. | |
| GAIA_NODISCARD const ComponentCacheItem & | get (Entity entity) const noexcept |
| Returns the component cache item. | |
| GAIA_NODISCARD ComponentCacheItem & | get (Entity entity) noexcept |
| Returns the component cache item. | |
| template<typename T > | |
| GAIA_NODISCARD const ComponentCacheItem * | find () const noexcept |
| Searches for the component item for. | |
| template<typename T > | |
| GAIA_NODISCARD const ComponentCacheItem & | get () const noexcept |
| Returns the component item for. | |
| void | diag () const |
Friends | |
| class | World |
Cache for compile-time defined components.
|
inline |
|
inline |
|
inline |
Registers the component item for.
| T. | If it already exists it is returned. |
|
inline |
Adds runtime field metadata to a registered component.
| component | Component entity receiving the field. |
| field | Field descriptor. A count of 0 means scalar. Returns true when the field was added or updated, false if validation failed. |
|
inlinenoexcept |
Searches for the component item for.
| T. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Returns the component item for.
| T. |
|
inlinenoexcept |
|
inlinenoexcept |