|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
One kind of object, by id, in creation order. More...
#include <GfxResourceRegistry.hpp>
Classes | |
| class | View |
Public Member Functions | |
| u32 | insert (Record record) |
| Record * | find (u32 id) |
| const Record * | find (u32 id) const |
| bool | erase (u32 id) |
| u32 | size () const |
| View< std::deque< std::optional< Record > >, Record & > | all () |
| View< const std::deque< std::optional< Record > >, const Record & > | all () const |
One kind of object, by id, in creation order.
Ids are handed out in order and never reused, so a record lives at the index its id names: finding one is an index, not a search. A draw finds its pipeline, its layout and its textures by id every time it is issued, and a tree there cost a pointer chase per level per lookup. A deque, so a record a caller holds stays where it is while others are added after it, as a map's did; an erased record leaves an empty slot behind.
Definition at line 120 of file GfxResourceRegistry.hpp.
|
inline |
Definition at line 175 of file GfxResourceRegistry.hpp.
|
inline |
Definition at line 176 of file GfxResourceRegistry.hpp.
|
inline |
Definition at line 141 of file GfxResourceRegistry.hpp.
|
inline |
Definition at line 129 of file GfxResourceRegistry.hpp.
|
inline |
Definition at line 135 of file GfxResourceRegistry.hpp.
|
inline |
Definition at line 122 of file GfxResourceRegistry.hpp.
|
inline |
Definition at line 148 of file GfxResourceRegistry.hpp.